From 1069f57f5cd6a44946dc13f9e4111faf11c2eb0d Mon Sep 17 00:00:00 2001 From: Dat Nguyen Duy Date: Wed, 4 Dec 2024 20:48:15 +0700 Subject: [PATCH] twister: fix issue twister with --device-testing on Windows There is an incorrect logic that causes twister with --device-testing to skip all tests on Windows. Correct the logical condition. Signed-off-by: Dat Nguyen Duy --- scripts/pylib/twister/twisterlib/testinstance.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pylib/twister/twisterlib/testinstance.py b/scripts/pylib/twister/twisterlib/testinstance.py index 7c3f340cbb73..d7b658c45475 100644 --- a/scripts/pylib/twister/twisterlib/testinstance.py +++ b/scripts/pylib/twister/twisterlib/testinstance.py @@ -264,9 +264,9 @@ def check_runnable(self, simulation = options.sim_name simulator = self.platform.simulator_by_name(simulation) - if os.name == 'nt': + if os.name == 'nt' and simulator: # running on simulators is currently supported only for QEMU on Windows - if (not simulator) or simulator.name not in ('na', 'qemu'): + if simulator.name not in ('na', 'qemu'): return False # check presence of QEMU on Windows