Skip to content

Commit 625246f

Browse files
nashifhenrikbrixandersen
authored andcommitted
twister: --device-testing always implies --filter runnable
--device-testing implies runnable tests, this was the case before the rework and was missed in one spot, so instead do that directly in the argument parser. Fixes #80428 Signed-off-by: Anas Nashif <[email protected]>
1 parent 7b701a4 commit 625246f

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

scripts/pylib/twister/twisterlib/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def add_parse_arguments(parser = None):
382382

383383
parser.add_argument(
384384
"--filter", choices=['buildable', 'runnable'],
385-
default='buildable',
385+
default='runnable' if "--device-testing" in sys.argv else 'buildable',
386386
help="""Filter tests to be built and executed. By default everything is
387387
built and if a test is runnable (emulation or a connected device), it
388388
is run. This option allows for example to only build tests that can

scripts/pylib/twister/twisterlib/testplan.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -644,9 +644,6 @@ def load_from_file(self, file, filter_platform=[]):
644644
if ts.get("run_id"):
645645
instance.run_id = ts.get("run_id")
646646

647-
if self.options.device_testing:
648-
self.options.filter = 'runnable'
649-
650647
instance.run = instance.check_runnable(
651648
self.options,
652649
self.hwm

0 commit comments

Comments
 (0)