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 <dat.nguyenduy@nxp.com>
This commit is contained in:
Dat Nguyen Duy 2024-12-04 20:48:15 +07:00 committed by Anas Nashif
commit 1069f57f5c

View file

@ -264,9 +264,9 @@ class TestInstance:
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