mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 03:12:34 +01:00
list_or: chaniging how list_or_* functions work and adding a generic list_or
list_or_* functions (e.g. list_or_string) will now always return a list, however will accept lists or indivitual values. Also added a list_or() generator function, similar to what already exists for list_of().
This commit is contained in:
@@ -23,7 +23,7 @@ import itertools
|
||||
from wlauto import Instrument, Executable, Parameter
|
||||
from wlauto.exceptions import ConfigError
|
||||
from wlauto.utils.misc import ensure_file_directory_exists as _f
|
||||
from wlauto.utils.types import list_or_string, list_of_strs
|
||||
from wlauto.utils.types import arguments, list_of_strs
|
||||
|
||||
PERF_COMMAND_TEMPLATE = '{} stat {} {} sleep 1000 > {} 2>&1 '
|
||||
|
||||
@@ -71,7 +71,7 @@ class PerfInstrument(Instrument):
|
||||
Parameter('events', kind=list_of_strs, default=['migrations', 'cs'],
|
||||
constraint=(lambda x: x, 'must not be empty.'),
|
||||
description="""Specifies the events to be counted."""),
|
||||
Parameter('optionstring', kind=list_or_string, default='-a',
|
||||
Parameter('optionstring', kind=arguments, default='-a',
|
||||
description="""Specifies options to be used for the perf command. This
|
||||
may be a list of option strings, in which case, multiple instances of perf
|
||||
will be kicked off -- one for each option string. This may be used to e.g.
|
||||
|
Reference in New Issue
Block a user