From aa14089322d2c4ea81b867862dbf02a5e9ec927c Mon Sep 17 00:00:00 2001 From: mcbarton Date: Mon, 20 Jan 2025 11:41:19 +0000 Subject: [PATCH] Update MacOS.yml to use gnu-sed (#471) --- .github/workflows/MacOS.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/MacOS.yml b/.github/workflows/MacOS.yml index faed5dba9..0bae1d6e5 100644 --- a/.github/workflows/MacOS.yml +++ b/.github/workflows/MacOS.yml @@ -444,6 +444,7 @@ jobs: brew upgrade --force brew install eigen brew install boost + brew install gnu-sed pip install distro pytest @@ -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 .