OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium 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 """Run Performance Test Bisect Tool | 6 """Run Performance Test Bisect Tool |
7 | 7 |
8 This script is used by a try bot to run the src/tools/bisect-perf-regression.py | 8 This script is used by a try bot to run the src/tools/bisect-perf-regression.py |
9 script with the parameters specified in run-bisect-perf-regression.cfg. It will | 9 script with the parameters specified in run-bisect-perf-regression.cfg. It will |
10 check out a copy of the depot in a subdirectory 'bisect' of the working | 10 check out a copy of the depot in a subdirectory 'bisect' of the working |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 config: The config read from run-perf-test.cfg. | 347 config: The config read from run-perf-test.cfg. |
348 path_to_file: Path to the bisect-perf-regression.py script. | 348 path_to_file: Path to the bisect-perf-regression.py script. |
349 path_to_goma: Path to goma directory. | 349 path_to_goma: Path to goma directory. |
350 | 350 |
351 Returns: | 351 Returns: |
352 The exit code of bisect-perf-regression.py: 0 on success, otherwise 1. | 352 The exit code of bisect-perf-regression.py: 0 on success, otherwise 1. |
353 """ | 353 """ |
354 try: | 354 try: |
355 with Goma(path_to_goma) as _: | 355 with Goma(path_to_goma) as _: |
356 config['use_goma'] = bool(path_to_goma) | 356 config['use_goma'] = bool(path_to_goma) |
357 config['goma_dir'] = os.path.abspath(path_to_goma) | 357 if config['use_goma']: |
| 358 config['goma_dir'] = os.path.abspath(path_to_goma) |
358 _RunPerformanceTest(config, path_to_file) | 359 _RunPerformanceTest(config, path_to_file) |
359 return 0 | 360 return 0 |
360 except RuntimeError, e: | 361 except RuntimeError, e: |
361 bisect_utils.OutputAnnotationStepClosed() | 362 bisect_utils.OutputAnnotationStepClosed() |
362 _OutputFailedResults('Error: %s' % e.message) | 363 _OutputFailedResults('Error: %s' % e.message) |
363 return 1 | 364 return 1 |
364 | 365 |
365 | 366 |
366 def _RunBisectionScript( | 367 def _RunBisectionScript( |
367 config, working_directory, path_to_file, path_to_goma, path_to_extra_src, | 368 config, working_directory, path_to_file, path_to_goma, path_to_extra_src, |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 config, current_dir, opts.path_to_goma) | 566 config, current_dir, opts.path_to_goma) |
566 | 567 |
567 print ('Error: Could not load config file. Double check your changes to ' | 568 print ('Error: Could not load config file. Double check your changes to ' |
568 'run-bisect-perf-regression.cfg or run-perf-test.cfg for syntax ' | 569 'run-bisect-perf-regression.cfg or run-perf-test.cfg for syntax ' |
569 'errors.\n') | 570 'errors.\n') |
570 return 1 | 571 return 1 |
571 | 572 |
572 | 573 |
573 if __name__ == '__main__': | 574 if __name__ == '__main__': |
574 sys.exit(main()) | 575 sys.exit(main()) |
OLD | NEW |