Skip to content

Commit fef2bb0

Browse files
committed
twister: run as device, even if simulation is supported
Some hardware boards are supported in qemu as simulation platforms. If we are testing with the real hardware, make sure we treat this as a device and not as a simulator. First priority when initializing a handler is to check if device testing is requested, then we can handle the rest without --device-testing. Signed-off-by: Anas Nashif <[email protected]>
1 parent a9b3d93 commit fef2bb0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/pylib/twister/twisterlib/testinstance.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,11 @@ def setup_handler(self, env):
139139

140140
options = env.options
141141
handler = Handler(self, "")
142-
if self.platform.simulation != "na":
142+
if options.device_testing:
143+
handler = DeviceHandler(self, "device")
144+
handler.call_make_run = False
145+
handler.ready = True
146+
elif self.platform.simulation != "na":
143147
if self.platform.simulation == "qemu":
144148
handler = QEMUHandler(self, "qemu")
145149
handler.args.append(f"QEMU_PIPE={handler.get_fifo()}")
@@ -156,10 +160,6 @@ def setup_handler(self, env):
156160
handler.args.append("COVERAGE=1")
157161
handler.call_make_run = False
158162
handler.ready = True
159-
elif options.device_testing:
160-
handler = DeviceHandler(self, "device")
161-
handler.call_make_run = False
162-
handler.ready = True
163163

164164
if handler:
165165
handler.options = options

0 commit comments

Comments
 (0)