aboutsummaryrefslogtreecommitdiff
path: root/crosperf/experiment_factory.py
diff options
context:
space:
mode:
Diffstat (limited to 'crosperf/experiment_factory.py')
-rw-r--r--crosperf/experiment_factory.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/crosperf/experiment_factory.py b/crosperf/experiment_factory.py
index c9c3e68a..60785fa3 100644
--- a/crosperf/experiment_factory.py
+++ b/crosperf/experiment_factory.py
@@ -174,12 +174,16 @@ class ExperimentFactory(object):
test_args = benchmark_settings.GetField('test_args')
# Rename benchmark name if 'story-filter' or 'story-tag-filter' specified
- # in test_args.
+ # in test_args. Make sure these two tags only appear once.
+ story_count = 0
for arg in test_args.split():
- if '--story-filter' in arg or '--story-tag-filter' in arg:
+ if '--story-filter=' in arg or '--story-tag-filter=' in arg:
+ story_count += 1
+ if story_count > 1:
+ raise RuntimeError("Only one story or story-tag filter allowed in "
+ "a single benchmark run")
# Rename benchmark name with an extension of 'story'-option
benchmark_name = '%s@@%s' % (benchmark_name, arg.split('=')[-1])
- break
# Check for duplicated benchmark name after renaming
if not benchmark_name in benchmark_names: