mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
Clean up linux/tests Makefile a little. Fixes #1561.
git-svn-id: file:///svn/toku/tokudb@10316 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
9bdd6eaf62
commit
4be7c5d541
1 changed files with 14 additions and 3 deletions
|
@ -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)
|
||||||
|
|
||||||
%.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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue