Commit 8d8e71ee authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:3923] adding some new makefile rules to make mainline integration testing easier

git-svn-id: file:///svn/toku/tokudb@34780 c7de825b-a66e-492c-adef-691d508d4ae1
parent d56b954c
......@@ -57,6 +57,29 @@ summarize: check
check: $(CHECKS)
.PHONY: fastbuild fastbuildtests fastcheck fastchecknewbrt fastcheckydb fastcheckonlyfail fastcheckonlyfailnewbrt fastcheckonlyfailydb
fastbuild:
$(MAKE) -s -k -C linux
$(MAKE) -s -k -C newbrt local
$(MAKE) -s -k -C src local
$(MAKE) -s -k -C utils
fastbuildtests: fastbuild
$(MAKE) -s -k -C newbrt/tests
$(MAKE) -s -k -C src/tests tests.tdb
fastcheck: fastchecknewbrt fastcheckydb
fastchecknewbrt: fastbuildtests
$(MAKE) -s -k -C newbrt/tests fastcheck
fastcheckydb: fastbuildtests
$(MAKE) -s -k -C src/tests fastcheck.tdb
fastcheckonlyfail: fastcheckonlyfailnewbrt fastcheckonlyfailydb
fastcheckonlyfailnewbrt: fastbuildtests
$(MAKE) -s -k -C newbrt/tests fastcheckonlyfail
fastcheckonlyfailydb: fastbuildtests
$(MAKE) -s -k -C src/tests fastcheckonlyfail.tdb
clean: $(patsubst %,%.dir.clean,$(SRCDIRS)) cleanlib
cleanlib:
rm -rf lib/*.$(SOEXT) lib/*.$(AEXT) lib/*.bundle
......
......@@ -49,13 +49,14 @@ CHECKS = \
build: $(BINS)
check: $(PTHREAD_LOCAL) $(patsubst %,check_%,$(CHECKS))
fastcheck: $(PTHREAD_LOCAL) $(patsubst %,fastcheck_%,$(CHECKS))
fastcheckonlyfail: $(PTHREAD_LOCAL) $(patsubst %,fastcheckonlyfail_%,$(CHECKS))
check_fail:
test 0 = 1 $(SUMMARIZE_CMD)
check_ok:
test 0 = 0 $(SUMMARIZE_CMD)
ifeq ($(TOKU_SKIP_MINICRON),1)
check_minicron-test$(BINSUF):
@echo "SKIPPED TEST $@ (Fails in win64 vm due to timing issues)"
......@@ -165,6 +166,24 @@ check_bnc-insert-benchmark: bnc-insert-benchmark$(BINSUF)
check_%: % $(PTHREAD_LOCAL)
$(VGRIND) ./$< $(VERBVERBOSE) $(EXTRA_ARGS) $(SUMMARIZE_CMD)
fastcheck_%: $(PTHREAD_LOCAL)
@($(MAKE) VGRIND= SUMMARIZE=0 check_$*) &>$*.fastlog ; \
if test $$? != 0 ; then \
printf "%-60s FAIL\nexamine %s\n" check_$* $*.fastlog; \
exit 2 ; \
else \
printf "%-60s PASS\n" check_$* ; \
$(RM) $*.fastlog ; \
fi
fastcheckonlyfail_%: $(PTHREAD_LOCAL)
@($(MAKE) VGRIND= SUMMARIZE=0 check_$*) &>$*.fastlog ; \
if test $$? != 0 ; then \
printf "%-60s FAIL\nexamine %s\n" check_$* $*.fastlog; \
exit 2 ; \
else \
$(RM) $*.fastlog ; \
fi
benchmark-test.$(OEXT): ../brt.h ../brt-search.h ../../include/db.h
brtloader_test$(BINSUF): ../brtloader-internal.h ../brtloader.o
......@@ -228,7 +247,7 @@ clean:
rm -rf log-test7.c.dir_*
rm -rf *.dir dir.*
rm -f test_oexcl.c.tmp
rm -f *.brt *.clean *.dirty *.tdb *.dat *.data *.out *.check.valgrind
rm -f *.brt *.clean *.dirty *.tdb *.dat *.data *.out *.check.valgrind *.fastlog
$(BINS): LDFLAGS=-L../../lib -ltokuportability -lnewbrt $(ALWAYS_LINK) -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib
$(BINS): test.h
......
......@@ -425,6 +425,10 @@ check.tdb: $(LIBTDB) $(PTHREAD_LOCAL) $(RUN_TDB_TESTS) ;
check.tdb.extra: $(EXTRA_TDB_TESTS) ;
check.abortrecover: $(RECOVER_TESTS) ;
.PHONY: fastcheck.tdb fastcheckonlyfail.tdb
fastcheck.tdb: $(patsubst %,%.fast,$(RUN_TDB_TESTS))
fastcheckonlyfail.tdb: $(patsubst %,%.fastonlyfail,$(RUN_TDB_TESTS))
foo:
echo RUN_TDB_TESTS: $(RUN_TDB_TESTS)
echo ALL_TESTS: $(ALL_TESTS)
......@@ -539,6 +543,25 @@ all.recover: $(patsubst %,test_log%.recover,$(TLRECOVER)) $(PTHREAD_LOCAL) ;
#DISABLE standard tdbrun for recover tests.
$(patsubst %,test_log%.tdbrun,$(TLRECOVER)): ;
.PHONY: %.fast %.fastonlyfail
%.fast: $(DEPEND_COMPILE) $(DEPEND_LINK) $(LIBTDB) $(PTHREAD_LOCAL)
@($(MAKE) VGRIND= SUMMARIZE=0 $*) &>$*.fastlog ; \
if test $$? != 0 ; then \
printf "%-60s FAIL\nexamine %s\n" $* $*.fastlog; \
exit 2 ; \
else \
printf "%-60s PASS\n" $* ; \
$(RM) $*.fastlog ; \
fi
%.fastonlyfail: $(DEPEND_COMPILE) $(DEPEND_LINK) $(LIBTDB) $(PTHREAD_LOCAL)
@($(MAKE) VGRIND= SUMMARIZE=0 $*) &>$*.fastlog ; \
if test $$? != 0 ; then \
printf "%-60s FAIL\nexamine %s\n" $* $*.fastlog; \
exit 2 ; \
else \
$(RM) $*.fastlog ; \
fi
BDB_CFLAGS=
TDB_CFLAGS=
%.bdb$(BINSUF): BDB_CFLAGS= -DENVDIR=\"dir.$<.bdb\" -DUSE_BDB -DIS_TDB=0 -DTOKU_ALLOW_DEPRECATED
......@@ -886,3 +909,4 @@ clean:
rm -rf dir.* *.check.output *.check.valgrind
rm -f dump.bdb.1426 dump.tdb.1426 test1426.bdb
rm -f *.bdb *.tdb
rm -f *.fastlog
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