Skip to content

Commit

Permalink
twister: allow using west-flash with 'erase'
Browse files Browse the repository at this point in the history
Using `erase` with west-flash was blocked as it was
messing with sysbuild. With #69748 the issue is fixed, hence
'erase' is no longer blocked.
Remove obsolete twister test

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
  • Loading branch information
PerMac authored and nashif committed May 11, 2024
1 parent f76f292 commit be682e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
8 changes: 1 addition & 7 deletions scripts/pylib/twister/twisterlib/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,17 +501,11 @@ def parse_generated(self, filter_stages=[]):
if self.testsuite.sysbuild and self.env.options.device_testing:
# Verify that twister's arguments support sysbuild.
# Twister sysbuild flashing currently only works with west, so
# --west-flash must be passed. Additionally, erasing the DUT
# before each test with --west-flash=--erase will inherently not
# work with sysbuild.
# --west-flash must be passed.
if self.env.options.west_flash is None:
logger.warning("Sysbuild test will be skipped. " +
"West must be used for flashing.")
return {os.path.join(self.platform.name, self.testsuite.name): True}
elif "--erase" in self.env.options.west_flash:
logger.warning("Sysbuild test will be skipped, " +
"--erase is not supported with --west-flash")
return {os.path.join(self.platform.name, self.testsuite.name): True}

if self.testsuite and self.testsuite.filter:
try:
Expand Down
16 changes: 1 addition & 15 deletions scripts/tests/twister/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -554,20 +554,6 @@ def mock_popen(*args, **kwargs):
['Sysbuild test will be skipped. West must be used for flashing.'],
{os.path.join('other', 'dummy.testsuite.name'): True}
),
(
'other', ['other'], True,
False, ['--erase'], True,
'Dummy parse results', True,
None,
None,
{},
{},
None,
b'dummy edt pickle contents',
['Sysbuild test will be skipped,' \
' --erase is not supported with --west-flash'],
{os.path.join('other', 'dummy.testsuite.name'): True}
),
(
'other', ['other'], False,
True, None, False,
Expand Down Expand Up @@ -651,7 +637,7 @@ def mock_popen(*args, **kwargs):
' expected_logs, expected_return',
TESTDATA_3,
ids=['unit testing', 'domain', 'kconfig', 'no cache',
'no west options', 'erase west flash option', 'no edt',
'no west options', 'no edt',
'parse result', 'no parse result', 'no testsuite filter', 'parse err']
)
def test_filterbuilder_parse_generated(
Expand Down

0 comments on commit be682e2

Please sign in to comment.