summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-12-13 20:16:47 +0700
committerhathach <[email protected]>2023-12-13 20:16:47 +0700
commit3da0d781701c6bb121645d7631e2a690aaadb6bf (patch)
treec616abca44b799352a837841e91635f80757f660
parent31c33ca8530ed1115a956b39c853dceb56d307db (diff)
minor tweaking
-rw-r--r--test/hil/hil_test.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py
index 00751181e..7c662aeea 100644
--- a/test/hil/hil_test.py
+++ b/test/hil/hil_test.py
@@ -162,11 +162,13 @@ def flash_bossac(board, firmware):
timeout = ENUM_TIMEOUT
while timeout:
if os.path.exists(port):
- time.sleep(0.5)
break
else:
time.sleep(0.5)
timeout = timeout - 0.5
+ assert timeout, 'bossac bootloader is not available'
+ # sleep a bit more for bootloader to be ready
+ time.sleep(0.5)
ret = subprocess.run(f'bossac --port {port} {board["flasher_args"]} -U -i -R -e -w {firmware}', shell=True, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
return ret