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

Side by Side Diff: tools/run_benchmarks.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, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/unittests/run_benchmarks_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 the V8 project authors. All rights reserved. 2 # Copyright 2014 the V8 project authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 Performance runner for d8. 7 Performance runner for d8.
8 8
9 Call e.g. with tools/run-benchmarks.py --arch ia32 some_suite.json 9 Call e.g. with tools/run-benchmarks.py --arch ia32 some_suite.json
10 10
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 if len(args) == 0: # pragma: no cover 339 if len(args) == 0: # pragma: no cover
340 parser.print_help() 340 parser.print_help()
341 return 1 341 return 1
342 342
343 if options.arch in ["auto", "native"]: # pragma: no cover 343 if options.arch in ["auto", "native"]: # pragma: no cover
344 options.arch = ARCH_GUESS 344 options.arch = ARCH_GUESS
345 345
346 if not options.arch in SUPPORTED_ARCHS: # pragma: no cover 346 if not options.arch in SUPPORTED_ARCHS: # pragma: no cover
347 print "Unknown architecture %s" % options.arch 347 print "Unknown architecture %s" % options.arch
348 return False 348 return 1
349 349
350 workspace = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) 350 workspace = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
351 351
352 if options.buildbot: 352 if options.buildbot:
353 shell_dir = os.path.join(workspace, options.outdir, "Release") 353 shell_dir = os.path.join(workspace, options.outdir, "Release")
354 else: 354 else:
355 shell_dir = os.path.join(workspace, options.outdir, 355 shell_dir = os.path.join(workspace, options.outdir,
356 "%s.release" % options.arch) 356 "%s.release" % options.arch)
357 357
358 results = Results() 358 results = Results()
(...skipping 29 matching lines...) Expand all
388 yield output.stdout 388 yield output.stdout
389 389
390 # Let runnable iterate over all runs and handle output. 390 # Let runnable iterate over all runs and handle output.
391 results += runnable.Run(Runner) 391 results += runnable.Run(Runner)
392 392
393 if options.json_test_results: 393 if options.json_test_results:
394 results.WriteToFile(options.json_test_results) 394 results.WriteToFile(options.json_test_results)
395 else: # pragma: no cover 395 else: # pragma: no cover
396 print results 396 print results
397 397
398 return min(1, len(results.errors))
399
398 if __name__ == "__main__": # pragma: no cover 400 if __name__ == "__main__": # pragma: no cover
399 sys.exit(Main(sys.argv[1:])) 401 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | tools/unittests/run_benchmarks_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698