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

Side by Side Diff: tools/run_perf.py

Issue 1080513002: [test-runner] Make perf runner robust for missing executable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | no next file » | 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-perf.py --arch ia32 some_suite.json 9 Call e.g. with tools/run-perf.py --arch ia32 some_suite.json
10 10
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 pass 479 pass
480 480
481 def PostExecution(self): 481 def PostExecution(self):
482 pass 482 pass
483 483
484 def PreTests(self, node, path): 484 def PreTests(self, node, path):
485 if isinstance(node, Runnable): 485 if isinstance(node, Runnable):
486 node.ChangeCWD(path) 486 node.ChangeCWD(path)
487 487
488 def Run(self, runnable, count): 488 def Run(self, runnable, count):
489 output = commands.Execute(runnable.GetCommand(self.shell_dir), 489 try:
490 timeout=runnable.timeout) 490 output = commands.Execute(runnable.GetCommand(self.shell_dir),
491 timeout=runnable.timeout)
492 except OSError as e:
493 print ">>> OSError (#%d):" % (count + 1)
494 print e
495 return ""
491 print ">>> Stdout (#%d):" % (count + 1) 496 print ">>> Stdout (#%d):" % (count + 1)
492 print output.stdout 497 print output.stdout
493 if output.stderr: # pragma: no cover 498 if output.stderr: # pragma: no cover
494 # Print stderr for debugging. 499 # Print stderr for debugging.
495 print ">>> Stderr (#%d):" % (count + 1) 500 print ">>> Stderr (#%d):" % (count + 1)
496 print output.stderr 501 print output.stderr
497 if output.timed_out: 502 if output.timed_out:
498 print ">>> Test timed out after %ss." % runnable.timeout 503 print ">>> Test timed out after %ss." % runnable.timeout
499 return output.stdout 504 return output.stdout
500 505
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 716
712 if options.json_test_results: 717 if options.json_test_results:
713 results.WriteToFile(options.json_test_results) 718 results.WriteToFile(options.json_test_results)
714 else: # pragma: no cover 719 else: # pragma: no cover
715 print results 720 print results
716 721
717 return min(1, len(results.errors)) 722 return min(1, len(results.errors))
718 723
719 if __name__ == "__main__": # pragma: no cover 724 if __name__ == "__main__": # pragma: no cover
720 sys.exit(Main(sys.argv[1:])) 725 sys.exit(Main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698