| Index: tools/PRESUBMIT.py
|
| diff --git a/tools/PRESUBMIT.py b/tools/PRESUBMIT.py
|
| index 01572314c06b789f75696cab12e3b91a9cb309fe..b6710568e20e529dacbfb6b26bfcebb2dbb463fa 100644
|
| --- a/tools/PRESUBMIT.py
|
| +++ b/tools/PRESUBMIT.py
|
| @@ -9,14 +9,16 @@ details on the presubmit API built into gcl.
|
| """
|
|
|
| import imp
|
| +import os
|
|
|
| -def _ExamineBisectConfigFile(input_api, output_api):
|
| +def _ExamineConfigFiles(input_api):
|
| for f in input_api.AffectedFiles():
|
| - if not f.LocalPath().endswith('run-bisect-perf-regression.cfg'):
|
| + if (not f.LocalPath().endswith('run-bisect-perf-regression.cfg') and
|
| + not f.LocalPath().endswith('run-perf-test.cfg')):
|
| continue
|
|
|
| try:
|
| - cfg_file = imp.load_source('config', 'run-bisect-perf-regression.cfg')
|
| + cfg_file = imp.load_source('config', os.path.basename(f.LocalPath()))
|
|
|
| for k, v in cfg_file.config.iteritems():
|
| if v:
|
| @@ -27,7 +29,7 @@ def _ExamineBisectConfigFile(input_api, output_api):
|
| return None
|
|
|
| def _CheckNoChangesToBisectConfigFile(input_api, output_api):
|
| - results = _ExamineBisectConfigFile(input_api, output_api)
|
| + results = _ExamineConfigFiles(input_api)
|
| if results:
|
| return [output_api.PresubmitError(
|
| 'The bisection config file should only contain a config dict with '
|
|
|