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

Unified Diff: tools/run-bisect-perf-regression.py

Issue 697713003: Aborting bisect early when the bug specified in the bisect config is closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing type=str since it's the default and rebasing Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/auto_bisect/test_data/open.json ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run-bisect-perf-regression.py
diff --git a/tools/run-bisect-perf-regression.py b/tools/run-bisect-perf-regression.py
index 815d9574b2ef3037858f8ac73401ed42681c5726..4047f825f10f39cd15ecefc30bf404d499f32162 100755
--- a/tools/run-bisect-perf-regression.py
+++ b/tools/run-bisect-perf-regression.py
@@ -111,18 +111,18 @@ def _LoadConfigFile(config_file_path):
return {}
-def _ValidateConfigFile(config_contents, valid_parameters):
+def _ValidateConfigFile(config_contents, required_parameters):
"""Validates the config file contents, checking whether all values are
non-empty.
Args:
config_contents: A config dictionary.
- valid_parameters: A list of parameters to check for.
+ required_parameters: A list of parameters to check for.
Returns:
True if valid.
"""
- for parameter in valid_parameters:
+ for parameter in required_parameters:
if parameter not in config_contents:
return False
value = config_contents[parameter]
@@ -146,13 +146,13 @@ def _ValidatePerfConfigFile(config_contents):
Returns:
True if valid.
"""
- valid_parameters = [
+ required_parameters = [
'command',
'repeat_count',
'truncate_percent',
'max_time_minutes',
]
- return _ValidateConfigFile(config_contents, valid_parameters)
+ return _ValidateConfigFile(config_contents, required_parameters)
def _ValidateBisectConfigFile(config_contents):
@@ -167,7 +167,7 @@ def _ValidateBisectConfigFile(config_contents):
Returns:
True if valid.
"""
- valid_params = [
+ required_params = [
'command',
'good_revision',
'bad_revision',
@@ -176,7 +176,7 @@ def _ValidateBisectConfigFile(config_contents):
'truncate_percent',
'max_time_minutes',
]
- return _ValidateConfigFile(config_contents, valid_params)
+ return _ValidateConfigFile(config_contents, required_params)
def _OutputFailedResults(text_to_print):
@@ -210,6 +210,9 @@ def _CreateBisectOptionsFromConfig(config):
if config.has_key('improvement_direction'):
opts_dict['improvement_direction'] = int(config['improvement_direction'])
+ if config.has_key('bug_id') and str(config['bug_id']).isdigit():
+ opts_dict['bug_id'] = config['bug_id']
+
opts_dict['build_preference'] = 'ninja'
opts_dict['output_buildbot_annotations'] = True
@@ -409,6 +412,9 @@ def _RunBisectionScript(
if config.has_key('improvement_direction'):
cmd.extend(['-d', config['improvement_direction']])
+ if config.has_key('bug_id'):
+ cmd.extend(['--bug_id', config['bug_id']])
+
cmd.extend(['--build_preference', 'ninja'])
if '--browser=cros' in config['command']:
« no previous file with comments | « tools/auto_bisect/test_data/open.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698