Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: tools/unittests/run_benchmarks_test.py

Issue 502473002: Teach benchmark runner to understand generic traces. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« tools/run_benchmarks.py ('K') | « tools/run_benchmarks.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/unittests/run_benchmarks_test.py
diff --git a/tools/unittests/run_benchmarks_test.py b/tools/unittests/run_benchmarks_test.py
index 37a816e760d2a59d5107f86a54efa2eeddfe2828..054522091ed1738143ac30cb686b808eed0af2aa 100644
--- a/tools/unittests/run_benchmarks_test.py
+++ b/tools/unittests/run_benchmarks_test.py
@@ -68,6 +68,15 @@ V8_NESTED_SUITES_JSON = {
]
}
+V8_GENERIC_JSON = {
+ "path": ["."],
+ "binary": "cc",
+ "flags": ["--flag"],
+ "generic": True,
+ "run_count": 1,
+ "units": "ms",
+}
+
Output = namedtuple("Output", "stdout, stderr")
class BenchmarksTest(unittest.TestCase):
@@ -295,3 +304,17 @@ class BenchmarksTest(unittest.TestCase):
self._VerifyErrors(
["Regexp \"^Richards: (.+)$\" didn't match for benchmark Richards."])
self._VerifyMock(path.join("out", "x64.release", "d7"), "--flag", "run.js")
+
+ def testOneRunGeneric(self):
+ test_input = dict(V8_GENERIC_JSON)
+ self._WriteTestInput(test_input)
+ self._MockCommand(["."], [
+ "Trace(Test1), Result(1.234), StdDev(0.23)\n"
+ "Trace(Test2), Result(10657567), StdDev(106)\n"])
+ self.assertEquals(0, self._CallMain())
+ self._VerifyResults("test", "ms", [
+ {"name": "Test1", "results": ["1.234"], "stddev": "0.23"},
+ {"name": "Test2", "results": ["10657567"], "stddev": "106"},
+ ])
+ self._VerifyErrors([])
+ self._VerifyMock(path.join("out", "x64.release", "cc"), "--flag", "")
« tools/run_benchmarks.py ('K') | « tools/run_benchmarks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698