Chromium Code Reviews| Index: build/util/run-bisect-perf-regression.py |
| diff --git a/build/util/run-bisect-perf-regression.py b/build/util/run-bisect-perf-regression.py |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..8287bba6b05d128f7ff7a54dbf7b52b14e2c2f50 |
| --- /dev/null |
| +++ b/build/util/run-bisect-perf-regression.py |
| @@ -0,0 +1,50 @@ |
| +#!/usr/bin/env python |
| +# Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +"""Run Performance Test Bisect Tool |
| + |
| +This script is used by a trybot to run the src/tools/bisect-perf-regression.py |
| +script with the parameters specified in run-bisect-perf-regression.cfg. |
| + |
| + |
| +""" |
| + |
| +import subprocess |
| +import imp |
| +import sys |
| +import os |
|
tonyg
2013/02/14 01:03:43
alphabetize please
shatch
2013/02/14 23:00:34
Done.
|
| + |
| + |
| +try: |
| + cfg_file = imp.load_source('config', 'run-bisect-perf-regression.cfg') |
| + |
| + # Change to /src |
| + os.chdir('../../') |
|
tonyg
2013/02/14 01:03:43
os.chdir(os.path.join('..', '..'))
shatch
2013/02/14 23:00:34
Done.
|
| + |
| + cmd = ['./tools/bisect-perf-regression.py', |
|
tonyg
2013/02/14 01:03:43
Don't you need to pass --output_buildbot_annotatio
tonyg
2013/02/14 01:03:43
Please use os.path.join for the path to the bisect
shatch
2013/02/14 23:00:34
Done.
shatch
2013/02/14 23:00:34
Done.
|
| + '-c', cfg_file.config['command'], |
| + '-g', cfg_file.config['good_revision'], |
| + '-b', cfg_file.config['bad_revision'], |
| + '-m', cfg_file.config['metric']] |
| + return_code = subprocess.call(cmd) |
| + |
| + if return_code: |
| + print 'Error: bisect-perf-regression.py returned with error %d' %\ |
| + return_code |
| + sys.exit(1) |
| +except KeyError: |
| + print 'Error: Malformed config file.' |
| + sys.exit(1) |
| +except TypeError: |
| + print 'Error: Could not load config parameters.' |
| + sys.exit(1) |
| +except IOError: |
| + print 'Error: Could not load config file.' |
| + sys.exit(1) |
| + |