diff options
Diffstat (limited to 'crosperf/experiment_file.py')
-rw-r--r-- | crosperf/experiment_file.py | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/crosperf/experiment_file.py b/crosperf/experiment_file.py index 41a2b809..57eb52dc 100644 --- a/crosperf/experiment_file.py +++ b/crosperf/experiment_file.py @@ -1,8 +1,6 @@ -# -*- coding: utf-8 -*- # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. - """The experiment file module. It manages the input file of crosperf.""" from __future__ import print_function @@ -99,7 +97,7 @@ class ExperimentFile(object): field = self._ParseField(reader) settings.SetField(field[0], field[1], field[2]) elif ExperimentFile._CLOSE_SETTINGS_RE.match(line): - return settings, settings_type + return settings raise EOFError('Unexpected EOF while parsing settings block.') @@ -114,15 +112,11 @@ class ExperimentFile(object): if not line: continue elif ExperimentFile._OPEN_SETTINGS_RE.match(line): - new_settings, settings_type = self._ParseSettings(reader) - # We will allow benchmarks with duplicated settings name for now. - # Further decision will be made when parsing benchmark details in - # ExperimentFactory.GetExperiment(). - if settings_type != 'benchmark': - if new_settings.name in settings_names: - raise SyntaxError( - "Duplicate settings name: '%s'." % new_settings.name) - settings_names[new_settings.name] = True + new_settings = self._ParseSettings(reader) + if new_settings.name in settings_names: + raise SyntaxError( + "Duplicate settings name: '%s'." % new_settings.name) + settings_names[new_settings.name] = True self.all_settings.append(new_settings) elif ExperimentFile._FIELD_VALUE_RE.match(line): field = self._ParseField(reader) @@ -166,22 +160,11 @@ class ExperimentFile(object): autotest_path = '' if autotest_field.assigned: autotest_path = autotest_field.GetString() - debug_field = settings.fields['debug_path'] - debug_path = '' - if debug_field.assigned: - debug_path = autotest_field.GetString() - perf_args_field = self.global_settings.fields['perf_args'] - perf_args = '' - if perf_args_field.assigned: - perf_args = perf_args_field.GetString() - image_path, autotest_path, debug_path = settings.GetXbuddyPath( - value, autotest_path, debug_path, board, chromeos_root, - 'quiet', perf_args) + image_path, autotest_path = settings.GetXbuddyPath( + value, autotest_path, board, chromeos_root, 'quiet') res += '\t#actual_image: %s\n' % image_path if not autotest_field.assigned: res += '\t#actual_autotest_path: %s\n' % autotest_path - if not debug_field.assigned: - res += '\t#actual_debug_path: %s\n' % debug_path res += '}\n\n' |