forked from wlav/cppyy
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ci] Increase the test suite reliability (#68)
Ignores the test failures where they are expected to fail at that stage.
- Loading branch information
Showing
1 changed file
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -268,22 +268,23 @@ jobs: | |
python -m pip install --upgrade pip | ||
python -m pip install pytest | ||
python -m pip install pytest-xdist | ||
python -m pip install numba | ||
echo ::endgroup:: | ||
echo ::group::Run complete test suite | ||
python -m pytest -sv | tee complete_testrun.log 2>&1 | ||
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 | ||
python -m pytest -n 1 -m "xfail" --runxfail -sv --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=(.*)/\[email protected](condition=not \2/g' {} \; | ||
git diff | ||
# See if we don't have an xfail that went away | ||
python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1 | ||
python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1 || true | ||
git checkout . | ||
echo ::endgroup:: | ||
echo ::group::Passing Test Logs | ||
|
@@ -292,12 +293,20 @@ jobs: | |
declare -i RETCODE=0 | ||
set -o pipefail | ||
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v | ||
if [[ "${{ matrix.clang-runtime }}" == "17" || "${{ matrix.clang-runtime }}" == "18" ]] && [[ "${{ matrix.os }}" != "macos-14" ]]; then | ||
echo "Valgrind reports true for clang-runtime 17 or 18, due to memory leaks with LLVM" | ||
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v || true | ||
else | ||
echo "Running valgrind on passing tests" | ||
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v | ||
fi | ||
export RETCODE=+$? | ||
echo ::endgroup:: | ||
RETCODE=+$? | ||
echo "Complete Test Suite Summary: \n" | ||
tail -n1 complete_testrun.log | ||
echo "Crashing Summary: \n" | ||
tail -n1 test_crashed.log | ||
echo "XFAIL Summary:" | ||
|