From a175314c3e5827eb193872241446f2f8f5c9d33c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 4 May 2024 20:07:14 +0200 Subject: Adding upstream version 1:10.5.12. Signed-off-by: Daniel Baumann --- storage/tokudb/tests/Makefile | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 storage/tokudb/tests/Makefile (limited to 'storage/tokudb/tests/Makefile') diff --git a/storage/tokudb/tests/Makefile b/storage/tokudb/tests/Makefile new file mode 100644 index 00000000..47e2027e --- /dev/null +++ b/storage/tokudb/tests/Makefile @@ -0,0 +1,53 @@ +SRCS = $(wildcard *.cc) +TARGETS = $(patsubst %.cc,%,$(SRCS)) +CHECKS = $(patsubst %,%.check,$(TARGETS)) +CPPFLAGS = -I.. -D__STDC_FORMAT_MACROS +CXXFLAGS = -g -Wall -Wextra -Wno-missing-field-initializers -Wshadow +ifdef USE_OPENMP +CPPFLAGS += -DUSE_OPENMP +CXXFLAGS += -fopenmp +endif + +FRACTALTREE_BASE_DIR = ../ft-index +FRACTALTREE_INSTALL_DIR = $(FRACTALTREE_BASE_DIR)/install.debug +VALGRIND = valgrind -q --leak-check=full --show-reachable=yes --suppressions=$(FRACTALTREE_BASE_DIR)/ft/valgrind.suppressions --soname-synonyms=somalloc=*tokuportability* + +ifeq ($(GCOV),1) +CXXFLAGS += -fprofile-arcs -ftest-coverage +else +CXXFLAGS += -O3 +endif + +all: $(TARGETS) + +clean: + rm -rf $(TARGETS) *.gcov *.gcno *.gcda *.testdir *.dSYM + +%.check: % + LD_LIBRARY_PATH=$(FRACTALTREE_INSTALL_DIR)/lib $(VALGRIND) ./$< + +card.check: $(patsubst %.cc,%.check,$(wildcard card*.cc)) + true + +ifndef USE_OPENMP +# unravel vlq_test_uint64 8 times +vlq_test_uint64_%.check: + LD_LIBRARY_PATH=$(FRACTALTREE_INSTALL_DIR)/lib $(VALGRIND) ./vlq_test_uint64 $(patsubst vlq_test_uint64_%.check,%,$@) 8 +vlq_test_uint64.check: $(foreach i,0 1 2 3 4 5 6 7,vlq_test_uint64_$(i).check) + true +endif + +vlq.check: $(patsubst %.cc,%.check,$(wildcard vlq*.cc)) + true + +max_test.check: max_test + $(VALGRIND) ./$< 1 2 + +check: $(CHECKS) + true + +%: %.cc + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $< + +card_%: card_%.cc + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -g -o $@ $< -I.. -I$(FRACTALTREE_INSTALL_DIR)/include -L$(FRACTALTREE_INSTALL_DIR)/lib -ltokufractaltree -ltokuportability -- cgit v1.2.3