diff options
| author | hathach <[email protected]> | 2024-01-24 00:43:23 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-01-24 00:43:23 +0700 |
| commit | 82218c8d6875947fee29e9b9a0b48b87bb587281 (patch) | |
| tree | 45bf845b2c9511e127d5d68d3a0497660a208323 /test | |
| parent | 57bbf3ad2baf4e47ed2a501e80cf975f2dcafad1 (diff) | |
retry flashih a few time due to random failed by s3
Diffstat (limited to 'test')
| -rw-r--r-- | test/hil/hil_test.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index 7c662aeea..544a4eb39 100644 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -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 |
