Makefile.am 3.18 KB
Newer Older
1
SUBDIRS = testdata
2

3
4
AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
AM_CPPFLAGS += -I$(top_builddir)/src/lib/dns -I$(top_srcdir)/src/lib/dns
5
AM_CPPFLAGS += $(BOOST_INCLUDES)
6
AM_CPPFLAGS += $(SQLITE_CFLAGS)
7
8
9
AM_CPPFLAGS += -DTEST_DATA_DIR=\"$(abs_srcdir)/testdata\"
AM_CPPFLAGS += -DTEST_DATA_BUILDDIR=\"$(abs_builddir)/testdata\"
AM_CPPFLAGS += -DINSTALL_PROG=\"$(abs_top_srcdir)/install-sh\"
Evan Hunt's avatar
Evan Hunt committed
10

11
12
AM_CXXFLAGS = $(B10_CXXFLAGS)

JINMEI Tatuya's avatar
JINMEI Tatuya committed
13
14
15
16
if USE_STATIC_LINK
AM_LDFLAGS = -static
endif

Evan Hunt's avatar
Evan Hunt committed
17
18
19
20
21
22
CLEANFILES = *.gcno *.gcda

TESTS =
if HAVE_GTEST
TESTS += run_unittests
run_unittests_SOURCES = run_unittests.cc
23
24
run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.h
run_unittests_SOURCES += $(top_srcdir)/src/lib/dns/tests/unittest_util.cc
Evan Hunt's avatar
Evan Hunt committed
25
run_unittests_SOURCES += datasrc_unittest.cc
26
27
run_unittests_SOURCES += sqlite3_unittest.cc
run_unittests_SOURCES += static_unittest.cc
28
run_unittests_SOURCES += query_unittest.cc
Evan Hunt's avatar
Evan Hunt committed
29
run_unittests_SOURCES += cache_unittest.cc
30
run_unittests_SOURCES += test_datasrc.h test_datasrc.cc
31
run_unittests_SOURCES += rbtree_unittest.cc
32
33
#run_unittests_SOURCES += zonetable_unittest.cc
#run_unittests_SOURCES += memory_datasrc_unittest.cc
34
run_unittests_SOURCES += logger_unittest.cc
35
run_unittests_SOURCES += database_unittest.cc
36
run_unittests_SOURCES += client_unittest.cc
37
run_unittests_SOURCES += sqlite3_accessor_unittest.cc
38
39
40
41
42
if !USE_STATIC_LINK
# This test uses dynamically loadable module.  It will cause various
# troubles with static link such as "missing" symbols in the static object
# for the module.  As a workaround we disable this particualr test
# in this case.
43
run_unittests_SOURCES += factory_unittest.cc
44
endif
45
46
47
# for the dlopened types we have tests for, we also need to include the
# sources
run_unittests_SOURCES += $(top_srcdir)/src/lib/datasrc/sqlite3_accessor.cc
48
#run_unittests_SOURCES += $(top_srcdir)/src/lib/datasrc/memory_datasrc.cc
49

Evan Hunt's avatar
Evan Hunt committed
50
run_unittests_CPPFLAGS = $(AM_CPPFLAGS) $(GTEST_INCLUDES)
51
52
53
run_unittests_LDFLAGS  = $(AM_LDFLAGS)  $(GTEST_LDFLAGS)

run_unittests_LDADD  = $(GTEST_LDADD)
Evan Hunt's avatar
Evan Hunt committed
54
run_unittests_LDADD += $(SQLITE_LIBS)
55
run_unittests_LDADD += $(top_builddir)/src/lib/datasrc/libdatasrc.la
56
run_unittests_LDADD += $(top_builddir)/src/lib/dns/libdns++.la
57
run_unittests_LDADD += $(top_builddir)/src/lib/util/libutil.la
58
59
60
61
run_unittests_LDADD += $(top_builddir)/src/lib/log/liblog.la
run_unittests_LDADD += $(top_builddir)/src/lib/exceptions/libexceptions.la
run_unittests_LDADD += $(top_builddir)/src/lib/cc/libcc.la
run_unittests_LDADD += $(top_builddir)/src/lib/testutils/libtestutils.la
62
run_unittests_LDADD += $(top_builddir)/src/lib/util/unittests/libutil_unittests.la
Evan Hunt's avatar
Evan Hunt committed
63
64
endif

65
noinst_PROGRAMS = $(TESTS)
66
67
68
69
70

EXTRA_DIST =  testdata/brokendb.sqlite3
EXTRA_DIST += testdata/example.com.signed
EXTRA_DIST += testdata/example.org
EXTRA_DIST += testdata/example.org.sqlite3
71
72
EXTRA_DIST += testdata/example2.com
EXTRA_DIST += testdata/example2.com.sqlite3
73
74
75
76
77
78
EXTRA_DIST += testdata/mkbrokendb.c
EXTRA_DIST += testdata/root.zone
EXTRA_DIST += testdata/sql1.example.com.signed
EXTRA_DIST += testdata/sql2.example.com.signed
EXTRA_DIST += testdata/test-root.sqlite3
EXTRA_DIST += testdata/test.sqlite3
79
EXTRA_DIST += testdata/test.sqlite3.nodiffs
80
EXTRA_DIST += testdata/rwtest.sqlite3
JINMEI Tatuya's avatar
JINMEI Tatuya committed
81
EXTRA_DIST += testdata/diffs.sqlite3