Skip to content

Commit

Permalink
twister: change serial option existence verification
Browse files Browse the repository at this point in the history
Modify serial and serial_pty option availability verification in DTU
object in device_is_available method to avoid situation when empty string
passed as serial in hardware_map.yaml cause hang up Twister in this
place.

Fixes: zephyrproject-rtos#41169

Signed-off-by: Piotr Golyzniak <[email protected]>
  • Loading branch information
gopiotr committed Mar 18, 2022
1 parent ffdc621 commit 4e10883
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/pylib/twister/twisterlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def device_is_available(self, instance):
for d in self.suite.duts:
if fixture and fixture not in d.fixtures:
continue
if d.platform != device or not (d.serial or d.serial_pty):
if d.platform != device or (d.serial is None and d.serial_pty is None):
continue
d.lock.acquire()
avail = False
Expand Down

0 comments on commit 4e10883

Please sign in to comment.