]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Show valgrind results and error counts.
authorDarren Tucker <dtucker@dtucker.net>
Thu, 18 Jul 2019 21:43:07 +0000 (07:43 +1000)
committerDarren Tucker <dtucker@dtucker.net>
Thu, 18 Jul 2019 21:43:07 +0000 (07:43 +1000)
regress/test-exec.sh

index f699f34d696448beb84fe22d40f5260afdc73d4f..9708103016c479d26bb30d80ecc7769a75dab2bc 100644 (file)
@@ -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