mariadb/cxx/tests/Makefile

43 lines
970 B
Makefile
Raw Normal View History

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