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

Side by Side Diff: tools/run_perf.py

Issue 776873005: Fix path construction in 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 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
527 if file_on_host in self.pushed: 527 if file_on_host in self.pushed:
528 return 528 return
529 else: 529 else:
530 self.pushed.add(file_on_host) 530 self.pushed.add(file_on_host)
531 531
532 logging.info("adb push %s %s" % (file_on_host, file_on_device)) 532 logging.info("adb push %s %s" % (file_on_host, file_on_device))
533 self.adb.Push(file_on_host, file_on_device) 533 self.adb.Push(file_on_host, file_on_device)
534 534
535 def PreTests(self, node, path): 535 def PreTests(self, node, path):
536 suite_dir = os.path.abspath(os.path.dirname(path)) 536 suite_dir = os.path.abspath(os.path.dirname(path))
537 bench_dir = os.path.join(suite_dir, 537 if node.path:
538 os.path.normpath(os.path.join(*node.path))) 538 bench_dir = os.path.join(suite_dir,
539 os.path.normpath(os.path.join(*node.path)))
540 else:
541 bench_dir = suite_dir
539 542
540 self._PushFile(self.shell_dir, node.binary) 543 self._PushFile(self.shell_dir, node.binary)
541 if isinstance(node, Runnable): 544 if isinstance(node, Runnable):
542 self._PushFile(bench_dir, node.main) 545 self._PushFile(bench_dir, node.main)
543 for resource in node.resources: 546 for resource in node.resources:
544 self._PushFile(bench_dir, resource) 547 self._PushFile(bench_dir, resource)
545 548
546 def Run(self, runnable, count): 549 def Run(self, runnable, count):
547 cache = cache_control.CacheControl(self.device) 550 cache = cache_control.CacheControl(self.device)
548 cache.DropRamCaches() 551 cache.DropRamCaches()
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 663
661 if options.json_test_results: 664 if options.json_test_results:
662 results.WriteToFile(options.json_test_results) 665 results.WriteToFile(options.json_test_results)
663 else: # pragma: no cover 666 else: # pragma: no cover
664 print results 667 print results
665 668
666 return min(1, len(results.errors)) 669 return min(1, len(results.errors))
667 670
668 if __name__ == "__main__": # pragma: no cover 671 if __name__ == "__main__": # pragma: no cover
669 sys.exit(Main(sys.argv[1:])) 672 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