Makefile.am 5.36 KB
Newer Older
1
AM_CPPFLAGS = \
2 3 4 5
	-include $(top_builddir)/src/config.h	\
	-I$(top_srcdir)/src			\
	-I$(top_srcdir)/src/libdnssec		\
	-I$(top_srcdir)/src/libdnssec/shared	\
6
	$(gnutls_CFLAGS)
7 8

LDADD = \
9 10 11 12 13
	libtap.la				\
	$(top_builddir)/src/libknot.la		\
	$(top_builddir)/src/libshared.la	\
	$(top_builddir)/src/libdnssec.la	\
	$(top_builddir)/src/libcontrib.la	\
14
	$(top_builddir)/src/libzscanner.la
15

16 17 18 19 20
if HAVE_DAEMON
LDADD += \
	$(top_builddir)/src/libknotd.la
endif HAVE_DAEMON

21
EXTRA_DIST = \
22 23 24 25 26 27
	tap/libtap.sh				\
	libdnssec/sample_keys.h			\
	knot/semantic_check_data		\
	knot/test_semantic_check.in		\
	libzscanner/data			\
	libzscanner/test_zscanner.in		\
28
	libzscanner/TESTS
29

30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
check_LTLIBRARIES = libtap.la

libtap_la_SOURCES = \
	tap/basic.c				\
	tap/basic.h				\
	tap/files.c				\
	tap/files.h				\
	tap/float.c				\
	tap/float.h				\
	tap/macros.h

EXTRA_PROGRAMS = tap/runtests

tap_runtests_LDADD =

45
check_PROGRAMS = \
46 47 48 49 50 51 52 53 54 55 56 57
	contrib/test_base32hex			\
	contrib/test_base64			\
	contrib/test_dynarray			\
	contrib/test_heap			\
	contrib/test_net			\
	contrib/test_net_shortwrite		\
	contrib/test_qp-trie			\
	contrib/test_siphash			\
	contrib/test_sockaddr			\
	contrib/test_string			\
	contrib/test_strtonum			\
	contrib/test_time			\
58 59
	contrib/test_wire_ctx

60
check_PROGRAMS += \
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
	libdnssec/test_binary			\
	libdnssec/test_crypto			\
	libdnssec/test_key			\
	libdnssec/test_key_algorithm		\
	libdnssec/test_key_ds			\
	libdnssec/test_keyid			\
	libdnssec/test_keystore_pkcs11		\
	libdnssec/test_keystore_pkcs8		\
	libdnssec/test_keystore_pkcs8_dir 	\
	libdnssec/test_keytag			\
	libdnssec/test_list			\
	libdnssec/test_nsec_bitmap		\
	libdnssec/test_nsec_hash		\
	libdnssec/test_random			\
	libdnssec/test_sign			\
	libdnssec/test_sign_der			\
	libdnssec/test_shared_bignum		\
	libdnssec/test_shared_dname		\
79
	libdnssec/test_tsig
80

81
if HAVE_DAEMON
82
check_PROGRAMS += \
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
	knot/test_acl				\
	knot/test_changeset			\
	knot/test_conf				\
	knot/test_conf_tools			\
	knot/test_confdb			\
	knot/test_confio			\
	knot/test_dthreads			\
	knot/test_fdset				\
	knot/test_journal			\
	knot/test_kasp_db			\
	knot/test_node				\
	knot/test_process_query			\
	knot/test_query_module			\
	knot/test_requestor			\
	knot/test_server			\
	knot/test_worker_pool			\
	knot/test_worker_queue			\
	knot/test_zone-tree			\
	knot/test_zone-update			\
	knot/test_zone_events			\
	knot/test_zone_serial			\
	knot/test_zone_timers			\
105 106
	knot/test_zonedb

107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
knot_test_acl_SOURCES = \
	knot/test_acl.c				\
	knot/test_conf.h

knot_test_conf_SOURCES = \
	knot/test_conf.c			\
	knot/test_conf.h

knot_test_confdb_SOURCES = \
	knot/test_confdb.c			\
	knot/test_conf.h

knot_test_confio_SOURCES = \
	knot/test_confio.c			\
	knot/test_conf.h

knot_test_process_query_SOURCES = \
	knot/test_process_query.c		\
	knot/test_server.h			\
	knot/test_conf.h
127
endif HAVE_DAEMON
128

