mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 10:20:57 +00:00
retry flashih a few time due to random failed by s3
This commit is contained in:
parent
57bbf3ad2b
commit
82218c8d68
@ -364,8 +364,14 @@ def main(config_file, board):
|
||||
|
||||
print(f' {test} ...', end='')
|
||||
|
||||
# flash firmware
|
||||
ret = globals()[f'flash_{flasher}'](item, fw)
|
||||
# flash firmware. It may fail randomly, retry a few times
|
||||
for i in range(3):
|
||||
ret = globals()[f'flash_{flasher}'](item, fw)
|
||||
if ret.returncode == 0:
|
||||
break
|
||||
else:
|
||||
time.sleep(1)
|
||||
|
||||
assert ret.returncode == 0, 'Flash failed\n' + ret.stdout.decode()
|
||||
|
||||
# run test
|
||||
|
Loading…
x
Reference in New Issue
Block a user