Skip to content

Commit

Permalink
Merge pull request #2424 from hathach/retry-hil-s3
Browse files Browse the repository at this point in the history
Retry hil s3
  • Loading branch information
hathach authored Jan 24, 2024
2 parents f92c2c2 + 9d0df8e commit 09ae917
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_esp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- '.github/workflows/build_esp.yml'
pull_request:
branches: [ master ]
Expand All @@ -16,6 +17,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- '.github/workflows/build_esp.yml'

concurrency:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build_iar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- 'lib/**'
- 'hw/**'
- 'tools/get_deps.py'
- 'test/hil/**'
- '.github/workflows/build_iar.yml'
pull_request:
branches: [ master ]
Expand All @@ -18,6 +19,7 @@ on:
- 'lib/**'
- 'hw/**'
- 'tools/get_deps.py'
- 'test/hil/**'
- '.github/workflows/build_iar.yml'

concurrency:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cmake_arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- 'tools/get_deps.py'
- '.github/workflows/cmake_arm.yml'
pull_request:
Expand All @@ -17,6 +18,7 @@ on:
- 'examples/**'
- 'lib/**'
- 'hw/**'
- 'test/hil/**'
- 'tools/get_deps.py'
- '.github/workflows/cmake_arm.yml'

Expand Down
11 changes: 9 additions & 2 deletions test/hil/hil_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 09ae917

Please sign in to comment.