Show valgrind results and error counts.

This commit is contained in:
Darren Tucker 2019-07-19 07:43:07 +10:00
parent 22b9b3e944
commit d742301726

View 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