Merge pull request #2424 from hathach/retry-hil-s3

Retry hil s3
This commit is contained in:
Ha Thach 2024-01-24 13:13:02 +07:00 committed by GitHub
commit 09ae91700c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 15 additions and 2 deletions

View File

@ -8,6 +8,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- '.github/workflows/build_esp.yml'
pull_request:
branches: [ master ]
@ -16,6 +17,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- '.github/workflows/build_esp.yml'
concurrency:

View File

@ -9,6 +9,7 @@ on:
- 'lib/**'
- 'hw/**'
- 'tools/get_deps.py'
- 'test/hil/**'
- '.github/workflows/build_iar.yml'
pull_request:
branches: [ master ]
@ -18,6 +19,7 @@ on:
- 'lib/**'
- 'hw/**'
- 'tools/get_deps.py'
- 'test/hil/**'
- '.github/workflows/build_iar.yml'
concurrency:

View File

@ -8,6 +8,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- 'tools/get_deps.py'
- '.github/workflows/cmake_arm.yml'
pull_request:
@ -17,6 +18,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- 'tools/get_deps.py'
- '.github/workflows/cmake_arm.yml'

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