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

Unified Diff: tools/unittests/run_benchmarks_test.py

Issue 313603002: Let benchmark runner exit with proper return codes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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 746d0eabf3bc9681ac39cb265c1240f451dbcb46..f627d434b4941d7cc5bd4930296766b8f6303bb6 100644
--- a/tools/unittests/run_benchmarks_test.py
+++ b/tools/unittests/run_benchmarks_test.py
@@ -125,7 +125,7 @@ class BenchmarksTest(unittest.TestCase):
self._test_input,
]
all_args += args
- run_benchmarks.Main(all_args)
+ return run_benchmarks.Main(all_args)
def _LoadResults(self):
with open(self._test_output) as f:
@@ -157,7 +157,7 @@ class BenchmarksTest(unittest.TestCase):
def testOneRun(self):
self._WriteTestInput(V8_JSON)
self._MockCommand(["."], ["x\nRichards: 1.234\nDeltaBlue: 10657567\ny\n"])
- self._CallMain()
+ self.assertEquals(0, self._CallMain())
self._VerifyResults("test", "score", [
{"name": "Richards", "results": ["1.234"]},
{"name": "DeltaBlue", "results": ["10657567"]},
@@ -174,7 +174,7 @@ class BenchmarksTest(unittest.TestCase):
self._MockCommand([".", "."],
["Richards: 100\nDeltaBlue: 200\n",
"Richards: 50\nDeltaBlue: 300\n"])
- self._CallMain()
+ self.assertEquals(0, self._CallMain())
self._VerifyResults("v8", "ms", [
{"name": "Richards", "results": ["50", "100"]},
{"name": "DeltaBlue", "results": ["300", "200"]},
@@ -192,7 +192,7 @@ class BenchmarksTest(unittest.TestCase):
self._MockCommand([".", "."],
["Richards: 100\nDeltaBlue: 200\n",
"Richards: 50\nDeltaBlue: 300\n"])
- self._CallMain()
+ self.assertEquals(0, self._CallMain())
self._VerifyResults("test", "score", [
{"name": "Richards", "results": ["50", "100"]},
{"name": "DeltaBlue", "results": ["300", "200"]},
@@ -209,7 +209,7 @@ class BenchmarksTest(unittest.TestCase):
"Simple: 3 ms.\n",
"Richards: 100\n",
"Richards: 50\n"])
- self._CallMain()
+ self.assertEquals(0, self._CallMain())
self.assertEquals([
{"units": "score",
"graphs": ["test", "Richards"],
@@ -235,7 +235,7 @@ class BenchmarksTest(unittest.TestCase):
def testBuildbot(self):
self._WriteTestInput(V8_JSON)
self._MockCommand(["."], ["Richards: 1.234\nDeltaBlue: 10657567\n"])
- self._CallMain("--buildbot")
+ self.assertEquals(0, self._CallMain("--buildbot"))
self._VerifyResults("test", "score", [
{"name": "Richards", "results": ["1.234"]},
{"name": "DeltaBlue", "results": ["10657567"]},
@@ -246,7 +246,7 @@ class BenchmarksTest(unittest.TestCase):
def testRegexpNoMatch(self):
self._WriteTestInput(V8_JSON)
self._MockCommand(["."], ["x\nRichaards: 1.234\nDeltaBlue: 10657567\ny\n"])
- self._CallMain()
+ self.assertEquals(1, self._CallMain())
self._VerifyResults("test", "score", [
{"name": "Richards", "results": []},
{"name": "DeltaBlue", "results": ["10657567"]},
« 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