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

Unified Diff: tools/variations/fieldtrial_util.py

Issue 2861493002: Revert of Fix perfbotnot feature param setting from trial testing config.
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/variations/fieldtrial_util_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/variations/fieldtrial_util.py
diff --git a/tools/variations/fieldtrial_util.py b/tools/variations/fieldtrial_util.py
index bc21d69d782dd69c6e9fa8c48f028fc4eae56735..024894ab21ea7f219151282a1878adbdcc5e158a 100644
--- a/tools/variations/fieldtrial_util.py
+++ b/tools/variations/fieldtrial_util.py
@@ -32,18 +32,14 @@
return duplicates
def _CheckForDuplicateFeatures(enable_features, disable_features):
- enable_features = [f.split('<')[0] for f in enable_features]
enable_features_set = set(enable_features)
if len(enable_features_set) != len(enable_features):
raise Exception('Duplicate feature(s) in enable_features: ' +
', '.join(_FindDuplicates(enable_features)))
-
- disable_features = [f.split('<')[0] for f in disable_features]
disable_features_set = set(disable_features)
if len(disable_features_set) != len(disable_features):
raise Exception('Duplicate feature(s) in disable_features: ' +
', '.join(_FindDuplicates(disable_features)))
-
features_in_both = enable_features_set.intersection(disable_features_set)
if len(features_in_both) > 0:
raise Exception('Conflicting features set as both enabled and disabled: ' +
@@ -83,10 +79,10 @@
param_list = [_escape(x) for x in param_list]
param = '%s:%s' % ('.'.join(selected_study), '/'.join(param_list))
params.append(param)
- for feature in experiment.get('enable_features', []):
- enable_features.append(feature + '<' + study_name)
- for feature in experiment.get('disable_features', []):
- disable_features.append(feature + '<' + study_name)
+ if 'enable_features' in experiment:
+ enable_features.extend(experiment['enable_features'])
+ if 'disable_features' in experiment:
+ disable_features.extend(experiment['disable_features'])
if not len(studies):
return []
@@ -95,9 +91,9 @@
if len(params):
args.append('--force-fieldtrial-params=%s' % ','.join(params))
if len(enable_features):
- args.append('--enable-features="%s"' % ','.join(enable_features))
+ args.append('--enable-features=%s' % ','.join(enable_features))
if len(disable_features):
- args.append('--disable-features="%s"' % ','.join(disable_features))
+ args.append('--disable-features=%s' % ','.join(disable_features))
return args
def main():
« no previous file with comments | « no previous file | tools/variations/fieldtrial_util_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698