Back to original

This commit is contained in:
Jerry Palacios
2024-02-07 17:03:13 -06:00
parent 17cd5e0952
commit 6c4a5292a6
74 changed files with 3852 additions and 2640 deletions

View File

@@ -364,8 +364,15 @@ 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:
print(f'Flashing failed, retry {i+1}')
time.sleep(1)
assert ret.returncode == 0, 'Flash failed\n' + ret.stdout.decode()
# run test