From d7423017265c5ae6d0be39340feb6c9f016b1f71 Mon Sep 17 00:00:00 2001 From: Darren Tucker Date: Fri, 19 Jul 2019 07:43:07 +1000 Subject: [PATCH] Show valgrind results and error counts. --- regress/test-exec.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/regress/test-exec.sh b/regress/test-exec.sh index f699f34d6..970810301 100644 --- a/regress/test-exec.sh +++ b/regress/test-exec.sh @@ -591,15 +591,21 @@ 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 + VG_RESULTS=$(find $OBJ/valgrind-out -type f -print) + VG_RESULT_COUNT=0 + VG_ERROR_COUNT=0 + for i in $VG_RESULTS; do + if grep "ERROR SUMMARY" $i >/dev/null; then + VG_RESULT_COUNT=$(($VG_RESULT_COUNT + 1)) + if ! grep "ERROR SUMMARY: 0 errors" $i >/dev/null; then + VG_ERROR_COUNT=$(($VG_ERROR_COUNT + 1)) + RESULT=1 + verbose valgrind failure $i + cat $i + fi fi done + verbose valgrind results $VG_RESULT_COUNT errors $VG_ERROR_COUNT fi if [ $RESULT -eq 0 ]; then