Revision: 21648
Author: [email protected]
Date: Tue Jun 3 14:58:52 2014 UTC
Log: Let benchmark runner exit with proper return codes.
BUG=374740
LOG=n
[email protected]
Review URL: https://codereview.chromium.org/313603002
http://code.google.com/p/v8/source/detail?r=21648
Modified:
/branches/bleeding_edge/tools/run_benchmarks.py
/branches/bleeding_edge/tools/unittests/run_benchmarks_test.py
=======================================
--- /branches/bleeding_edge/tools/run_benchmarks.py Wed May 28 13:05:17
2014 UTC
+++ /branches/bleeding_edge/tools/run_benchmarks.py Tue Jun 3 14:58:52
2014 UTC
@@ -345,7 +345,7 @@
if not options.arch in SUPPORTED_ARCHS: # pragma: no cover
print "Unknown architecture %s" % options.arch
- return False
+ return 1
workspace =
os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
@@ -395,5 +395,7 @@
else: # pragma: no cover
print results
+ return min(1, len(results.errors))
+
if __name__ == "__main__": # pragma: no cover
sys.exit(Main(sys.argv[1:]))
=======================================
--- /branches/bleeding_edge/tools/unittests/run_benchmarks_test.py Wed May
28 13:05:17 2014 UTC
+++ /branches/bleeding_edge/tools/unittests/run_benchmarks_test.py Tue Jun
3 14:58:52 2014 UTC
@@ -125,7 +125,7 @@
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 @@
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 @@
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 @@
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 @@
"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 @@
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 @@
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"]},
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.