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

Side by Side Diff: tools/run_perf.py

Issue 776223003: Correct clean up in android perf runner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 def PreExecution(self): 509 def PreExecution(self):
510 perf = perf_control.PerfControl(self.device) 510 perf = perf_control.PerfControl(self.device)
511 perf.SetHighPerfMode() 511 perf.SetHighPerfMode()
512 512
513 # Remember what we have already pushed to the device. 513 # Remember what we have already pushed to the device.
514 self.pushed = set() 514 self.pushed = set()
515 515
516 def PostExecution(self): 516 def PostExecution(self):
517 perf = perf_control.PerfControl(self.device) 517 perf = perf_control.PerfControl(self.device)
518 perf.SetDefaultPerfMode() 518 perf.SetDefaultPerfMode()
519 self.device.RunShellCommand( 519 self.device.RunShellCommand(["rm", "-rf", AndroidPlatform.DEVICE_DIR])
520 ["rm", "-rf", "*"],
521 cwd=AndroidPlatform.DEVICE_DIR,
522 )
523 520
524 def _PushFile(self, host_dir, file_name, target_rel="."): 521 def _PushFile(self, host_dir, file_name, target_rel="."):
525 file_on_host = os.path.join(host_dir, file_name) 522 file_on_host = os.path.join(host_dir, file_name)
526 file_on_device = os.path.join( 523 file_on_device = os.path.join(
527 AndroidPlatform.DEVICE_DIR, target_rel, file_name) 524 AndroidPlatform.DEVICE_DIR, target_rel, file_name)
528 525
529 # Only push files not yet pushed in one execution. 526 # Only push files not yet pushed in one execution.
530 if file_on_host in self.pushed: 527 if file_on_host in self.pushed:
531 return 528 return
532 else: 529 else:
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 671
675 if options.json_test_results: 672 if options.json_test_results:
676 results.WriteToFile(options.json_test_results) 673 results.WriteToFile(options.json_test_results)
677 else: # pragma: no cover 674 else: # pragma: no cover
678 print results 675 print results
679 676
680 return min(1, len(results.errors)) 677 return min(1, len(results.errors))
681 678
682 if __name__ == "__main__": # pragma: no cover 679 if __name__ == "__main__": # pragma: no cover
683 sys.exit(Main(sys.argv[1:])) 680 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