summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/hil/hil_test.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index f23e2fc22..d50a60894 100755
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -102,6 +102,8 @@ def get_serial_dev(id, vendor_str, product_str, ifnum):
# just use id: mostly for cp210x/ftdi flasher
pattern = f'/dev/serial/by-id/usb-*_{id}-if*'
port_list = glob.glob(pattern)
+ if len(port_list) == 0:
+ raise RuntimeError(f'No serial device found for {pattern}')
return port_list[0]