Commit 5cfb9747 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Move newbrt tests to subdir. Fixes #796.

git-svn-id: file:///svn/tokudb@3866 c7de825b-a66e-492c-adef-691d508d4ae1
parent db1d3318
......@@ -34,7 +34,7 @@ CFLAGS = -Wall -W -Wcast-align -Wbad-function-cast -Wextra -Wmissing-noreturn -W
LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -lz
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500
leafentry.o: CFLAGS+=-Wconversion
# Add -Wconversion
ifdef BRT_FANOUT
CPPFLAGS += -DBRT_FANOUT=$(BRT_FANOUT)
......@@ -43,50 +43,12 @@ endif
# When debugging, try: valgrind --show-reachable=yes --leak-check=full ./brt-test
BINS= brtdump \
tdb_logprint \
# Intentionally left blank
build default: bins libs tdb-recover tdb_logprint
# Put these one-per-line so that if we insert a new one the svn diff can understand it better.
# Also keep them sorted.
REGRESSION_TESTS = \
brt-serialize-test \
brt-test \
brt-test-cursor \
brt-test-cursor-2 \
brt-test-named-db \
brt-test0 \
brt-test1 \
brt-test2 \
brt-test3 \
brt-test4 \
brt-test5 \
cachetable-test \
cachetable-test2 \
fifo-test \
list-test \
log-test \
log-test2 \
log-test3 \
log-test4 \
log-test5 \
log-test6 \
omt-test \
test-assert \
test-brt-delete-both \
test-brt-overflow \
test-del-inorder \
test-inc-split \
test-primes \
test_oexcl \
test_toku_malloc_plain_free \
ybt-test \
# This line intentially kept commented so I can have a \ on the end of the previous line
# Add in the binaries that must be run in various ways.
BINS = $(REGRESSION_TESTS) \
benchmark-test \
brtdump \
tdb_logprint \
# This line intentially kept commented so I can have a \ on the end of the previous line
build default: bins libs tdb-recover tdb_logprint $(TEST_OFILES)
cd tests;$(MAKE) build
# Put crc first to make it work right
BRT_SOURCES = \
......@@ -112,11 +74,7 @@ BRT_SOURCES = \
# keep this line so I can ha vea \ on the previous line
OFILES = newbrt.o
TEST_OFILES = \
$(OFILES) \
brt-test-helpers.o \
# keep this line
TEST_OFILES = brt-test-helpers.o
HFILES = $(wildcard *.h)
......@@ -142,28 +100,10 @@ log_code.c: logformat
libs: newbrt.o
bins: $(BINS)
# Put the benchmarktest_256 first since it takes the longest (and we want to use parallelism in the make)
CHECKS = \
benchmarktest_256 \
$(REGRESSION_TESTS) \
# This line intentially kept commented so I can have a \ on the previous line
# Put check_benchmarktest_256 first because it is long-running (and therefore on the critical path, so get it started)
check: bins $(patsubst %,check_%,$(CHECKS))
check_benchmarktest_256: benchmark-test
$(VGRIND) ./benchmark-test $(VERBVERBOSE) --valsize 256 --verify 1
check_test-assert: test-assert
@# no arguments, should err
$(VGRIND) ./test-assert > /dev/null 2>&1 ; test \($$?\)
@# one argument, not "ok" should err
@echo Expect an abort message:
($(VGRIND) ./test-assert notok) > test-assert.out 2>&1 ; test \($$?\)
@fgrep failed test-assert.out > /dev/null
@rm test-assert.out
@# one argument, "ok" should not error
$(DVGRIND) ./test-assert ok
check_%: %
$(VGRIND) ./$< $(VERBVERBOSE)
check: bins
cd tests;$(MAKE) check
check-fanout:
let BRT_FANOUT=4; \
......@@ -173,14 +113,9 @@ check-fanout:
done
BRT_INTERNAL_H_INCLUDES = brt-internal.h cachetable.h fifo.h omt.h brt.h brt-search.h brttypes.h ybt.h log.h ../include/db.h kv-pair.h memory.h crc.h mempool.h leafentry.h
list-test: list-test.o newbrt.o
test-brt-delete-both: $(OFILES)
test-inc-split: $(TEST_OFILES)
brt-test-helpers.o: $(BRT_INTERNAL_H_INCLUDES) toku_assert.h
test-del-inorder: $(TEST_OFILES)
ybt-test: ybt-test.o newbrt.o
ybt-test.o: ybt.h ../include/db.h
brt-test0 brt-test1 brt-test2 brt-test3 brt-test4 brt-test5 test-brt-overflow brt-test-named-db brt-test-cursor brt-test-cursor-2 brt-test: $(OFILES)
logformat: logformat.c toku_assert.c
brt-serialize-test.o: $(BRT_INTERNAL_H_INCLUDES)
fifo-test: newbrt.o
......@@ -188,7 +123,6 @@ log-test6 log-test5 log-test4 log-test3 log-test2 log-test: $(OFILES)
omt-test.o: toku_assert.h memory.h toku_assert.h ../include/db.h brttypes.h
omt-test: omt-test.o newbrt.o
brt-serialize-test: $(OFILES) brt-serialize-test.o
test_toku_malloc_plain_free: newbrt.o
......@@ -198,9 +132,6 @@ cachetable-test: $(OFILES)
cachetable-test2.o: cachetable.h memory.h
cachetable-test2: $(OFILES)
benchmark-test: $(OFILES)
benchmark-test.o: brt.h brt-search.h ../include/db.h
test-primes: test-primes.o newbrt.o
test-assert: newbrt.o
......
ROOT = ../
build: newbrt.builddir
check: newbrt.checkdir
include $(ROOT)Makefile.include
# On cygwin do:
# make CYGWIN=cygwin check
# For verbose output do
# make VERBOSE=1
# For very verbose output do
# make VERBOSE=2
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
# PROF_FLAGS = -pg
OPTFLAGS = -O3
ifeq ($(VERBOSE),2)
VERBVERBOSE=-v
MAYBEATSIGN=
else
ifeq ($(VERBOSE),1)
VERBVERBOSE=-q
MAYBEATSIGN=
else
VERBVERBOSE=-q
MAYBEATSIGN=@
endif
endif
ifeq ($(CYGWIN),cygwin)
else
FPICFLAGS = -fPIC
# valgrind is not present on cygwin
VGRIND = valgrind --quiet --error-exitcode=1 --leak-check=yes
endif
CFLAGS = -Wall -W -Wcast-align -Wbad-function-cast -Wextra -Wmissing-noreturn -Wmissing-format-attribute $(OPTFLAGS) -g3 -ggdb3 $(GCOV_FLAGS) $(PROF_FLAGS) -Werror $(FPICFLAGS) -Wshadow -fvisibility=hidden
LDFLAGS = $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -lz
CPPFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -I..
# Put these one-per-line so that if we insert a new one the svn diff can understand it better.
# Also keep them sorted.
REGRESSION_TESTS = \
brt-serialize-test \
brt-test \
brt-test-cursor \
brt-test-cursor-2 \
brt-test-named-db \
brt-test0 \
brt-test1 \
brt-test2 \
brt-test3 \
brt-test4 \
brt-test5 \
cachetable-test \
cachetable-test2 \
fifo-test \
list-test \
log-test \
log-test2 \
log-test3 \
log-test4 \
log-test5 \
log-test6 \
omt-test \
test-assert \
test-brt-delete-both \
test-brt-overflow \
test-del-inorder \
test-inc-split \
test-primes \
test_oexcl \
test_toku_malloc_plain_free \
ybt-test \
# This line intentially kept commented so I can have a \ on the end of the previous line
# Add in the binaries that must be run in various ways.
BINS = $(REGRESSION_TESTS) \
benchmark-test \
# This line intentially kept commented so I can have a \ on the end of the previous line
CHECKS = \
benchmarktest_256 \
$(REGRESSION_TESTS) \
# This line intentially kept commented so I can have a \ on the previous line
build: $(BINS)
foo:
echo $(BINS)
check: $(patsubst %,check_%,$(CHECKS))
check_benchmarktest_256: benchmark-test
$(VGRIND) ./benchmark-test $(VERBVERBOSE) --valsize 256 --verify 1
check_test-assert: test-assert
@# no arguments, should err
$(VGRIND) ./test-assert > /dev/null 2>&1 ; test \($$?\)
@# one argument, not "ok" should err
@echo Expect an abort message:
($(VGRIND) ./test-assert notok) > test-assert.out 2>&1 ; test \($$?\)
@fgrep failed test-assert.out > /dev/null
@rm test-assert.out
@# one argument, "ok" should not error
$(DVGRIND) ./test-assert ok
check_%: %
$(VGRIND) ./$< $(VERBVERBOSE)
benchmark-test.o: ../brt.h ../brt-search.h ../../include/db.h
$(BINS): ../newbrt.o
test-inc-split test-del-inorder: ../brt-test-helpers.o
clean:
rm -rf $(BINS) *.o *.bb *.bbg *.da *.gcov *.gcno *.gcda
rm -rf test_oexcl.c.tmp *.brt
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