Commit 061810b8 authored by John Esmet's avatar John Esmet Committed by Yoni Fogel

refs #5525 remove obsolete Makefiles


git-svn-id: file:///svn/toku/tokudb@48240 c7de825b-a66e-492c-adef-691d508d4ae1
parent ebc250cc
# -*- Mode: Makefile -*-
.DEFAULT_GOAL= default
TOKUROOT=./
include $(TOKUROOT)toku_include/Makefile.include
default: build
ifeq ($(TOKU_SKIP_CXX),1)
SRCDIRS_CXX =
else
SRCDIRS_CXX = cxx db-benchmark-test-cxx
endif
SRCDIRS = $(OS_CHOICE) ft src/range_tree src/lock_tree src utils db-benchmark-test $(SRCDIRS_CXX)
BUILDDIRS = $(SRCDIRS) man/texi
ifeq ($(OS_CHOICE),windows)
.NOTPARALLEL:; #Windows/cygwin jobserver does not properly handle submakes. Serialize
endif
ft.dir: $(OS_CHOICE).dir
src/range_tree.dir: $(OS_CHOICE).dir
src/lock_tree.dir: src/range_tree.dir
src.dir: ft.dir src/lock_tree.dir
utils.dir: src.dir
db-benchmark-test.dir: src.dir
cxx.dir: src.dir
db-benchmark-test-cxx.dir: cxx.dir
%.dir:
cd $(patsubst %.dir, %, $@) && $(MAKE) build
build: $(patsubst %,%.dir, $(BUILDDIRS))
%.build:
cd $(patsubst %.build, %,$@) && $(MAKE) build
%.local:
cd $(patsubst %.local, %,$@) && $(MAKE) local
%.check:
cd $(patsubst %.check, %,$@) && $(MAKE) check
release: linux.local ft.local src.local release.local
CHECKS = $(patsubst %,%.checkdir,$(SRCDIRS))
# This is the original check rule
# The stuff below allows "make -j2 -k check" to work
#check:
# for d in $(SRCDIRS); do (cd $$d; $(MAKE) -k check); done
%.checkdir:
cd $* && $(MAKE) -k check
summarize: SUMMARIZE=1
summarize: VERBOSE=0
summarize: check
check: $(CHECKS)
.PHONY: fastbuild fastbuildtests fastcheck fastcheckft fastcheckydb fastcheckonlyfail fastcheckonlyfailft fastcheckonlyfailydb
fastbuild:
$(MAKE) -s -k -C linux
$(MAKE) -s -k -C ft local
$(MAKE) -s -k -C src local
$(MAKE) -s -k -C utils
fastbuildtests: fastbuild
$(MAKE) -s -k -C ft/tests
$(MAKE) -s -k -C src/tests tests.tdb
fastcheck: fastcheckft fastcheckydb
fastcheckft: fastbuildtests
$(MAKE) -s -k -C ft/tests fastcheck
fastcheckydb: fastbuildtests
$(MAKE) -s -k -C src/tests fastcheck.tdb
fastcheckonlyfail: fastcheckonlyfailft fastcheckonlyfailydb
fastcheckonlyfailft: fastbuildtests
$(MAKE) -s -k -C ft/tests fastcheckonlyfail
fastcheckonlyfailydb: fastbuildtests
$(MAKE) -s -k -C src/tests fastcheckonlyfail.tdb
clean: $(patsubst %,%.dir.clean,$(SRCDIRS)) cleanlib
cleanlib:
rm -rf lib/*.$(SOEXT) $(filter-out lib/liblzma_gcc_dbg.$(AEXT) lib/liblzma_gcc_opt.$(AEXT) lib/liblzma_icc_dbg.$(AEXT) lib/liblzma_icc_opt.$(AEXT),$(wildcard lib/*.$(AEXT))) lib/*.bundle lib/*.olist
# This does not work, and probably hasn't worked since revision ~2000
# install:
# ./install.bash
# Default to building locally in one's home directory
PREFIX = $(HOME)/local
# This is a quick hack for an install rule
install: release
mkdir -p $(PREFIX)/lib $(PREFIX)/include
/bin/cp release/lib/libtokudb.so $(PREFIX)/lib
/bin/cp release/lib/libtokuportability.so $(PREFIX)/lib
/bin/cp release/include/db.h $(PREFIX)/include/tokudb.h
/bin/cp release/include/tdb-internal.h $(PREFIX)/include
/bin/cp release/include/toku_list.h $(PREFIX)/include
uninstall:
/bin/rm -f $(PREFIX)/lib/libtokudb.so $(PREFIX)/lib/libtokuportability.so
/bin/rm -f $(PREFIX)/lib/libtokuportability.so
/bin/rm -f $(PREFIX)/include/tokudb.h $(PREFIX)/include/tdb-internal.h
/bin/rm -f $(PREFIX)/include/toku_list.h
# maybe we should have a coverage target in each makefile
build-coverage:
$(MAKE) build OPTFLAGS= GCOV_FLAGS="-fprofile-arcs -ftest-coverage"
# this is messy now since we dont have consistent make targets
check-coverage: check-coverage-ft check-coverage-src-tests check-coverage-utils check-coverage-cxx-tests \
check-coverage-db-benchmark-test check-coverage-db-benchmark-test-cxx \
check-coverage-range-tree-tests check-coverage-lock-tree-tests
check-coverage-ft:
(cd ft && $(MAKE) -k check VGRIND="")
check-coverage-src-tests:
(cd src/tests && $(MAKE) -k check.tdb VGRIND="")
check-coverage-utils:
(cd utils && $(MAKE) -k test-coverage)
check-coverage-cxx-tests:
(cd cxx/tests && $(MAKE) -k check VGRIND="")
check-coverage-db-benchmark-test:
(cd db-benchmark-test && $(MAKE) -k check VGRIND="")
check-coverage-db-benchmark-test-cxx:
(cd db-benchmark-test-cxx && $(MAKE) -k check VGRIND="")
check-coverage-range-tree-tests:
(cd src/range_tree/tests && $(MAKE) clean && $(MAKE) -k check.lin VGRIND="" OPTFLAGS=-O0 GCOV_FLAGS="-fprofile-arcs -ftest-coverage")
check-coverage-lock-tree-tests:
(cd src/lock_tree/tests && $(MAKE) clean && $(MAKE) -k check.lin VGRIND="" OPTFLAGS=-O0 GCOV_FLAGS="-fprofile-arcs -ftest-coverage")
BDB = 4_6
BDBDIR = ../../../berkeleydb
MYSQL_H = -I$(BDBDIR)/db-4.1.25/build_unix/
OPTFLAGS = -O2
ifeq ($(GCCVERSION),4.4.2)
GCC_VERSION_SPECIFIC_WARNINGS = -Wno-strict-aliasing -Wno-deprecated
else ifeq ($(GCCVERSION),4.4.1)
GCC_VERSION_SPECIFIC_WARNINGS = -Wno-strict-aliasing -Wno-deprecated
endif
CFLAGS = $(GCC_VERSION_SPECIFIC_WARNINGS) -Wall -W -Werror -g $(OPTFLAGS)
CPPFLAGS = -I. -I../toku_include
ifeq ($(CC),icc)
CFLAGS += -diag-disable 188
endif
default: ../include/db.h
../include/db.h: make_tdb
./make_tdb > $@
hfiles: tdb.h
clean:
rm -f *.o make_tdb
This diff is collapsed.
This diff is collapsed.
#test1305 is first, since it is the longest test. Thus reducing the makespan on parallel checks
# Put these one-per-line so that if we insert a new one the svn diff can understand it better.
# Also keep them sorted.
FT_TESTS_RAW = \
test1305 \
block_allocator_test \
bread-test \
ft_loader_open_temp_file \
brt-serialize-test \
brt-serialize-sub-block-test \
brt-test \
brt-test-cursor \
brt-test-cursor-2 \
brt-test0 \
brt-test1 \
brt-test2 \
brt-test3 \
brt-test4 \
brt-test5 \
cachetable-rwlock-test \
cachetable-test \
cachetable-test2 \
cachetable-put-test \
cachetable-getandpin-test \
cachetable-unpin-test \
cachetable-rename-test \
cachetable-fd-test \
cachetable-flush-test \
cachetable-count-pinned-test \
cachetable-debug-test \
cachetable-debug-test \
cachetable-checkpoint-pending \
cachetable-checkpoint-test \
cachetable-prefetch-maybegetandpin-test \
cachetable-prefetch2-test \
cachetable-prefetch-close-test \
cachetable-prefetch-close-fail-test \
cachetable-prefetch-close-leak-test \
cachetable-prefetch-getandpin-test \
cachetable-prefetch-getandpin-fail-test \
cachetable-prefetch-checkpoint-test \
cachetable-reserve-filenum \
fifo-test \
list-test \
keyrange \
keyrange-unflat \
keyrange-dupsort \
keyrange-dupsort-unflat \
keytest \
log-test \
log-test2 \
log-test3 \
log-test4 \
log-test5 \
log-test6 \
log-test7 \
logcursor-timestamp \
logcursor-empty-logdir \
logcursor-empty-logfile \
logcursor-empty-logfile-2 \
memtest \
minicron-test \
omt-cursor-test \
omt-test \
pqueue-test \
recovery-cbegin \
recovery-cbegin-cend \
recovery-cbegin-cend-hello \
recovery-empty \
recovery-fopen-missing-file \
recovery-hello \
recovery-no-datadir \
recovery-no-log \
recovery-no-logdir \
shortcut \
test1308a \
test-assert \
test-brt-delete-both \
test-brt-overflow \
test-del-inorder \
test-inc-split \
test-leafentry10 \
test-leafentry-nested \
test_logcursor \
test_oexcl \
test_toku_malloc_plain_free \
threadpool-test \
workqueue-test \
x1764-test \
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.
FT_TESTS_BINS_RAW = $(FT_TESTS_RAW) \
benchmark-test \
cachetable-scan \
# This line intentially kept commented so I can have a \ on the end of the previous line
# BINS will be defined by adding .exe if appropriate.
FT_TESTS_BINS = $(patsubst %,ft/tests/%$(BINSUF),$(FT_TESTS_BINS_RAW))
# Use the "|" rule to say that these libraries must be built before the executables, but don't rebuild these just because the library gets rebuilt.
$(FT_TESTS_BINS): | lib/libtokuportability.$(SOEXT) ft/libft.$(SOEXT)
$(FT_TESTS_BINS): CPPFLAGS+=-Iinclude -Ift
$(FT_TESTS_BINS): LOADLIBES+=-Lft -lft -Llib -ltokuportability -lz -lpthread
$(FT_TESTS_BINS): LDFLAGS+= -Wl,-rpath,ft -Wl,-rpath,lib
FT_TESTS_CHECKS = \
benchmarktest_256 \
test-assertA \
test-assertB \
$(FT_TESTS_RAW) \
#
FT_TESTS_RUN_CHECKS = $(patsubst %,ft/tests/check_%,$(FT_TESTS_CHECKS))
ft/tests/build: $(FT_TESTS_BINS)
ft/tests/check: $(FT_TESTS_RUN_CHECKS)
ft/tests/check_benchmarktest_256: ft/tests/benchmark-test$(BINSUF) $(PTHREAD_LOCAL)
$(VGRIND) ./$< $(VERBVERBOSE) --valsize 256 --verify 1 $(SUMMARIZE_CMD)
ft/tests/check_test-assertA: ft/tests/test-assert$(BINSUF) $(PTHREAD_LOCAL)
@# no arguments, should err
$(VGRIND) ./$< > /dev/null 2>&1 ; test $$? = 1 $(SUMMARIZE_CMD)
ifeq ($(OS_CHOICE),windows)
TEST_ASSERT_FAILCODE=134 #Does not use raise(SIGABRT) to fail assert, so will not overwrite 134 with 1.
else
TEST_ASSERT_FAILCODE=1
endif
ft/tests/check_test-assertB: ft/tests/test-assert$(BINSUF) $(PTHREAD_LOCAL)
@# one argument, not "ok" should err
@rm -f test-assert.out
($(VGRIND) ./$< notok) > test-assert.out 2>&1 ; test $$? = $(TEST_ASSERT_FAILCODE) && fgrep failed test-assert.out > /dev/null $(SUMMARIZE_CMD)
ft/tests/check_test-assert: ft/tests/test-assert$(BINSUF) $(PTHREAD_LOCAL)
@# one argument, "ok" should not error
$(VGRIND) ./$< ok $(SUMMARIZE_CMD)
ft/tests/check_test1305: VGRIND=
ft/tests/check_%: ft/tests/%$(BINSUF)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
ft/tests/ft_loader_open_temp_file.$(OEXT): CPPFLAGS+=-Ift -Iinclude
ft/tests/ft_loader_open_temp_file.$(OEXT): ft/ftloader-internal.h
# -*- Mode: Makefile -*-
.DEFAULT_GOAL=install
TOKUROOT=../
INCLUDEDIRS=-I. -I$(TOKUROOT)/include
include $(TOKUROOT)toku_include/Makefile.include
OPT_AROPT=-qnoipo #Disable ipo for lib creation even when optimization is on.
SRCS = $(wildcard *.c)
OBJS = $(patsubst %.c,%.$(OEXT),$(SRCS))
TARGET = $(LIBPORTABILITY_SO) $(LIBPORTABILITY_A)
local build install: $(TARGET)
ifeq ($(CC),icc)
#LINUX_NOSTDLIB=-nostdlib
LINUX_NOSTDLIB=-static-intel -diag-disable 10237
else
LINUX_NOSTDLIB=
endif
$(LIBPORTABILITY_SO): $(OBJS)
$(CC) -shared $(SYMBOLS) $(OBJS) $(SKIP_WARNING) -o $@ $(LINUX_NOSTDLIB) $(GCOV_FLAGS)
$(LIBPORTABILITY_A): $(OBJS)
$(AR) cr $@ $(OBJS)
$(OBJS): CFLAGS += -DTOKU_ALLOW_DEPRECATED -D_GNU_SOURCE
$(OBJS): VISIBILITY=
#Blank on purpose
check: $(TARGET)
cd tests && $(MAKE) check
clean:
rm -rf $(TARGET)
cd tests && $(MAKE) clean
LIBPORTABILITY = lib/libtokuportability.$(SOEXT)
include linux/tests/make.include
linux/build: $(LIBPORTABILITY) linux/tests/build
LINUX_SRCS = $(wildcard linux/*.c)
LINUX_OBJS = $(patsubst %.c,%.$(OEXT),$(LINUX_SRCS))
$(LINUX_OBJS): CPPFLAGS_DIRECTORY = -Itoku_include -Ilinux
$(LINUX_OBJS): CFLAGS_DIRECTORY = -DTOKU_ALLOW_DEPRECATED
$(LINUX_OBJS): LDFLAGS_DIRECTORY =
$(LINUX_OBJS): LOADLIBES_DIRECTORY =
$(LINUX_OBJS): VISIBILITY=-fvisibility=default
$(LIBPORTABILITY): $(LINUX_OBJS)
$(LIBPORTABILITY): VISIBILITY=-fvisibility=default
$(LIBPORTABILITY): LOADLIBES=
$(LIBPORTABILITY): LDFLAGS=
linux/check: linux/tests/check
# -*- Mode: Makefile -*-
CPPFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE
CPPFLAGS += -I../../toku_include -I.. -I.
OPTFLAGS = -O0
CFLAGS = -Wall -Werror -g $(OPTFLAGS) -std=c99
ifeq ($(GCCVERSION),4.4.4)
CFLAGS += -Wno-deprecated
else ifeq ($(GCCVERSION),4.4.2)
CFLAGS += -Wno-deprecated
else ifeq ($(GCCVERSION),4.4.1)
CFLAGS += -Wno-deprecated
else ifeq ($(GCCVERSION),4.4.0)
CFLAGS += -Wno-deprecated
endif
ifneq ($(GCOV),)
CFLAGS += -fprofile-arcs -ftest-coverage -DGCOV
endif
LDFLAGS = -L../../lib -Wl,-rpath,../../lib
LIBTOKUPORTABILITY=tokuportability
LDLIBS = -l$(LIBTOKUPORTABILITY) -lpthread -ldl
SRCS=$(sort $(filter-out dir.%.c,$(wildcard *.c)))
TARGETS = $(patsubst %.c,%,$(SRCS))
RUNTARGETS = $(patsubst %,%.tdbrun,$(TARGETS))
VGRIND = valgrind
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
else
SUMMARIZE_CMD =
endif
INVERTER=;test $$? -ne 0
all: $(TARGETS)
%: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS) -lrt
.PHONY: check build
build: $(TARGETS)
check: $(TARGETS) $(RUNTARGETS);
test-rwlock: OPTFLAGS=-O3
test-rwlock: ../toku_pthread.h
# pwrite4g needs an argument to tell it which directory to write temporary files
test-pwrite4g.tdbrun: TEST_EXTRA_ARGS=.
%.tdbrun: %
ifeq ($(VGRIND),)
./$< $(TEST_EXTRA_ARGS) $(SUMMARIZE_CMD)
else
$(VGRIND) --error-exitcode=1 --suppressions=../../ft/valgrind.suppressions --quiet --leak-check=full --show-reachable=yes --log-file=$<.check.valgrind ./$< $(TEST_EXTRA_ARGS) >$<.check.output 2>&1; \
if [ $$? = 0 ] ; then \
lines=`cat $<.check.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.check.valgrind; test 0 = 1; fi \
else \
cat $<.check.valgrind; test 0 = 1; \
fi \
$(SUMMARIZE_CMD)
endif
# check to see if that logic makes an error when there is a leak.
try-leak-lost.tdbrun: try-leak-lost
ifeq ($(VGRIND),)
./$< $(SUMMARIZE_SHOULD_FAIL)
else
$(VGRIND) --error-exitcode=1 --suppressions=../../ft/valgrind.suppressions --quiet --leak-check=full --show-reachable=yes --log-file=$<.check.valgrind ./$< >$<.check.output 2>&1; \
if [ $$? = 0 ] ; then \
lines=`cat $<.check.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.check.valgrind; test 0 = 1; fi \
else \
test 0 = 1; \
fi \
$(INVERTER) \
$(SUMMARIZE_SHOULD_FAIL)
endif
try-leak-reachable.tdbrun: try-leak-reachable
ifeq ($(VGRIND),)
./$< $(SUMMARIZE_SHOULD_FAIL)
else
$(VGRIND) --error-exitcode=1 --suppressions=../../ft/valgrind.suppressions --quiet --leak-check=full --show-reachable=yes --log-file=$<.check.valgrind ./$< >$<.check.output 2>&1; \
if [ $$? = 0 ] ; then \
lines=`cat $<.check.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.check.valgrind; test 0 = 1; fi \
else \
test 0 = 1; \
fi \
$(INVERTER) \
$(SUMMARIZE_SHOULD_FAIL)
endif
try-uninit.tdbrun: try-uninit
ifeq ($(VGRIND),)
./$< $(SUMMARIZE_SHOULD_FAIL)
else
$(VGRIND) --error-exitcode=1 --suppressions=../../ft/valgrind.suppressions --quiet --leak-check=full --show-reachable=yes --log-file=$<.check.valgrind ./$< >$<.check.output 2>&1; \
if [ $$? = 0 ] ; then \
lines=`cat $<.check.valgrind | wc -l`; \
if [ $$lines -ne 0 ] ; then cat $<.check.valgrind; test 0 = 1; fi \
else \
test 0 = 1; \
fi \
$(INVERTER) \
$(SUMMARIZE_SHOULD_FAIL)
endif
try-assert0.tdbrun: try-assert0
./$< 2> /dev/null $(INVERTER) $(SUMMARIZE_SHOULD_FAIL)
try-assert-zero.tdbrun: try-assert-zero
./$< 2> /dev/null $(INVERTER) $(SUMMARIZE_SHOULD_FAIL)
clean:
rm -rf $(TARGETS) *.check.output *.check.valgrind pwrite4g.data testdir dir.*.c
try-assert0.tdbrun:
check_memory_status: test-memory-status
./test-memory-status
LD_PRELOAD=../../../../mysql/jemalloc-2.2.5/lib/libjemalloc.so ./test-memory-status
foo:
echo $(TARGETS)
LINUX_TESTS_SRCS = $(wildcard linux/tests/test-*.c)
LINUX_TESTS_TARGETS = $(patsubst %.c,%,$(LINUX_TESTS_SRCS))
LINUX_TESTS_RUNTARGETS = $(patsubst %,%.tdbrun,$(LINUX_TESTS_TARGETS))
linux/tests/build: $(LINUX_TESTS_TARGETS)
linux/tests/check: $(LINUX_TESTS_RUNTARGETS)
$(LINUX_TESTS_TARGETS): | $(LIBPORTABILITY)
# Every directory must define these rules for its make rules. And not with +=
linux/tests/%: CFLAGS_DIRECTORY =
linux/tests/%: CPPFLAGS_DIRECTORY = -Itoku_include -Ilinux -Ilinux/tests
linux/tests/%: LOADLIBES_DIRECTORY = -Llib -ltokuportability -lpthread
linux/tests/test-pwrite4g.tdbrun: TEST_EXTRA_ARGS=linux/tests
linux/tests/%.tdbrun: linux/tests/%
$(VGRIND) ./$< $(TEST_EXTRA_ARGS) $(SUMMARIZE_CMD)
linux/tests/test-gettime: LOADLIBES += -lrt
linux/tests/foo:
echo $(VGRIND)
# -*- Mode: Makefile -*-
.DEFAULT_GOAL=build
TOKUROOT=../
INCLUDEDIRS=-I$(TOKUROOT)ft -I../include -I./lock_tree -I./range_tree
DEPEND_COMPILE += \
ydb-internal.h \
$(TOKUROOT)include/db.h \
$(TOKUROOT)ft/cachetable.h \
$(TOKUROOT)ft/ft-ops.h \
#End of line
include $(TOKUROOT)toku_include/Makefile.include
CPPFLAGS+=-D_GNU_SOURCE -D_THREAD_SAFE
ifeq ($(PROF),1)
LIBRARY=../lib/lib$(LIBTOKUDB).$(AEXT)
else
LIBRARY=../lib/lib$(LIBTOKUDB).$(SOEXT)
endif
OBJS_RAW = \
ydb_lib \
ydb \
ydb_cursor \
ydb_row_lock \
ydb_env_func \
ydb_write \
ydb_db \
ydb_txn \
errors \
loader \
indexer \
indexer-undo-do \
elocks \
#\end
#OBJS automatically defined.
loader.$(OEXT): $(LOG_HEADER)
ydb.$(OEXT): $(LOG_HEADER)
LIBRARIES=
LIBRARIES+= \
$(LIBRARY) \
#Purposely here for \ at end of prev
ifeq ($(OS_CHOICE),windows)
#Does not support parallel builds for files in src.
.NOTPARALLEL:;
#Do not build the dynamic libraries.
LIBRARIES=
ifeq ($(DEBUG),0)
WINYDB = $(IPO_YDB)
else
WINYDB = $(NOIPO_YDB)
endif
LIBRARIES += $(WINYDB)
libtokudb.pdb : $(WINYDB);
endif
.PHONY: build local build_tests
build: local build_tests ;
local: buildlocktrees libs ;
build_tests: | local
cd tests && $(MAKE) build
.PHONY: local libs buildlocktrees
libs: $(LIBRARIES) ;
#Generate export.def
#Take everything from export.map, add snprintf and vsnprintf, and then convert into export.def format.
export.def: export.map Makefile
echo "EXPORTS" > $@
cat export.map | sed 's/global:$$/global:\n snprintf;\n usleep;/' | sed -n "s/\([a-zA-Z_0-9][a-zA-Z_0-9]*\);/\t\1 @/g;/@/ P" |sort | sed -n 'P;=' | sed '{;N;s/\n//;}' >> $@
echo "" >> $@
buildlocktrees: $(LOCKTREE) $(RANGETREE) ;
$(LIBRARY): $(OBJS) $(LOCKTREE) $(RANGETREE) ../lib/libft.a $(DEPEND_COMPILE) $(DEPEND_LINK)
$(LIBRARY): LINK_FILES=$(OBJS) $(LOCKTREE) $(RANGETREE) ../lib/libft.a $(LZMA_A)
ifeq ($(CC),icc)
ifeq ($(HAVE_CILK),1)
ifeq (0,0)
$(LIBRARY): LINK_FILES+=$(wildcard ../cilk_icc/*.o)
else
$(LIBRARY): LINK_FILES+=-lcilkrts
endif
endif
endif
check_globals: lib$(LIBTOKUDB).$(SOEXT)
python tokuglobals.py $<
.PHONY: check_tests
check_tests: build_tests
cd tests && $(MAKE) check
.PHONY: check
check: local check_globals check_tests
.PHONY: strip
strip: $(LIBRARY)
strip $<
clean:
rm -f export.def
cd tests && $(MAKE) clean
cd lock_tree && $(MAKE) clean
cd range_tree && $(MAKE) clean
LOCKTREE_FILES = db_id rth lth idlth locktree
LOCKTREE_HERE = $(ROOT)src/lock_tree
# -*- Mode: Makefile -*-
.DEFAULT_GOAL= build
TOKUROOT=../../
INCLUDEDIRS=-I. -I$(TOKUROOT)ft -I../range_tree -I$(TOKUROOT)src
DEPEND_COMPILE+= \
*.h \
../range_tree/*.h \
#end
SKIP_LOCKTREERULE=1
include $(TOKUROOT)toku_include/Makefile.include
LOCKTREE = locktree.$(AEXT)
LOCKTREE_LINEAR = locktree_linear.$(AEXT)
LOCKTREE_TLOG = locktree_tlog.$(AEXT)
LOCKTREE_LOG = locktree_log.$(AEXT)
OBJS_RAW = \
idlth \
lth \
rth \
txnid_set \
wfg \
#end
LIBRARIES=$(LOCKTREE_LINEAR) $(LOCKTREE_TLOG) $(LOCKTREE) # $(LOCKTREE_LOG)
$(LOCKTREE_TLOG): $(OBJS) locktree_nooverlap.$(OEXT)
$(LOCKTREE_LOG) $(LOCKTREE_LINEAR): $(OBJS) locktree.$(OEXT)
locktree.$(OEXT) locktree_nooverlap.$(OEXT) $(OBJS): CPPFLAGS+=-I$(TOKUROOT)include
$(LOCKTREE): $(LOCKTREE_TLOG)
cp $< $@
.PHONY: build local check
build local: $(LIBRARIES)
locktree_nooverlap.$(OEXT): CPPFLAGS+=-DTOKU_RT_NOOVERLAPS
locktree_nooverlap.$(OEXT): locktree.c $(DEPEND_COMPILE)
$(CC) $< -c $(CPPFLAGS) $(CFLAGS) $(OOUTPUT)$@
build check clean:
cd tests;$(MAKE) $@
# -*- Mode: Makefile -*-
.DEFAULT_GOAL= build
TOKUROOT=../../../
INCLUDEDIRS=-I. -I../ -I$(TOKUROOT)ft -I$(TOKUROOT)src/range_tree -I$(TOKUROOT)include
DEPEND_COMPILE += \
../*.h \
test.h \
#end
DEPEND_COMPILE+= $(FT)
include $(TOKUROOT)toku_include/Makefile.include
LDLIBS+=-lft -ltokuportability
LDFLAGS+=-L$(TOKUROOT)lib -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib
ifeq ($(CC),icc)
SKIP_WARNING += $(ICC_NOWARN)1418 #Non static functions do not need prototypes.
endif
SRCS = $(wildcard *.c)
LOG_TESTS = $(patsubst %.c,%.log$(BINSUF),$(SRCS))
TLOG_TESTS = $(patsubst %.c,%.tlog$(BINSUF),$(SRCS))
LIN_TESTS = $(patsubst %.c,%.lin$(BINSUF),$(SRCS))
WFG_TESTS = $(patsubst %.c,%.lin$(BINSUF), $(wildcard test_wfg*.c))
ALL_TESTS = $(LIN_TESTS) $(TLOG_TESTS) #$(LOG_TESTS)
RUN_LOG_TESTS = $(patsubst %.log$(BINSUF),%.logrun,$(LOG_TESTS))
RUN_TLOG_TESTS = $(patsubst %.tlog$(BINSUF),%.tlogrun,$(TLOG_TESTS))
RUN_LIN_TESTS = $(patsubst %.lin$(BINSUF),%.linrun,$(LIN_TESTS))
RUN_ALL_TESTS = $(RUN_LIN_TESTS) $(RUN_TLOG_TESTS) #$(RUN_LOG_TESTS)
RUN_WFG_TESTS = $(patsubst %.lin$(BINSUF),%.linrun,$(WFG_TESTS))
.PHONY: default all check tests check.lin check.tlog check.log tests.lin tests.log tests.tlog
default all build: $(ALL_TESTS)
check: $(RUN_ALL_TESTS)
tests: $(ALL_TESTS)
tests.lin: $(LIN_TESTS)
check.lin: $(RUN_LIN_TESTS)
tests.tlog: $(TLOG_TESTS)
check.tlog: $(RUN_TLOG_TESTS)
tests.log: $(LOG_TESTS)
check.log: $(RUN_LOG_TESTS)
check.wfg: $(RUN_WFG_TESTS)
.PHONY: %.linrun %.logrun %.run %.tlogrun
# STUFF!!!!
%.run: %.linrun %.tlogrun #%.logrun
%.linrun: %.lin$(BINSUF)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.tlogrun: %.tlog$(BINSUF)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.logrun: %.log$(BINSUF)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
A_LINEAR=$(LOCKTREE_LINEAR) $(RANGETREE_LINEAR)
A_TLOG =$(LOCKTREE_TLOG) $(RANGETREE_TLOG)
A_LOG =$(LOCKTREE_LOG) $(RANGETREE_LOG)
%.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR)
$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
%.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG)
$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS $(LINK_MUST_BE_LAST)
%.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG)
$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
clean:
rm -f $(ALL_TESTS)
rm -rf dir.*.lin dir.*.tlog dir.*.log
check_footprint.linrun: check_footprint_point.linrun check_footprint_range.linrun
true
check_footprint_point.linrun: test_footprint_point_write.lin
$(VGRIND) ./$< -v --nrows 1 && \
$(VGRIND) ./$< -v --nrows 2 && \
$(VGRIND) ./$< -v --nrows 10 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 100 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 1000 --max_locks 1000
check_footprint_range.linrun: test_footprint_range_write.lin
$(VGRIND) ./$< -v --nrows 1 && \
$(VGRIND) ./$< -v --nrows 2 && \
$(VGRIND) ./$< -v --nrows 10 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 100 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 1000 --max_locks 1000
check_footprint.tlogrun: check_footprint_point.tlogrun check_footprint_range.tlogrun
true
check_footprint_point.tlogrun: test_footprint_point_write.tlog
$(VGRIND) ./$< -v --nrows 1 && \
$(VGRIND) ./$< -v --nrows 2 && \
$(VGRIND) ./$< -v --nrows 10 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 100 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 1000 --max_locks 1000
check_footprint_range.tlogrun: test_footprint_range_write.tlog
$(VGRIND) ./$< -v --nrows 1 && \
$(VGRIND) ./$< -v --nrows 2 && \
$(VGRIND) ./$< -v --nrows 10 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 100 --max_locks 1000 && \
$(VGRIND) ./$< -v --nrows 1000 --max_locks 1000
RANGETREE_FILES = log_nooverlap
RANGETREE_HERE = $(ROOT)src/range_tree
RANGETREE_HEADERS = rangetree rangetree-internal
# -*- Mode: Makefile -*-
.DEFAULT_GOAL= build
TOKUROOT=../../
INCLUDEDIRS=-I. -I$(TOKUROOT)ft
DEPEND_COMPILE+= \
*.h \
#end
SKIP_RANGETREERULE=1
include $(TOKUROOT)toku_include/Makefile.include
RANGETREE = rangetree.$(AEXT)
RANGETREE_LINEAR = rangetree_linear.$(AEXT)
RANGETREE_TLOG = rangetree_tlog.$(AEXT)
RANGETREE_LOG = rangetree_log.$(AEXT)
#This line is so we can have a \ at the end of the previous.
RANGETREE =rangetree.$(AEXT)
LIBRARIES=$(RANGETREE_LINEAR) $(RANGETREE_TLOG) $(RANGETREE) # $(RANGETREE_LOG)
$(RANGETREE_TLOG): log_nooverlap.$(OEXT)
$(RANGETREE_LINEAR): linear.$(OEXT)
$(RANGETREE_LOG): log.$(OEXT)
$(RANGETREE_TLOG) $(RANGETREE_LINEAR) $(RANGETREE_LOG): CPPFLAGS+=-I$(TOKUROOT)include
$(RANGETREE): $(RANGETREE_TLOG)
cp $< $@
.PHONY: build check
build: $(LIBRARIES)
build check clean:
cd tests;$(MAKE) $@
# -*- Mode: Makefile -*-
.DEFAULT_GOAL= build
TOKUROOT=../../../
INCLUDEDIRS=-I. -I../ -I$(TOKUROOT)ft
DEPEND_COMPILE+=../rangetree.h ../rangetree-internal.h test.h
DEPEND_COMPILE+=$(FT_SO)
include $(TOKUROOT)toku_include/Makefile.include
LDLIBS+=-lft -ltokuportability
LDFLAGS+=-L$(TOKUROOT)lib -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib
ifeq ($(CC),icc)
SKIP_WARNING += $(ICC_NOWARN)1418 #Non static functions do not need prototypes.
endif
SRCS = $(wildcard *.c)
LOG_TESTS = $(patsubst %.c,%.log$(BINSUF),$(SRCS))
TLOG_TESTS = $(patsubst %.c,%.tlog$(BINSUF),$(SRCS))
LIN_TESTS = $(patsubst %.c,%.lin$(BINSUF),$(SRCS))
ALL_TESTS = $(LIN_TESTS) $(TLOG_TESTS) #$(LOG_TESTS)
$(ALL_TESTS): CPPFLAGS+=-I$(TOKUROOT)include
RUN_LOG_TESTS = $(patsubst %.log$(BINSUF),%.logrun,$(LOG_TESTS))
RUN_TLOG_TESTS = $(patsubst %.tlog$(BINSUF),%.tlogrun,$(TLOG_TESTS))
RUN_LIN_TESTS = $(patsubst %.lin$(BINSUF),%.linrun,$(LIN_TESTS))
RUN_ALL_TESTS = $(RUN_LIN_TESTS) $(RUN_TLOG_TESTS) #$(RUN_LOG_TESTS)
.PHONY: default all check tests check.lin check.tlog check.log tests.lin tests.log tests.tlog
default all build: $(ALL_TESTS)
check: $(RUN_ALL_TESTS)
tests: $(ALL_TESTS)
tests.lin: $(LIN_TESTS)
check.lin: $(RUN_LIN_TESTS)
tests.tlog: $(TLOG_TESTS)
check.tlog: $(RUN_TLOG_TESTS)
tests.log: $(LOG_TESTS)
check.log: $(RUN_LOG_TESTS)
.PHONY: %.linrun %.logrun %.run %.tlogrun
# STUFF!!!!
%.run: %.linrun %.tlogrun #%.logrun
%.linrun: %.lin$(BINSUF)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.tlogrun: %.tlog$(BINSUF)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
%.logrun: %.log$(BINSUF)
$(VGRIND) ./$< $(VERBVERBOSE) $(SUMMARIZE_CMD)
A_LINEAR=$(RANGETREE_LINEAR)
A_TLOG =$(RANGETREE_TLOG)
A_LOG =$(RANGETREE_LOG)
%.lin$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LINEAR)
$(CC) -DTESTDIR=\"dir.$<.lin\" $< $(A_LINEAR) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
%.tlog$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_TLOG)
$(CC) -DTESTDIR=\"dir.$<.tlog\" $< $(A_TLOG) $(BIN_FROM_C_FLAGS) -DTOKU_RT_NOOVERLAPS $(LINK_MUST_BE_LAST)
%.log$(BINSUF): %.c $(DEPEND_COMPILE) $(DEPEND_LINK) $(A_LOG)
$(CC) -DTESTDIR=\"dir.$<.log\" $< $(A_LOG) $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST)
clean:
rm -f $(ALL_TESTS)
rm -rf dir.*.lin dir.*.tlog dir.*.log
ROOT = ../../
build default: src/tests.builddir
check: src/tests.checkdir
include $(ROOT)Makefile.include
This diff is collapsed.
This diff is collapsed.
# -*- Mode: Makefile -*-
# standard build: make
#ident "Copyright (c) 2007 Tokutek Inc. All rights reserved."
.DEFAULT_GOAL= build
TOKUROOT=../
INCLUDEDIRS=-I. -I$(TOKUROOT)toku_include -I$(TOKUROOT)include -I$(TOKUROOT)ft -I$(TOKUROOT)src
DEPEND_COMPILE += \
./*.h \
#end
HERE = utils
include $(TOKUROOT)toku_include/Makefile.include
ifndef BDBDIR
BDBDIR=/usr/local/BerkeleyDB.4.6
endif
BDB_DUMP= LD_LIBRARY_PATH=$(BDBDIR)/lib $(BDBDIR)/bin/db_dump$(BINSUF) -h dir.$@.bdb
BDB_LOAD= LD_LIBRARY_PATH=$(BDBDIR)/lib $(BDBDIR)/bin/db_load$(BINSUF) -h dir.$@.bdb
DIFF=diff -q -I 'db_pagesize='
# vars to compile bins that handle tokudb using libdb.so
# when one uses relative address in an rpath, the library better be located relative
# to the current directory
# vars to compile bins that handle tokudb using libtokudb.a
CPPFLAGS+= -D_GNU_SOURCE
# vars to compile bins that handle bdb
BDB_CPPFLAGS = -I$(BDBDIR)/include
BDB_LDFLAGS = -L$(BDBDIR)/lib -ldb -lpthread $(BDB_LOADLIBES)
UTILS= \
tokudb_gen$(BINSUF) \
tokudb_load$(BINSUF) \
tokudb_dump$(BINSUF) \
#End
BDB_UTILS=$(patsubst %$(BINSUF),%.bdb$(BINSUF),$(UTILS))
STATIC_UTILS=$(patsubst %$(BINSUF),%_static$(BINSUF),$(UTILS))
ifeq ($(OS_CHOICE),windows)
$(UTILS): LINK_FILES+=$(WIN_YDB)
$(UTILS): $(WIN_YDB)
else
YDB_OBJS=$(wildcard ../src/*.$(OEXT))
ifeq ($(PROF),1)
$(STATIC_UTILS) $(UTILS): LINK_FILES=$(YDB_OBJS) $(TOKUROOT)lib/libtokudb.$(AEXT) $(LOCKTREE) $(RANGETREE) $(TOKUROOT)lib/libft.$(AEXT) $(LIBPORTABILITY_A)
else
$(UTILS): DLINK_FILES=$(TOKUROOT)lib/libtokudb.$(SOEXT) $(TOKUROOT)lib/libtokuportability.$(SOEXT)
$(STATIC_UTILS): LINK_FILES+= $(YDB_OBJS) ../src/lock_tree/locktree.a ../src/range_tree/rangetree.a ../lib/libft.a ../lib/libtokuportability.a $(LZMA_A)
endif
ifeq ($(FTLOADER),cilk)
DLINK_FILES += cilkrts stdc++
RPATH_DIRS += $(CILKROOT)lib64
endif
$(UTILS) $(STATIC_UTILS): RPATH_DIRS+=$(TOKUROOT)lib
endif
#empty
ifeq ($(OS_CHOICE),windows)
ifdef BDBDIR
$(BDB_UTILS): INCLUDEDIRS=-I$(BDBDIR)/include
$(BDB_UTILS): RPATH_DIRS=$(BDBDIR)/lib
endif
ifeq ($(DEBUG),0)
WINDOWS_BDB_LIB_NAME=libdb.$(SOEXT)
$(WINDOWS_BDB_LIB_NAME):
cp $(BDBDIR)/lib/libdb[0-9][0-9].$(SOEXT) ./
else
WINDOWS_BDB_LIB_NAME=libdbd.$(SOEXT)
$(WINDOWS_BDB_LIB_NAME):
cp $(BDBDIR)/lib/libdb[0-9][0-9]d.$(SOEXT) ./
endif
$(BDB_UTILS): DLINK_FILES=$(BDBDIR)/lib/$(WINDOWS_BDB_LIB_NAME)
#empty
else
WINDOWS_BDB_LIB_NAME=
#linux
ifdef BDBDIR
$(BDB_UTILS): INCLUDEDIRS=-I$(BDBDIR)/include
$(BDB_UTILS): RPATH_DIRS=$(BDBDIR)/lib
endif
$(BDB_UTILS): DLINK_FILES=db.$(SOEXT)
endif
$(BDB_UTILS): CPPFLAGS+=-DTOKU_ALLOW_DEPRECATED
$(BDB_UTILS): LDLIBS+=-ltokuportability
$(BDB_UTILS): LDFLAGS+=-L$(TOKUROOT)lib -Wl,-rpath,$(shell pwd)/$(TOKUROOT)lib
#empty on purpose
$(BDB_UTILS): CPPFLAGS+=-DIS_TDB=0
$(UTILS) $(STATIC_UTILS): CPPFLAGS+=-DIS_TDB=1
$(STATIC_UTILS): CPPFLAGS+=-DTDB_IS_STATIC=1
$(UTILS): CPPFLAGS+=-DTDB_IS_STATIC=0
HERE=utils
ifeq ($(SUMMARIZE),1)
SUMMARIZE_CMD = ;if test $$? = 0; then printf "%-60sPASS\n" $(HERE)/$@; else printf "%-60sFAIL\n" $(HERE)/$@ ; test 0 = 1; fi
else
SUMMARIZE_CMD =
endif
.PHONY: all clean test test_gen test_gen_hex test_load test_dump
build all: build.tdb build.bdb;
ifeq ($(OS_CHOICE),windows)
build.tdb: $(UTILS) copy.tdb;
build.bdb: $(BDB_UTILS) copy.bdb;
else
build.tdb: $(UTILS) $(STATIC_UTILS);
build.bdb: $(BDB_UTILS);
endif
copy.tdb: $(PTHREAD_LOCAL)
cp ../lib/*.dll ./
copy.bdb:
cp $(BDBDIR)/lib/*.dll ./
coverage: $(UTILS)
%$(BINSUF): %.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST) -DUSE_TDB=1
%.bdb$(BINSUF): %.c
$(CC) $< $(BIN_FROM_C_FLAGS) $(LINK_MUST_BE_LAST) -DUSE_BDB=1
%_static$(BINSUF): %.c $(TOKUROOT)lib/libtokuportability.$(AEXT)
$(CC) $< $(BIN_FROM_C_FLAGS) $(TOKUROOT)lib/libtokuportability.$(AEXT) $(LINK_MUST_BE_LAST)
strip: $(STATIC_UTILS)
strip $(STATIC_UTILS)
check: build test_gen test_load test_dump test_nodup
test-coverage: $(UTILS) test_gen test_load test_dump test_nodup
test_gen: test_gen_hex
TEST_GEN_HEX_NUMKEYS=10000
TEST_GEN_HEX_LENGTHMIN=0
TEST_GEN_HEX_LENGTHLIMIT=1024
TEST_GEN_HEX_FLAGS=-n $(TEST_GEN_HEX_NUMKEYS) -m $(TEST_GEN_HEX_LENGTHMIN) -M $(TEST_GEN_HEX_LENGTHLIMIT) -r 5
TDB_GEN=./tokudb_gen$(BINSUF)
TDB_LOAD=./tokudb_load$(BINSUF) -h dir.$@.tdb
TDB_DUMP=./tokudb_dump$(BINSUF) -h dir.$@.tdb
TDB_DUMPBDB=./tokudb_dump.bdb$(BINSUF) -h dir.$@.bdb
ifeq ($(OS_CHOICE),windows)
LINEEND = "\r\n"
TO_NATIVE = unix2dos --u2d
else
LINEEND = "\n"
TO_NATIVE = cat
endif
test_gen_hex: build
#Generating $(TEST_GEN_HEX_NUMKEYS) keys. [$(TEST_GEN_HEX_LENGTHMIN),$(TEST_GEN_HEX_LENGTHLIMIT)) bytes + identifier overhead
@#echo "Generating text input > db > text"
rm -rf dir.$@.*
mkdir dir.$@.tdb
mkdir dir.$@.bdb
$(TDB_GEN) $(TEST_GEN_HEX_FLAGS) > $@.gen.temp && \
$(BDB_LOAD) $@.db.temp < $@.gen.temp && \
$(BDB_DUMP) $@.db.temp > $@.load_dump.temp && \
$(TDB_GEN) -H -f > $@.gen_sorted.temp && \
export LC_ALL=C;$(TDB_GEN) -h -f $(TEST_GEN_HEX_FLAGS) -d "\t" -s "\n" | sort -k 1,1 | tr -d $(LINEEND) | tr "\t" "\n" | $(TO_NATIVE) >> $@.gen_sorted.temp && \
$(TDB_GEN) -F -h >> $@.gen_sorted.temp && \
$(DIFF) $@.load_dump.temp $@.gen_sorted.temp \
$(SUMMARIZE_CMD)
test_load: test_load_hex test_load_text test_load_text_noendline
test_load_hex: build
#Generating $(TEST_GEN_HEX_NUMKEYS) keys. [$(TEST_GEN_HEX_LENGTHMIN),$(TEST_GEN_HEX_LENGTHLIMIT)) bytes + identifier overhead
@#echo "Generating text input > db > text"
rm -rf dir.$@.*
mkdir dir.$@.tdb
mkdir dir.$@.bdb
$(TDB_GEN) $(TEST_GEN_HEX_FLAGS) > $@.gen.temp && \
$(BDB_LOAD) $@.bdb.temp < $@.gen.temp && \
$(TDB_LOAD) $@.tokudb.temp < $@.gen.temp && \
$(BDB_DUMP) $@.bdb.temp > $@.dump.bdb.temp && \
$(TDB_DUMP) $@.tokudb.temp > $@.dump.tokudb.temp && \
$(DIFF) -q $@.dump.bdb.temp $@.dump.tokudb.temp \
$(SUMMARIZE_CMD)
TEST_GEN_TEXT_FLAGS=-n $(TEST_GEN_HEX_NUMKEYS) -m $(TEST_GEN_HEX_LENGTHMIN) -M $(TEST_GEN_HEX_LENGTHLIMIT) -r 5 -T -P
test_load_text: build
#Generating $(TEST_GEN_HEX_NUMKEYS) keys. [$(TEST_GEN_HEX_LENGTHMIN),$(TEST_GEN_HEX_LENGTHLIMIT)) bytes + identifier overhead
@#echo "Generating text input > db > text"
rm -rf dir.$@.*
mkdir dir.$@.tdb
mkdir dir.$@.bdb
$(TDB_GEN) $(TEST_GEN_TEXT_FLAGS) > $@.gen.temp && \
$(BDB_LOAD) -T -t btree $@.bdb.temp < $@.gen.temp && \
$(TDB_LOAD) -T -t btree $@.tokudb.temp < $@.gen.temp && \
$(BDB_DUMP) -p $@.bdb.temp > $@.dump.bdb.temp && \
$(TDB_DUMP) -p $@.tokudb.temp > $@.dump.tokudb.temp && \
$(DIFF) -q $@.dump.bdb.temp $@.dump.tokudb.temp \
$(SUMMARIZE_CMD)
test_load_text_noendline: build
@#echo "Testing no end of line at end of file."
rm -rf dir.$@.*
mkdir dir.$@.tdb
mkdir dir.$@.bdb
echo -en "key\nvalue" > $@.gen.temp
$(TDB_LOAD) -T -t btree $@.tokudb.temp < $@.gen.temp $(SUMMARIZE_CMD)
test_dump: build
#Generating $(TEST_GEN_HEX_NUMKEYS) keys. [$(TEST_GEN_HEX_LENGTHMIN),$(TEST_GEN_HEX_LENGTHLIMIT)) bytes + identifier overhead
@#echo "Generating text input > db > text"
rm -rf dir.$@.*
mkdir dir.$@.tdb
mkdir dir.$@.bdb
$(TDB_GEN) $(TEST_GEN_HEX_FLAGS) > $@.gen.temp && \
$(BDB_LOAD) $@.bdb.temp < $@.gen.temp && \
$(BDB_DUMP) $@.bdb.temp > $@.dump.bdb.temp && \
$(TDB_DUMPBDB) $@.bdb.temp > $@.dump.tokudb.temp && \
$(DIFF) -q $@.dump.bdb.temp $@.dump.tokudb.temp \
$(SUMMARIZE_CMD)
test_nodup: build
rm -rf dir.$@.*
mkdir dir.$@.tdb
mkdir dir.$@.bdb
$(TDB_GEN) $(TEST_GEN_HEX_FLAGS) >$@.gen.temp && \
$(BDB_LOAD) $@.bdb.temp <$@.gen.temp && \
$(BDB_DUMP) $@.bdb.temp >$@.dump.bdb.temp && \
$(TDB_LOAD) $@.tdb.temp <$@.gen.temp && \
$(TDB_DUMP) $@.tdb.temp >$@.dump.tdb.temp && \
$(DIFF) -q $@.dump.bdb.temp $@.dump.tdb.temp && \
$(TDB_LOAD) $@.tdb.temp <$@.gen.temp && \
$(TDB_DUMP) $@.tdb.temp >$@.dump.tdb.temp && \
$(DIFF) -q $@.dump.bdb.temp $@.dump.tdb.temp \
$(SUMMARIZE_CMD)
#if $(DIFF) -q <(echo "foo") <(echo "foo") > /dev/null; then echo yes; else echo no; fi
clean:
rm -rf *.so *.o $(UTILS) $(BDB_UTILS) $(STATIC_UTILS) *.temp *.gcno *.gcda *.gcov *.temp.clean *.temp.dirty
rm -rf tokudb.directory tokudb.environment *.log *.tokudb *.tokulog
rm -rf dir.*
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