129
check_PROGRAMS += \
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
	libknot/test_control			\
	libknot/test_cookies			\
	libknot/test_db				\
	libknot/test_descriptor			\
	libknot/test_dname			\
	libknot/test_edns			\
	libknot/test_edns_ecs			\
	libknot/test_endian			\
	libknot/test_lookup			\
	libknot/test_pkt			\
	libknot/test_rdata			\
	libknot/test_rdataset			\
	libknot/test_rrset			\
	libknot/test_rrset-wire			\
	libknot/test_tsig			\
	libknot/test_yparser			\
	libknot/test_ypschema			\
	libknot/test_yptrafo			\
	libknot/test_wire
149

150
if HAVE_LIBUTILS
151
check_PROGRAMS += \
152
	utils/test_cert				\
153
	utils/test_lookup
154
endif HAVE_LIBUTILS
155

156
if HAVE_DAEMON
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
if STATIC_MODULE_onlinesign
check_PROGRAMS += \
	modules/test_onlinesign
else
if SHARED_MODULE_onlinesign
check_PROGRAMS += \
	modules/test_onlinesign
endif
endif

if STATIC_MODULE_rrl
check_PROGRAMS += \
	modules/test_rrl
else
if SHARED_MODULE_rrl
check_PROGRAMS += \
	modules/test_rrl
endif
endif
176
endif HAVE_DAEMON
177

178
libdnssec_test_keystore_pkcs11_CPPFLAGS = \
179 180 181
	$(AM_CPPFLAGS) \
	-DLIBDIR='"$(libdir)"'

182
if HAVE_LIBUTILS
183 184 185 186
utils_test_lookup_CPPFLAGS = \
	$(AM_CPPFLAGS) \
	$(libedit_CFLAGS)

187
utils_test_lookup_LDADD = \
188
	libtap.la \
189 190
	$(top_builddir)/src/libknotus.la \
	$(libedit_LIBS)
191

192 193
utils_test_cert_CPPFLAGS = \
	$(AM_CPPFLAGS) \
194
	$(libedit_CFLAGS)
195 196

utils_test_cert_LDADD = \
197
	libtap.la \
198 199
	$(top_builddir)/src/libknotus.la \
	$(libedit_LIBS)
200
endif HAVE_LIBUTILS
201

202
EXTRA_PROGRAMS += libzscanner/zscanner-tool
203

204
libzscanner_zscanner_tool_SOURCES = \
205 206 207
	libzscanner/zscanner-tool.c	\
	libzscanner/processing.h	\
	libzscanner/processing.c
208 209

check_SCRIPTS = \
210
	libzscanner/test_zscanner
211 212 213 214 215

edit = $(SED) \
	-e 's|@top_srcdir[@]|$(abs_top_srcdir)|g' \
	-e 's|@top_builddir[@]|$(abs_top_builddir)|g'

216 217 218 219
if HAVE_LIBUTILS
check_SCRIPTS += \
	knot/test_semantic_check

220 221 222
knot/test_semantic_check:
	@$(edit) < $(top_srcdir)/tests/$@.in > $(top_builddir)/tests/$@
	@chmod +x $(top_builddir)/tests/$@
223
endif HAVE_LIBUTILS
224

225
libzscanner/test_zscanner: libzscanner/zscanner-tool
226 227
	@$(edit) < $(top_srcdir)/tests/$@.in > $(top_builddir)/tests/$@
	@chmod +x $(top_builddir)/tests/$@
228

229
CLEANFILES = $(check_SCRIPTS) $(EXTRA_PROGRAMS) runtests.log
230

231
check-compile: $(check_LTLIBRARIES) $(EXTRA_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS)
Vitezslav Kriz's avatar
Vitezslav Kriz committed
232

233 234 235 236
AM_V_RUNTESTS = $(am__v_RUNTESTS_@AM_V@)
am__v_RUNTESTS_ = $(am__v_RUNTESTS_@AM_DEFAULT_V@)
am__v_RUNTESTS_0 =
am__v_RUNTESTS_1 = RET=$$?; if [ "$$RET" != "0" ]; then cat "$(builddir)/runtests.log"; exit $$RET; fi
237 238
check-local: $(check_LTLIBRARIES) $(EXTRA_PROGRAMS) $(check_PROGRAMS) $(check_SCRIPTS)
	@$(top_builddir)/tests/tap/runtests -s $(srcdir) -b $(builddir)  \
239
	 -L $(builddir)/runtests.log $(check_PROGRAMS) $(check_SCRIPTS); \
240
	$(AM_V_RUNTESTS)