Commit 96a3457b authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Clean up linux/tests Makefile a little. Fixes #1561.

git-svn-id: file:///svn/toku/tokudb@10316 c7de825b-a66e-492c-adef-691d508d4ae1
parent be048e4f
...@@ -11,6 +11,15 @@ ifeq ($(CC),icc) ...@@ -11,6 +11,15 @@ ifeq ($(CC),icc)
CFLAGS += -diag-disable 981 CFLAGS += -diag-disable 981
endif endif
HERE=linux/tests
ifeq ($(SUMMARIZE),1)
SUMMARIZE_CMD = ;if test $$? = 0; then printf "%-60sPASS\n" $(HERE)/$@; else printf "%-60sFAIL\n" $(HERE)/$@ ; test 0 = 1; fi
SUMMARIZE_SHOULD_FAIL= ;if test $$? = 0; then printf "%-60sXFAIL\n" $(HERE)/$@; else printf "%-60sXPASS\n" $(HERE)/$@ ; test 0 = 1; fi
INVERTER=;test $$? -ne 0
else
SUMMARIZE_CMD =
endif
all: $(TARGETS) all: $(TARGETS)
%: %.c %: %.c
...@@ -23,14 +32,16 @@ check: $(TARGETS) $(RUNTARGETS) ...@@ -23,14 +32,16 @@ check: $(TARGETS) $(RUNTARGETS)
%.tdbrun: % %.tdbrun: %
ifeq ($(VGRIND),) ifeq ($(VGRIND),)
./$< ./$< $(SUMMARIZE_CMD)
else else
$(VGRIND) --log-file=$<.valgrind ./$<; \ $(VGRIND) --log-file=$<.valgrind ./$<; \
if [ $$? = 0 ] ; then \ if [ $$? = 0 ] ; then \
grep "LEAK SUMMARY" $<.valgrind >/dev/null 2>&1; \ grep "LEAK SUMMARY" $<.valgrind >/dev/null 2>&1; \
if [ $$? = 0 ] ; then cat $<.valgrind; exit 1; fi \ if [ $$? = 0 ] ; then cat $<.valgrind; test 0 = 1; fi \
fi fi \
$(SUMMARIZE_CMD)
endif endif
clean: clean:
rm -rf $(TARGETS) *.valgrind rm -rf $(TARGETS) *.valgrind
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