Skip to content

Commit 9e091f3

Browse files
authored
[ci] Increase reliability by capturing the failure configuration (#96)
This chance improves the testing failures due tests that we expect will fail at that stage.
1 parent 196f230 commit 9e091f3

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,8 @@ jobs:
336336
if: runner.os == 'Linux'
337337
run: |
338338
# Install deps
339-
sudo apt update
340-
sudo apt install git g++ debhelper devscripts gnupg python3 valgrind
339+
sudo apt-get update
340+
sudo apt-get install git g++ debhelper devscripts gnupg python3 valgrind
341341
conda install -y -q -c conda-forge \
342342
distro \
343343
pytest
@@ -716,7 +716,6 @@ jobs:
716716
# We need PYTHONPATH later
717717
echo "PYTHONPATH=$PYTHONPATH" >> $GITHUB_ENV
718718
- name: Run the tests on Unix Systems
719-
continue-on-error: true
720719
if: ${{ (runner.os != 'windows') && (matrix.cppyy == 'On') }}
721720
run: |
722721
cd ..
@@ -728,20 +727,23 @@ jobs:
728727
python -m pip install --upgrade pip
729728
python -m pip install pytest
730729
python -m pip install pytest-xdist
730+
python -m pip install numba
731731
echo ::endgroup::
732+
echo ::group::Run complete test suite
733+
python -m pytest -sv | tee complete_testrun.log 2>&1
732734
echo ::group::Crashing Test Logs
733735
# See if we don't have a crash that went away
734736
# Comment out all xfails but the ones that have a run=False condition.
735737
find . -name "*.py" -exec sed -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
736-
python -m pytest -n 1 -m "xfail" --runxfail -sv --max-worker-restart 512 | tee test_crashed.log 2>&1
738+
python -m pytest -n 1 -m "xfail" --runxfail -sv --max-worker-restart 512 | tee test_crashed.log 2>&1 || true
737739
git checkout .
738740
echo ::endgroup::
739741
echo ::group::XFAIL Test Logs
740742
# Rewrite all xfails that have a run clause to skipif. This way we will
741743
# avoid conditionally crashing xfails
742744
find . -name "*.py" -exec sed -i -E 's/(^ *)@mark.xfail\(run=(.*)/\[email protected](condition=not \2/g' {} \;
743745
# See if we don't have an xfail that went away
744-
python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1
746+
python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1 || true
745747
git checkout .
746748
echo ::endgroup::
747749
echo ::group::Passing Test Logs
@@ -750,12 +752,20 @@ jobs:
750752
declare -i RETCODE=0
751753
752754
set -o pipefail
753-
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
755+
if [[ "${{ matrix.clang-runtime }}" == "17" || "${{ matrix.clang-runtime }}" == "18" ]] && [[ "${{ matrix.os }}" != "macos-14" ]]; then
756+
echo "Valgrind reports true for clang-runtime 17 or 18, due to memory leaks with LLVM"
757+
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v || true
758+
else
759+
echo "Running valgrind on passing tests"
760+
valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
761+
fi
754762
export RETCODE=+$?
755763
echo ::endgroup::
756764
757765
RETCODE=+$?
758766
767+
echo "Complete Test Suite Summary: \n"
768+
tail -n1 complete_testrun.log
759769
echo "Crashing Summary: \n"
760770
tail -n1 test_crashed.log
761771
echo "XFAIL Summary:"

0 commit comments

Comments
 (0)