Skip to content

Commit 3da0d78

Browse files
committed
minor tweaking
1 parent 31c33ca commit 3da0d78

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/hil/hil_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,11 +162,13 @@ def flash_bossac(board, firmware):
162162
timeout = ENUM_TIMEOUT
163163
while timeout:
164164
if os.path.exists(port):
165-
time.sleep(0.5)
166165
break
167166
else:
168167
time.sleep(0.5)
169168
timeout = timeout - 0.5
169+
assert timeout, 'bossac bootloader is not available'
170+
# sleep a bit more for bootloader to be ready
171+
time.sleep(0.5)
170172
ret = subprocess.run(f'bossac --port {port} {board["flasher_args"]} -U -i -R -e -w {firmware}', shell=True, stdout=subprocess.PIPE,
171173
stderr=subprocess.STDOUT)
172174
return ret

0 commit comments

Comments
 (0)