Fix valgrind output parser to look for " 0 bytes" instead of "0 bytes",

it was failing to catch leaks which are multiples of 10.
0.96
Török Edvin 16 years ago
parent cf0cd429e9
commit aa12dc2c4f
  1. 4
      unit_tests/valgrind_tests.sh

@ -21,14 +21,14 @@ parse_valgrindlog()
if test $NRUNS -eq `grep "ERROR SUMMARY: 0 errors" $1 | wc -l` && test `grep "FATAL:" $1|wc -l ` -eq 0; then
if test "$1" = "valgrind-race.log" ||
test $NRUNS -eq `grep "no leaks are possible" $1 | wc -l` ||
test `grep "lost:" $1 | grep -v "0 bytes" | wc -l` -eq 0; then
test `grep "lost:" $1 | grep -v " 0 bytes" | wc -l` -eq 0; then
if test -z "$GENSUPP"; then
rm -f $1;
fi
return
else
echo "*** Valgrind test FAILED, memory LEAKS detected ***"
grep "lost:" $1 | grep -v "0 bytes"
grep "lost:" $1 | grep -v " 0 bytes"
fi
else
if test "$1" = "valgrind-race.log" ; then

Loading…
Cancel
Save