@@ -203,6 +203,10 @@ jobs:
203
203
../
204
204
fi
205
205
cmake --build . --target check-cppinterop --parallel $(nproc --all)
206
+ cppyy_on="${{ matrix.cppyy }}"
207
+ if [[ "${cppyy_on^^}" != "ON" ]]; then
208
+ valgrind --error-exitcode=1 unittests/CppInterOp/CppInterOpTests 2>&1 >/dev/null
209
+ fi
206
210
cd ..
207
211
# We need CB_PYTHON_DIR later
208
212
echo "CB_PYTHON_DIR=$CB_PYTHON_DIR" >> $GITHUB_ENV
@@ -281,25 +285,37 @@ jobs:
281
285
echo ::endgroup::
282
286
echo ::group::Crashing Test Logs
283
287
# See if we don't have a crash that went away
284
- python -m pytest -n 1 -m "crashes" -sv --max-worker-restart 512 | tee test_crashed.log 2>&1
288
+ # Comment out all xfails but the ones that have a run=False condition.
289
+ find . -name "*.py" -exec sed -i '/run=False/!s/^ *@mark.xfail\(.*\)/#&/' {} \;
290
+ python -m pytest -n 1 -m "xfail" --runxfail -sv --max-worker-restart 512 | tee test_crashed.log 2>&1
291
+ git checkout .
285
292
echo ::endgroup::
286
293
echo ::group::XFAIL Test Logs
294
+ # Rewrite all xfails that have a run clause to skipif. This way we will
295
+ # avoid conditionally crashing xfails
296
+ find . -name "*.py" -exec sed -i -E 's/(^ *)@mark.xfail\(run=(.*)/\[email protected] (condition=not \2/g' {} \;
287
297
# See if we don't have an xfail that went away
288
- python -m pytest -m "not crashes" --runxfail -s | tee test_xfailed.log 2>&1
298
+ python -m pytest --runxfail -sv | tee test_xfailed.log 2>&1
299
+ git checkout .
289
300
echo ::endgroup::
290
301
echo ::group::Passing Test Logs
302
+
291
303
# Run the rest of the non-crashing tests.
292
- declare -i PYTEST_RETCODE=0
293
- #python -m pytest -m "not crashes" -v | tee test_passing.log 2>&1
294
- valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not crashes and not xfail" -v
295
- export PYTEST_RETCODE=+$?
304
+ declare -i RETCODE=0
305
+
306
+ set -o pipefail
307
+ valgrind --error-exitcode=1 --suppressions=../etc/valgrind-cppyy-cling.supp python -m pytest -m "not xfail" -v
308
+ export RETCODE=+$?
296
309
echo ::endgroup::
310
+
311
+ RETCODE=+$?
312
+
297
313
echo "Crashing Summary: \n"
298
314
tail -n1 test_crashed.log
299
315
echo "XFAIL Summary:"
300
316
tail -n1 test_xfailed.log
301
- echo "Passing Summary: "
302
- tail -n1 test_passing.log
317
+ echo "Return Code: ${RETCODE} "
318
+ exit $RETCODE
303
319
- name : Show debug info
304
320
if : ${{ failure() }}
305
321
run : |
0 commit comments