From: Thomas Vander Stichele Date: Sun, 21 Aug 2005 10:29:47 +0000 (+0000) Subject: parse output of valgrind and check for definitely lost, and error out; somehow I... X-Git-Tag: RELEASE-0_8_11~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2827052513b1aa41f4a2414c163cfd0f4790b43c;p=platform%2Fupstream%2Fgst-common.git 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 --- diff --git a/ChangeLog b/ChangeLog index 1a297b7..623078b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-08-21 Thomas Vander Stichele + + * 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 * check.mak: diff --git a/check.mak b/check.mak index 952fd29..1defa18 100644 --- a/check.mak +++ b/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