Commit 4eeb2770 authored by Yoni Fogel's avatar Yoni Fogel

closes[t:2505] Clean up makefiles. Remove support for old versions of valgrind (older than ~3.5)

git-svn-id: file:///svn/toku/tokudb@19137 c7de825b-a66e-492c-adef-691d508d4ae1
parent e667ae91
......@@ -104,18 +104,7 @@ check_test-assert$(BINSUF): test-assert$(BINSUF) $(PTHREAD_LOCAL)
check_brtloader-test$(BINSUF): EXTRA_ARGS=dir.brtloader-test
check_%: % $(PTHREAD_LOCAL)
ifeq ($(VGRIND),)
./$< $(VERBVERBOSE) $(EXTRA_ARGS) $(SUMMARIZE_CMD)
else
$(VGRIND) --log-file=$<.check.valgrind ./$< $(VERBVERBOSE) $(EXTRA_ARGS); \
if [ $$? -eq 0 ] ; then \
lines=`cat $<.check.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.check.valgrind; test 0 = 1; fi \
else \
cat $<.check.valgrind; test 0 = 1; \
fi \
$(SUMMARIZE_CMD)
endif
$(VGRIND) ./$< $(VERBVERBOSE) $(EXTRA_ARGS) $(SUMMARIZE_CMD)
benchmark-test.$(OEXT): ../brt.h ../brt-search.h ../../include/db.h
......
......@@ -345,29 +345,14 @@ endif
ABORTCODE=137
%.abortrecover: %.tdb$(BINSUF) $(PTHREAD_LOCAL)
ifeq ($(VGRIND),)
{ ./$< --test >$<.check.output 2>&1; } 2>/dev/null ;\
{ ./$< --test ; } ; \
if [ $$? -ne $(ABORTCODE) ] ; then \
echo $* --test did not return $(ABORTCODE); \
test 0 = 1; \
else \
./$< --recover >>$<.check.output 2>&1; \
$(VGRIND) ./$< --recover; \
fi \
$(MAYBEINVERTER) $(SUMMARIZE_CMD)
else
{ ./$< --test >$<.check.output 2>&1; } 2>/dev/null ;\
if [ $$? -ne $(ABORTCODE) ] ; then \
cat $<.check.output; test 0 = 1; \
else \
valgrind --quiet --error-exitcode=1 --leak-check=full --log-file=$<.check.valgrind ./$< --recover >>$<.check.output 2>&1; \
if [ $$? -ne 0 ] ; then \
cat $<.check.valgrind; test 0 = 1; \
else \
lines=`cat $<.check.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.check.valgrind; test 0 = 1; fi; \
fi \
fi \
$(MAYBEINVERTER) $(SUMMARIZE_CMD)
endif
.PHONY: %.recover
all.recover: $(patsubst %,test_log%.recover,$(TLRECOVER)) $(PTHREAD_LOCAL) ;
......
......@@ -188,15 +188,21 @@ SUPPRESSIONS=no
#Tools
VALGRIND=valgrind
VGRIND=$(VALGRIND) --quiet --error-exitcode=1 --leak-check=full --show-reachable=yes \
VGRIND_BASE=$(VALGRIND) --quiet --error-exitcode=1 \
--suppressions=$(TOKUROOT)newbrt/valgrind.suppressions \
--suppressions=$(TOKUROOT)src/tests/bdb.suppressions \
--gen-suppressions=$(SUPPRESSIONS) --num-callers=20
ifeq ($(DB_ATTACH),1)
VGRIND+=--db-attach=yes
VGRIND_BASE+=--db-attach=yes
endif
ifeq ($(TRACK_ORIGINS),1)
VGRIND+=--track-origins=yes
VGRIND_BASE+=--track-origins=yes
endif
VGRIND=$(VGRIND_BASE) --leak-check=full --show-reachable=yes
ifeq ($(VGRIND),)
VGRIND_NOMEM=
else
VGRIND_NOMEM=$(VGRIND_BASE)
endif
HGRIND=valgrind --quiet --tool=helgrind --error-exitcode=1
......
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