From dfe7166b5ed6a7a9aecf465944da3b1af24c7b3e Mon Sep 17 00:00:00 2001 From: Aaron Jomy <75925957+maximusron@users.noreply.github.com> Date: Thu, 25 Apr 2024 17:28:45 +0200 Subject: [PATCH 1/2] [ci] Update cppyy testing job - This makes the CI up to date with the cppyy-backend and CppInterOp repositories --- .github/workflows/ci.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bc080cc..2a187233 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 -m "xfail" --runxfail -sv | 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' {} \; - 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:" From f488462f3e093f531893ac092a5726a3e97ccd53 Mon Sep 17 00:00:00 2001 From: Aaron Jomy <75925957+maximusron@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:57:06 +0200 Subject: [PATCH 2/2] Restart workers for crashing tests --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a187233..4d801d2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -276,7 +276,7 @@ jobs: # 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\(.*\)/#&/' {} \; - python -m pytest -m "xfail" --runxfail -sv | tee test_crashed.log 2>&1 || true + 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