mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-21 20:38:57 +00:00
commands/run: update "--disable" option
--diable can now be used to disable both intruments and result_processors from the command line (overriding configuration files). Rename variable names to reflect this.
This commit is contained in:
parent
836ba1505f
commit
00d1d3d318
@ -72,17 +72,18 @@ class RunCommand(Command):
|
|||||||
workloads in the agenda will be ignored. This
|
workloads in the agenda will be ignored. This
|
||||||
option may be used to specify multiple IDs.
|
option may be used to specify multiple IDs.
|
||||||
""")
|
""")
|
||||||
self.parser.add_argument('--disable', action='append', dest='instruments_to_disable',
|
self.parser.add_argument('--disable', action='append', dest='augmentations_to_disable',
|
||||||
default=[],
|
default=[],
|
||||||
metavar='INSTRUMENT', help="""
|
metavar='INSTRUMENT', help="""
|
||||||
Specify an instrument to disable from the
|
Specify an instrument or result processor to
|
||||||
command line. This equivalent to adding
|
disable from the command line. This equivalent
|
||||||
"~{metavar}" to the instrumentation list in
|
to adding "~{metavar}" to the instrumentation
|
||||||
the agenda. This can be used to temporarily
|
list in the agenda. This can be used to
|
||||||
disable a troublesome instrument for a
|
temporarily disable a troublesome instrument
|
||||||
particular run without introducing permanent
|
for a particular run without introducing
|
||||||
change to the config (which one might then
|
permanent change to the config (which one
|
||||||
forget to revert). This option may be
|
might then forget to revert). This option may
|
||||||
|
be
|
||||||
specified multiple times.
|
specified multiple times.
|
||||||
""")
|
""")
|
||||||
|
|
||||||
@ -93,9 +94,9 @@ class RunCommand(Command):
|
|||||||
self.logger.debug('Version: {}'.format(get_wa_version()))
|
self.logger.debug('Version: {}'.format(get_wa_version()))
|
||||||
self.logger.debug('Command Line: {}'.format(' '.join(sys.argv)))
|
self.logger.debug('Command Line: {}'.format(' '.join(sys.argv)))
|
||||||
|
|
||||||
disabled_instruments = toggle_set(["~{}".format(i)
|
disabled_augmentations = toggle_set(["~{}".format(i)
|
||||||
for i in args.instruments_to_disable])
|
for i in args.augmentations_to_disable])
|
||||||
config.jobs_config.disable_instruments(disabled_instruments)
|
config.jobs_config.disable_augmentations(disabled_augmentations)
|
||||||
config.jobs_config.only_run_ids(args.only_run_ids)
|
config.jobs_config.only_run_ids(args.only_run_ids)
|
||||||
|
|
||||||
parser = AgendaParser()
|
parser = AgendaParser()
|
||||||
|
@ -1036,7 +1036,7 @@ class JobGenerator(object):
|
|||||||
self._enabled_processors = set()
|
self._enabled_processors = set()
|
||||||
self._read_enabled_instruments = False
|
self._read_enabled_instruments = False
|
||||||
self._read_enabled_processors = False
|
self._read_enabled_processors = False
|
||||||
self.disabled_instruments = []
|
self.disabled_augmentations = []
|
||||||
|
|
||||||
self.job_spec_template = obj_dict(not_in_dict=['name'])
|
self.job_spec_template = obj_dict(not_in_dict=['name'])
|
||||||
self.job_spec_template.name = "globally specified job spec configuration"
|
self.job_spec_template.name = "globally specified job spec configuration"
|
||||||
@ -1061,9 +1061,9 @@ class JobGenerator(object):
|
|||||||
def add_workload(self, workload):
|
def add_workload(self, workload):
|
||||||
self.root_node.add_workload(workload)
|
self.root_node.add_workload(workload)
|
||||||
|
|
||||||
def disable_instruments(self, instruments):
|
def disable_augmentations(self, augmentations):
|
||||||
#TODO: Validate
|
#TODO: Validate
|
||||||
self.disabled_instruments = ["~{}".format(i) for i in instruments]
|
self.disabled_augmentations = ["~{}".format(i) for i in augmentations]
|
||||||
|
|
||||||
def update_augmentations(self, value):
|
def update_augmentations(self, value):
|
||||||
for entry in value:
|
for entry in value:
|
||||||
@ -1099,7 +1099,7 @@ class JobGenerator(object):
|
|||||||
for workload_entry in workload_entries:
|
for workload_entry in workload_entries:
|
||||||
job_spec = create_job_spec(deepcopy(workload_entry), sections,
|
job_spec = create_job_spec(deepcopy(workload_entry), sections,
|
||||||
target_manager, self.plugin_cache,
|
target_manager, self.plugin_cache,
|
||||||
self.disabled_instruments)
|
self.disabled_augmentations)
|
||||||
if self.ids_to_run:
|
if self.ids_to_run:
|
||||||
for job_id in self.ids_to_run:
|
for job_id in self.ids_to_run:
|
||||||
if job_id in job_spec.id:
|
if job_id in job_spec.id:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user