depends.py: disable part of the test jobs

Disable exclusive jobs that run with a single
config disabled. A lot more bugs should be found by running jobs with only one config
of a family enabled.
This will also lessen the burden on the CI.
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
Andrzej Kurek 2022-10-06 16:57:38 -04:00
parent fcbd2acbc2
commit fe46949686

View file

@ -281,28 +281,24 @@ An option O is turned off if config_settings[O] is False."""
class ExclusiveDomain: # pylint: disable=too-few-public-methods class ExclusiveDomain: # pylint: disable=too-few-public-methods
"""A domain consisting of a set of conceptually-equivalent settings. """A domain consisting of a set of conceptually-equivalent settings.
Establish a list of configuration symbols. For each symbol, run a test job Establish a list of configuration symbols. For each symbol, run a test job
with this symbol set and the others unset, and a test job with this symbol with this symbol set and the others unset."""
unset and the others set."""
def __init__(self, symbols, commands, exclude=None): def __init__(self, symbols, commands, exclude=None):
"""Build a domain for the specified list of configuration symbols. """Build a domain for the specified list of configuration symbols.
The domain contains two sets of jobs: jobs that enable one of the elements The domain contains a set of jobs that enable one of the elements
of symbols and disable the others, and jobs that disable one of the elements of symbols and disable the others.
of symbols and enable the others.
Each job runs the specified commands. Each job runs the specified commands.
If exclude is a regular expression, skip generated jobs whose description If exclude is a regular expression, skip generated jobs whose description
would match this regular expression.""" would match this regular expression."""
self.jobs = [] self.jobs = []
for invert in [False, True]:
base_config_settings = {} base_config_settings = {}
for symbol in symbols: for symbol in symbols:
base_config_settings[symbol] = invert base_config_settings[symbol] = False
for symbol in symbols: for symbol in symbols:
description = '!' + symbol if invert else symbol description = symbol
if exclude and re.match(exclude, description): if exclude and re.match(exclude, description):
continue continue
config_settings = base_config_settings.copy() config_settings = base_config_settings.copy()
config_settings[symbol] = not invert config_settings[symbol] = True
if not invert:
handle_exclusive_groups(config_settings, symbol) handle_exclusive_groups(config_settings, symbol)
turn_off_dependencies(config_settings) turn_off_dependencies(config_settings)
job = Job(description, config_settings, commands) job = Job(description, config_settings, commands)