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

Unified Diff: tools/unittests/run_benchmarks_test.py

Issue 496183003: Let benchmark runner add summary 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
« no previous file with comments | « 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 054522091ed1738143ac30cb686b808eed0af2aa..d17025232c98356bbc1a69449f914ffb16c705c1 100644
--- a/tools/unittests/run_benchmarks_test.py
+++ b/tools/unittests/run_benchmarks_test.py
@@ -293,6 +293,35 @@ class BenchmarksTest(unittest.TestCase):
self._VerifyErrors([])
self._VerifyMock(path.join("out", "Release", "d7"), "--flag", "run.js")
+ def testBuildbotWithTotal(self):
+ test_input = dict(V8_JSON)
+ test_input["total"] = True
+ self._WriteTestInput(test_input)
+ self._MockCommand(["."], ["Richards: 1.234\nDeltaBlue: 10657567\n"])
+ self.assertEquals(0, self._CallMain("--buildbot"))
+ self._VerifyResults("test", "score", [
+ {"name": "Richards", "results": ["1.234"], "stddev": ""},
+ {"name": "DeltaBlue", "results": ["10657567"], "stddev": ""},
+ {"name": "Total", "results": ["3626.49109719"], "stddev": ""},
+ ])
+ self._VerifyErrors([])
+ self._VerifyMock(path.join("out", "Release", "d7"), "--flag", "run.js")
+
+ def testBuildbotWithTotalAndErrors(self):
+ test_input = dict(V8_JSON)
+ test_input["total"] = True
+ self._WriteTestInput(test_input)
+ self._MockCommand(["."], ["x\nRichaards: 1.234\nDeltaBlue: 10657567\ny\n"])
+ self.assertEquals(1, self._CallMain("--buildbot"))
+ self._VerifyResults("test", "score", [
+ {"name": "Richards", "results": [], "stddev": ""},
+ {"name": "DeltaBlue", "results": ["10657567"], "stddev": ""},
+ ])
+ self._VerifyErrors(
+ ["Regexp \"^Richards: (.+)$\" didn't match for benchmark Richards.",
+ "Not all traces have the same number of results."])
+ self._VerifyMock(path.join("out", "Release", "d7"), "--flag", "run.js")
+
def testRegexpNoMatch(self):
self._WriteTestInput(V8_JSON)
self._MockCommand(["."], ["x\nRichaards: 1.234\nDeltaBlue: 10657567\ny\n"])
« no previous file with comments | « tools/run_benchmarks.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698