From 8d5a2a2fae284fba38a4d984af759f49a95604dd Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Mon, 7 Dec 2009 01:10:52 -0600 Subject: [PATCH] bug 532973: add a check-valgrind target that runs IPDL unit tests under valgrind. r=luser --- ipc/ipdl/test/cxx/Makefile.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ipc/ipdl/test/cxx/Makefile.in b/ipc/ipdl/test/cxx/Makefile.in index 5b1e22ae104f..a1e87b858838 100644 --- a/ipc/ipdl/test/cxx/Makefile.in +++ b/ipc/ipdl/test/cxx/Makefile.in @@ -86,8 +86,7 @@ include $(topsrcdir)/ipc/chromium/chromium-config.mk include $(topsrcdir)/config/rules.mk -RUNIPDLTEST := $(RUN_TEST_PROGRAM) $(DEPTH)/dist/bin/ipdlunittest$(BIN_SUFFIX) - +IPDLUNITTEST_BIN = $(DEPTH)/dist/bin/ipdlunittest$(BIN_SUFFIX) IPDLUnitTests.cpp : $(GENTESTER) $(TESTER_TEMPLATE) $(IPDLTESTHDRS) $(PYTHON) $< $(TESTER_TEMPLATE) $(IPDLTESTS) > $@ @@ -95,5 +94,13 @@ IPDLUnitTests.cpp : $(GENTESTER) $(TESTER_TEMPLATE) $(IPDLTESTHDRS) check:: @$(EXIT_ON_ERROR) \ for test in $(IPDLTESTS); do \ - $(RUNIPDLTEST) $$test ; \ + $(RUN_TEST_PROGRAM) $(IPDLUNITTEST_BIN) $$test ; \ + done + +check-valgrind:: + @$(EXIT_ON_ERROR) \ + for test in $(IPDLTESTS); do \ + $(RUN_TEST_PROGRAM) -g -d \ + valgrind -a '--leak-check=full --error-exitcode=1 --trace-children=yes -q' \ + $(IPDLUNITTEST_BIN) $$test ; \ done