From a192021fedead23c375077f92346336d531f8cad Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Thu, 18 Jul 2019 11:09:38 +1000 Subject: Fail tests if Valgrind enabled and reports errors. Also dump the failing valgrind report to stdout (not the cleanest solution, but better than nothing). --- regress/test-exec.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/regress/test-exec.sh b/regress/test-exec.sh index a0bff3112..f699f34d6 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -587,6 +587,21 @@ start_sshd () # kill sshd cleanup + +if [ "x$USE_VALGRIND" != "x" ]; then + # wait for any running process to complete + wait; sleep 1 + VG_ERROR=0 + for i in $OBJ/valgrind-out/*; do + if grep "ERROR SUMMARY" $i >/dev/null && \ + ! grep "ERROR SUMMARY: 0 errors" $i >/dev/null; then + RESULT=1 + verbose valgrind failure $i + cat $i + fi + done +fi + if [ $RESULT -eq 0 ]; then verbose ok $tid else -- cgit v1.2.3