Skip to content

Commit

Permalink
Run all tests including the xfailed we just commented
Browse files Browse the repository at this point in the history
  • Loading branch information
vgvassilev committed Jun 24, 2023
1 parent 4827643 commit 66aeb87
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,13 +271,19 @@ jobs:
echo ::endgroup::
echo ::group::Crashing Test Logs
# See if we don't have a crash that went away
# Comment out all xfails but the ones that have a run=False condition.
find . -name "*.py" -exec sed -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
git diff
python -m pytest -n 1 -m "xfail" --runxfail -sv --max-worker-restart 512 | tee test_crashed.log 2>&1
git checkout .
echo ::endgroup::
echo ::group::XFAIL Test Logs
# Comment out all xfails but the ones that have a run=False condition.
find . -name "*.py" -exec sed -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
# Rewrite all xfails that have a run clause to skipif. This way we will
# avoid conditionally crashing xfails
find . -name "*.py" -exec sed -i -E 's/(^ *)@mark.xfail\(run=(.*)/\1@mark.skipif(condition=\2/g' {} \;
git diff
# See if we don't have an xfail that went away
python -m pytest -m "xfail" --runxfail -sv | tee test_xfailed.log 2>&1
python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1
git checkout .
echo ::endgroup::
echo ::group::Passing Test Logs
Expand Down

0 comments on commit 66aeb87

Please sign in to comment.