Original commit message from CVS:
parse output of valgrind and check for definitely lost, and error
out; somehow I was led to believe valgrind returns non-zero for
leaks, but I can't make it do that, so let's parse
+2005-08-21 Thomas Vander Stichele <thomas at apestaart dot org>
+
+ * check.mak:
+ parse output of valgrind and check for definitely lost, and error
+ out; somehow I was led to believe valgrind returns non-zero for
+ leaks, but I can't make it do that, so let's parse
+
2005-08-20 Thomas Vander Stichele <thomas at apestaart dot org>
* check.mak:
libtool --mode=execute \
$(VALGRIND_PATH) -q --suppressions=$(SUPPRESSIONS) \
--tool=memcheck --leak-check=yes --trace-children=yes \
- $*
+ $* > valgrind.log 2>&1
+ @if grep "tely lost" valgrind.log; then \
+ cat valgrind.log; \
+ rm valgrind.log; \
+ exit 1; \
+ fi
+ rm valgrind.log
# valgrind all tests
valgrind: $(TESTS)
if test "$$?" -ne 0; then \
echo "Valgrind error for test $$t"; \
failed=`expr $$failed + 1`; \
+ whicht="$$whicht $$t"; \
fi; \
done; \
if test "$$failed" -ne 0; then \
- echo "$$failed tests had leaks under valgrind"; \
+ echo "$$failed tests had leaks under valgrind:"; \
+ echo "$$whicht"; \
false; \
fi