File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -345,12 +345,18 @@ jobs:
345345 TESTS=$(printf '%s\n' "${ary[@]}" | tr '\n' ' ')
346346 HWSIM_RES=0 # Not set when command succeeds
347347 ./vm/parallel-vm.py ${{ env.hostap_debug_flags }} --nocurses $(nproc) $TESTS || HWSIM_RES=$?
348- if [ "$HWSIM_RES" -ne "0" ]; then
349- # Let's re-run the failing tests. We gather the failed tests from the log file.
350- FAILED_TESTS=$(grep 'failed tests' /tmp/hwsim-test-logs/*-parallel.log | sed 's/failed tests: //' | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
351- printf 'failed tests: %s\n' "$FAILED_TESTS"
352- ./vm/parallel-vm.py ${{ env.hostap_debug_flags }} --nocurses $(nproc) $FAILED_TESTS
353- fi
348+ # Retry failing tests up to 2 times to mitigate flakiness in the
349+ # upstream hostap tests themselves.
350+ for i in 1 2; do
351+ if [ "$HWSIM_RES" -ne "0" ]; then
352+ # Let's re-run the failing tests. We gather the failed tests from the log file.
353+ FAILED_TESTS=$(grep 'failed tests' /tmp/hwsim-test-logs/*-parallel.log | sed 's/failed tests: //' | tr ' ' '\n' | sort | uniq | tr '\n' ' ')
354+ printf 'failed tests (retry %d): %s\n' "$i" "$FAILED_TESTS"
355+ rm -r /tmp/hwsim-test-logs
356+ HWSIM_RES=0
357+ ./vm/parallel-vm.py ${{ env.hostap_debug_flags }} --nocurses $(nproc) $FAILED_TESTS || HWSIM_RES=$?
358+ fi
359+ done
354360 rm -r /tmp/hwsim-test-logs
355361 done < $GITHUB_WORKSPACE/wolfssl/.github/workflows/hostap-files/configs/${{ matrix.config.hostap_ref }}/tests
356362
You can’t perform that action at this time.
0 commit comments