mariadb/windows/tests/Makefile
Yoni Fogel 049c7625a3 Addresses #1765 Merge [12079] into main (pthreads-win32 for windows)
git-svn-id: file:///svn/toku/tokudb@12081 c7de825b-a66e-492c-adef-691d508d4ae1
2013-04-16 23:57:53 -04:00

39 lines
932 B
Makefile

# -*- Mode: Makefile -*-
.DEFAULT_GOAL=all
TOKUROOT=../../
INCLUDEDIRS=-I$(TOKUROOT)include/windows -I$(TOKUROOT)newbrt
include $(TOKUROOT)toku_include/Makefile.include
SKIP_WARNING += $(ICC_NOWARN)1418 #Non static functions do not need prototypes.
SRCS = $(wildcard test-*.c)
BINS_RAW = $(patsubst %.c,%,$(SRCS))
#Bins will be generated.
$(BINS): $(LIBPORTABILITY)
$(BINS): CFLAGS+=-DTESTDIR=\"dir.$<.dir\"
RUNTARGETS = $(patsubst %$(BINSUF),%.tdbrun,$(BINS))
VGRIND =
all: $(BINS)
.PHONY: check
check: $(BINS) $(RUNTARGETS);
%.tdbrun: %$(BINSUF) $(PTHREAD_LOCAL)
mkdir -p dir.$*
ifeq ($(VGRIND),)
cd dir.$* && ../$< $(SUMMARIZE_CMD)
else
cd dir.$* && .$(VGRIND) --log-file=$<.valgrind ../$<; \
if [ $$? = 0 ] ; then \
grep "LEAK SUMMARY" dir.$*/$<.valgrind >/dev/null 2>&1; \
if [ $$? = 0 ] ; then cat dir.$*/$<.valgrind; test 0 = 1; fi \
fi \
$(SUMMARIZE_CMD)
endif
clean:
rm -rf $(TARGETS) *.valgrind dir.*