Skip to content

Commit be682e2

Browse files
PerMacnashif
authored andcommitted
twister: allow using west-flash with 'erase'
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 <[email protected]>
1 parent f76f292 commit be682e2

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

scripts/pylib/twister/twisterlib/runner.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -501,17 +501,11 @@ def parse_generated(self, filter_stages=[]):
501501
if self.testsuite.sysbuild and self.env.options.device_testing:
502502
# Verify that twister's arguments support sysbuild.
503503
# Twister sysbuild flashing currently only works with west, so
504-
# --west-flash must be passed. Additionally, erasing the DUT
505-
# before each test with --west-flash=--erase will inherently not
506-
# work with sysbuild.
504+
# --west-flash must be passed.
507505
if self.env.options.west_flash is None:
508506
logger.warning("Sysbuild test will be skipped. " +
509507
"West must be used for flashing.")
510508
return {os.path.join(self.platform.name, self.testsuite.name): True}
511-
elif "--erase" in self.env.options.west_flash:
512-
logger.warning("Sysbuild test will be skipped, " +
513-
"--erase is not supported with --west-flash")
514-
return {os.path.join(self.platform.name, self.testsuite.name): True}
515509

516510
if self.testsuite and self.testsuite.filter:
517511
try:

scripts/tests/twister/test_runner.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -554,20 +554,6 @@ def mock_popen(*args, **kwargs):
554554
['Sysbuild test will be skipped. West must be used for flashing.'],
555555
{os.path.join('other', 'dummy.testsuite.name'): True}
556556
),
557-
(
558-
'other', ['other'], True,
559-
False, ['--erase'], True,
560-
'Dummy parse results', True,
561-
None,
562-
None,
563-
{},
564-
{},
565-
None,
566-
b'dummy edt pickle contents',
567-
['Sysbuild test will be skipped,' \
568-
' --erase is not supported with --west-flash'],
569-
{os.path.join('other', 'dummy.testsuite.name'): True}
570-
),
571557
(
572558
'other', ['other'], False,
573559
True, None, False,
@@ -651,7 +637,7 @@ def mock_popen(*args, **kwargs):
651637
' expected_logs, expected_return',
652638
TESTDATA_3,
653639
ids=['unit testing', 'domain', 'kconfig', 'no cache',
654-
'no west options', 'erase west flash option', 'no edt',
640+
'no west options', 'no edt',
655641
'parse result', 'no parse result', 'no testsuite filter', 'parse err']
656642
)
657643
def test_filterbuilder_parse_generated(

0 commit comments

Comments
 (0)