Commit a002c6e0 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

look for memory leaks that valgrind may find by running valgrind with a log...

look for memory leaks that valgrind may find by running valgrind with a log file and examining it for errors [t:1496]

git-svn-id: file:///svn/toku/tokudb@14289 c7de825b-a66e-492c-adef-691d508d4ae1
parent 9884077e
......@@ -40,10 +40,10 @@ check: $(TARGETS) $(RUNTARGETS);
ifeq ($(VGRIND),)
./$< $(SUMMARIZE_CMD)
else
$(VGRIND) --log-file=$<.valgrind ./$<; \
$(VGRIND) --error-exitcode=1 --quiet --leak-check=full --log-file=$<.valgrind ./$<; \
if [ $$? = 0 ] ; then \
grep "LEAK SUMMARY" $<.valgrind >/dev/null 2>&1; \
if [ $$? = 0 ] ; then cat $<.valgrind; test 0 = 1; fi \
lines=`cat $<.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.valgrind; test 0 = 1; fi \
fi \
$(SUMMARIZE_CMD)
endif
......
......@@ -159,7 +159,16 @@ check_test-assert$(BINSUF): test-assert$(BINSUF) $(PTHREAD_LOCAL)
$(VGRIND) ./$< ok $(SUMMARIZE_CMD)
check_%: % $(PTHREAD_LOCAL)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
ifeq ($(VGRIND),)
./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
else
$(VGRIND) --log-file=$<.check.valgrind ./$< $(VERBVERBOSE); \
if [ $$? -eq 0 ] ; then \
lines=`cat $<.check.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.check.valgrind; test 0 = 1; fi \
fi \
$(SUMMARIZE_CMD)
endif
benchmark-test.$(OEXT): ../brt.h ../brt-search.h ../../include/db.h
......@@ -168,7 +177,7 @@ clean:
rm -rf log-test7.c.dir_*
rm -rf *.dir
rm -f cachetable-fd-test.ctest2.data test_oexcl.c.tmp
rm -f *.brt *.clean *.dirty *.tdb *.dat *.data *.out
rm -f *.brt *.clean *.dirty *.tdb *.dat *.data *.out *.check.valgrind
$(BINS): $(LINK_FILES)
$(BINS): test.h
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