mariadb/cxx/tests/Makefile
Rich Prohaska 95416f09a8 add GCOV_FLAGS var to Makefiles. addresses #277
git-svn-id: file:///svn/tokudb@1693 c7de825b-a66e-492c-adef-691d508d4ae1
2008-01-16 17:41:47 +00:00

42 lines
970 B
Makefile

SRCS = $(wildcard *.cpp)
TARGETS = $(patsubst %.cpp,%,$(SRCS))
# OPTFLAGS = -O0
# GCOV_FLAGS = -fprofile-arcs -ftest-coverage
CPPFLAGS = -I../ -I../../include
CXXFLAGS = -Wall $(OPTFLAGS) -g $(GCOV_FLAGS)
LDLIBS = ../../lib/libtdb_cxx.a ../../lib/libdb.a -lz
ifeq ($(OSX),OSX)
VGRIND=
else
VGRIND=valgrind --quiet --error-exitcode=1 --leak-check=yes
endif
all: $(TARGETS)
$(TARGETS): $(DBCXX)
$(DBCXX):
cd ..;make
clean:
rm -rf $(TARGETS) *.gcno *.gcda *.gcov
check: $(TARGETS)
$(VGRIND) ./test1
$(VGRIND) ./test1e
rm -f foo.db
$(VGRIND) ./db_create foo.db a b c d
$(VGRIND) ./db_dump foo.db > foo.out
(echo " 61";echo " 62";echo " 63";echo " 64")>foo.expectout
diff foo.out foo.expectout
$(VGRIND) ./db_dump_e foo.db > foo.out
diff foo.out foo.expectout
$(VGRIND) ./exceptions
$(VGRIND) ./test_no_env
$(VGRIND) ./test_db_assoc3
$(VGRIND) ./test_db_assoc3 --more
$(VGRIND) ./test_cursor_count
$(VGRIND) ./test_fd
$(VGRIND) ./test_error_stream