This runs the test suite under valgrind and complains if any
errors are detected.
Signed-off-by: NeilBrown <neilb@suse.de>
test: wiggle dotest
./dotest
+valgrind: wiggle dotest
+ ./dotest valgrind
+
wiggle.man : wiggle.1
nroff -man wiggle.1 > wiggle.man
then :
else TIME=
fi
-#TIME=valgrind
+vallog=/tmp/valg.log-$$
+> $vallog
+if [ " $1" = " valgrind" ]; then
+ TIME="valgrind --log-file=$vallog"
+fi
status=0
ok=0
fail=0
;;
esac
if [ $xit = 0 ]; then msg=SUCCEEDED; else msg=FAILED; fi
+ if grep 'ERROR SUMMARY: [1-9]' $vallog > /dev/null 2>&1
+ then msg="$msg WITH VALGRIND ERRORS"; xit=1
+ fi
echo $path $msg `grep -v 'Command exited' .time 2> /dev/null`
rm -f .time
exit $xit