OLD | NEW |
(Empty) | |
| 1 #!/usr/bin/env python |
| 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 |
| 4 # found in the LICENSE file. |
| 5 |
| 6 """Run Performance Test Bisect Tool |
| 7 |
| 8 This script is used by a trybot to run the src/tools/bisect-perf-regression.py |
| 9 script with the parameters specified in run-bisect-perf-regression.cfg. |
| 10 |
| 11 |
| 12 """ |
| 13 |
| 14 import imp |
| 15 import os |
| 16 import subprocess |
| 17 import sys |
| 18 |
| 19 |
| 20 try: |
| 21 cfg_file = imp.load_source('config', 'run-bisect-perf-regression.cfg') |
| 22 |
| 23 # Change to /src |
| 24 os.chdir(os.path.join('..', '..')) |
| 25 |
| 26 |
| 27 cmd = [os.path.join('tools', 'bisect-perf-regression.py'), |
| 28 '-c', cfg_file.config['command'], |
| 29 '-g', cfg_file.config['good_revision'], |
| 30 '-b', cfg_file.config['bad_revision'], |
| 31 '-m', cfg_file.config['metric'], |
| 32 '--output_buildbot_annotations'] |
| 33 return_code = subprocess.call(cmd) |
| 34 |
| 35 if return_code: |
| 36 print 'Error: bisect-perf-regression.py returned with error %d' %\ |
| 37 return_code |
| 38 print |
| 39 sys.exit(1) |
| 40 except KeyError: |
| 41 print 'Error: Malformed config file.' |
| 42 print |
| 43 sys.exit(1) |
| 44 except TypeError: |
| 45 print 'Error: Could not load config parameters.' |
| 46 print |
| 47 sys.exit(1) |
| 48 except IOError: |
| 49 print 'Error: Could not load config file.' |
| 50 print |
| 51 sys.exit(1) |
| 52 |
OLD | NEW |