[cairo] [PATCH 3/8] Allow overriding Valgrind flags on the command line

Pavel Roskin proski at gnu.org
Sat Aug 12 22:57:52 PDT 2006


From: Pavel Roskin <proski at gnu.org>

Don't hardcode Valgrind flags in tests/Makefile.am so that
tests/Makefile doesn't need to be rebuilt to use different flags.  Not
everybody is looking for memory leaks.

Signed-off-by: Pavel Roskin <proski at gnu.org>
---

 test/Makefile.am |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/test/Makefile.am b/test/Makefile.am
index 7342391..cbe1a73 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -432,6 +432,10 @@ TARGETS = $(CAIRO_TEST_TARGET)
 
 TESTS_ENVIRONMENT = CAIRO_XFAIL_TESTS="$(XFAIL_TESTS)" CAIRO_TEST_TARGET="$(TARGETS)"
 
+VALGRIND_FLAGS = \
+	--tool=memcheck --suppressions=./.valgrind-suppressions \
+	--leak-check=yes --show-reachable=yes
+
 CLEANFILES =					\
 	*.ps					\
 	*.pdf					\
@@ -448,7 +452,7 @@ CLEANFILES =					\
 # Check tests under valgrind
 # Saves log to valgrind-log
 check-valgrind:
-	$(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_srcdir)/libtool --mode=execute valgrind --tool=memcheck --suppressions=./.valgrind-suppressions --leak-check=yes --show-reachable=yes' 2>&1 | tee valgrind-log
+	$(MAKE) $(AM_MAKEFLAGS) check TESTS_ENVIRONMENT='$(TESTS_ENVIRONMENT) $(top_srcdir)/libtool --mode=execute valgrind $(VALGRIND_FLAGS)' 2>&1 | tee valgrind-log
 
 # The following definitions both should work.
 #FAILED_TESTS = `grep -l '\<FAIL\>' $(TESTS:=.log) 2>/dev/null | sed -e 's/[.]log$$//' | xargs echo`


More information about the cairo mailing list