Skip to content

Commit 09ae917

Browse files
authored
Merge pull request #2424 from hathach/retry-hil-s3
Retry hil s3
2 parents f92c2c2 + 9d0df8e commit 09ae917

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.github/workflows/build_esp.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'examples/**'
99
- 'lib/**'
1010
- 'hw/**'
11+
- 'test/hil/**'
1112
- '.github/workflows/build_esp.yml'
1213
pull_request:
1314
branches: [ master ]
@@ -16,6 +17,7 @@ on:
1617
- 'examples/**'
1718
- 'lib/**'
1819
- 'hw/**'
20+
- 'test/hil/**'
1921
- '.github/workflows/build_esp.yml'
2022

2123
concurrency:

.github/workflows/build_iar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- 'lib/**'
1010
- 'hw/**'
1111
- 'tools/get_deps.py'
12+
- 'test/hil/**'
1213
- '.github/workflows/build_iar.yml'
1314
pull_request:
1415
branches: [ master ]
@@ -18,6 +19,7 @@ on:
1819
- 'lib/**'
1920
- 'hw/**'
2021
- 'tools/get_deps.py'
22+
- 'test/hil/**'
2123
- '.github/workflows/build_iar.yml'
2224

2325
concurrency:

.github/workflows/cmake_arm.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- 'examples/**'
99
- 'lib/**'
1010
- 'hw/**'
11+
- 'test/hil/**'
1112
- 'tools/get_deps.py'
1213
- '.github/workflows/cmake_arm.yml'
1314
pull_request:
@@ -17,6 +18,7 @@ on:
1718
- 'examples/**'
1819
- 'lib/**'
1920
- 'hw/**'
21+
- 'test/hil/**'
2022
- 'tools/get_deps.py'
2123
- '.github/workflows/cmake_arm.yml'
2224

test/hil/hil_test.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,15 @@ def main(config_file, board):
364364

365365
print(f' {test} ...', end='')
366366

367-
# flash firmware
368-
ret = globals()[f'flash_{flasher}'](item, fw)
367+
# flash firmware. It may fail randomly, retry a few times
368+
for i in range(3):
369+
ret = globals()[f'flash_{flasher}'](item, fw)
370+
if ret.returncode == 0:
371+
break
372+
else:
373+
print(f'Flashing failed, retry {i+1}')
374+
time.sleep(1)
375+
369376
assert ret.returncode == 0, 'Flash failed\n' + ret.stdout.decode()
370377

371378
# run test

0 commit comments

Comments
 (0)