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

Side by Side Diff: scripts/slave/recipe_modules/auto_bisect/config_validation.py

Issue 2352203002: [Bisect] Account for tir_label-level summaries in parse_metric (Closed)
Patch Set: fix typo ~_~ Created 4 years, 3 months 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 unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/config_validation_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import re 5 import re
6 6
7 # Note: this module is tested by a unit test config_validation_test.py, 7 # Note: this module is tested by a unit test config_validation_test.py,
8 # rather than recipe simulation tests. 8 # rather than recipe simulation tests.
9 9
10 _BISECT_CONFIG_SCHEMA = { 10 _BISECT_CONFIG_SCHEMA = {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 except ValueError: 99 except ValueError:
100 return # The revisions could be sha1 hashes. 100 return # The revisions could be sha1 hashes.
101 if earlier >= later: 101 if earlier >= later:
102 raise ValidationFail('Order of good_revision (%d) and bad_revision(%d) ' 102 raise ValidationFail('Order of good_revision (%d) and bad_revision(%d) '
103 'is reversed.' % (earlier, later)) 103 'is reversed.' % (earlier, later))
104 104
105 105
106 def _validate_metric(bisect_mode, metric): # pragma: no cover 106 def _validate_metric(bisect_mode, metric): # pragma: no cover
107 if bisect_mode not in ('mean', 'std_dev'): 107 if bisect_mode not in ('mean', 'std_dev'):
108 return 108 return
109 if not (isinstance(metric, basestring) and metric.count('/') == 1): 109 if not (isinstance(metric, basestring) and ((metric.count('/') == 1) or
110 (metric.count('/') == 2))):
110 raise ValidationFail('Invalid value for "metric": %s' % metric) 111 raise ValidationFail('Invalid value for "metric": %s' % metric)
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipe_modules/auto_bisect/config_validation_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698