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='')
|
print(f' {test} ...', end='')
|
||||||
|
|
||||||
# flash firmware
|
# flash firmware. It may fail randomly, retry a few times
|
||||||
ret = globals()[f'flash_{flasher}'](item, fw)
|
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()
|
assert ret.returncode == 0, 'Flash failed\n' + ret.stdout.decode()
|
||||||
|
|
||||||
# run test
|
# run test
|
||||||
|
|
Loading…
Reference in New Issue