Skip to content

Commit b18b71b

Browse files
authored
Auto-retry flaky MP tests (RustPython#7603)
1 parent fdb49d8 commit b18b71b

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,24 @@ jobs:
299299

300300
- name: Run flaky MP CPython tests
301301
run: |
302-
target/release/rustpython -m test -j 1 ${{ join(matrix.extra_test_args, ' ') }} --slowest --fail-env-changed --timeout 600 -v ${{ env.FLAKY_MP_TESTS }}
302+
for attempt in $(seq 1 5); do
303+
echo "::group::Attempt ${attempt}"
304+
305+
set +e
306+
target/release/rustpython -m test -j 1 ${{ join(matrix.extra_test_args, ' ') }} --slowest --fail-env-changed --timeout 600 -v ${{ env.FLAKY_MP_TESTS }}
307+
status=$?
308+
set -e
309+
310+
echo "::endgroup::"
311+
312+
if [ $status -eq 0 ]; then
313+
exit 0
314+
fi
315+
done
316+
317+
exit 1
303318
timeout-minutes: ${{ matrix.timeout }}
319+
shell: bash
304320
env:
305321
RUSTPYTHON_SKIP_ENV_POLLUTERS: true
306322

0 commit comments

Comments
 (0)