From 4be7c5d541f914bda323be9b0211085a80d90cc7 Mon Sep 17 00:00:00 2001 From: "Bradley C. Kuszmaul" Date: Tue, 16 Apr 2013 23:57:44 -0400 Subject: [PATCH] Clean up linux/tests Makefile a little. Fixes #1561. git-svn-id: file:///svn/toku/tokudb@10316 c7de825b-a66e-492c-adef-691d508d4ae1 --- linux/tests/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/linux/tests/Makefile b/linux/tests/Makefile index 8c3be9d7ff0..c53382f2f95 100644 --- a/linux/tests/Makefile +++ b/linux/tests/Makefile @@ -11,6 +11,15 @@ ifeq ($(CC),icc) CFLAGS += -diag-disable 981 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) %: %.c @@ -23,14 +32,16 @@ check: $(TARGETS) $(RUNTARGETS) %.tdbrun: % ifeq ($(VGRIND),) - ./$< + ./$< $(SUMMARIZE_CMD) else $(VGRIND) --log-file=$<.valgrind ./$<; \ if [ $$? = 0 ] ; then \ grep "LEAK SUMMARY" $<.valgrind >/dev/null 2>&1; \ - if [ $$? = 0 ] ; then cat $<.valgrind; exit 1; fi \ - fi + if [ $$? = 0 ] ; then cat $<.valgrind; test 0 = 1; fi \ + fi \ + $(SUMMARIZE_CMD) endif clean: rm -rf $(TARGETS) *.valgrind +