parse output of valgrind and check for definitely lost, and error out; somehow...

parse output of valgrind and check for definitely lost, and error out; somehow I was led to believe valgrind returns ...

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
parent 4cc6f465
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:
......
......@@ -23,7 +23,13 @@ endif
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)
......@@ -35,9 +41,11 @@ 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment