Skip to content

Commit

Permalink
Update MacOS.yml to use gnu-sed (#471)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcbarton authored Jan 20, 2025
1 parent 61c7aec commit aa14089
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/MacOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,7 @@ jobs:
brew upgrade --force
brew install eigen
brew install boost
brew install gnu-sed
pip install distro pytest
Expand Down Expand Up @@ -580,14 +581,14 @@ jobs:
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\(.*\)/#&/' {} \;
find . -name "*.py" -exec gsed -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
python -m pytest -n 1 -m "xfail" --runxfail -sv -ra --max-worker-restart 512 | tee test_crashed.log 2>&1 || true
git checkout .
echo ::endgroup::
echo ::group::XFAIL Test Logs
# 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=not \2/g' {} \;
find . -name "*.py" -exec gsed -i -E 's/(^ *)@mark.xfail\(run=(.*)/\1@mark.skipif(condition=not \2/g' {} \;
# See if we don't have an xfail that went away
python -m pytest --runxfail -sv -ra | tee test_xfailed.log 2>&1 || true
git checkout .
Expand Down

0 comments on commit aa14089

Please # to comment.