summaryrefslogtreecommitdiff
path: root/common/tests/Makefile.am
blob: 4129e4506f6f85bcc93d3e12f6077258032c0082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
SUBDIRS = .

AM_CPPFLAGS = $(ATF_CFLAGS) -I$(top_srcdir)/includes

EXTRA_DIST = Atffile Kyuafile

ATF_TESTS =

if HAVE_ATF

ATF_TESTS += alloc_unittest dns_unittest misc_unittest ns_name_unittest

alloc_unittest_SOURCES = test_alloc.c $(top_srcdir)/tests/t_api_dhcp.c
alloc_unittest_LDADD = $(ATF_LDFLAGS)
alloc_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
	@BINDLIBIRSDIR@/libirs.@A@ \
	@BINDLIBDNSDIR@/libdns.@A@ \
	@BINDLIBISCCFGDIR@/libisccfg.@A@  \
	@BINDLIBISCDIR@/libisc.@A@

dns_unittest_SOURCES = dns_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
dns_unittest_LDADD = $(ATF_LDFLAGS)
dns_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
	@BINDLIBIRSDIR@/libirs.@A@ \
	@BINDLIBDNSDIR@/libdns.@A@ \
	@BINDLIBISCCFGDIR@/libisccfg.@A@  \
	@BINDLIBISCDIR@/libisc.@A@

misc_unittest_SOURCES = misc_unittest.c $(top_srcdir)/tests/t_api_dhcp.c
misc_unittest_LDADD = $(ATF_LDFLAGS)
misc_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
	@BINDLIBIRSDIR@/libirs.@A@ \
	@BINDLIBDNSDIR@/libdns.@A@ \
	@BINDLIBISCCFGDIR@/libisccfg.@A@  \
	@BINDLIBISCDIR@/libisc.@A@

ns_name_unittest_SOURCES = ns_name_test.c $(top_srcdir)/tests/t_api_dhcp.c
ns_name_unittest_LDADD = $(ATF_LDFLAGS)
ns_name_unittest_LDADD += ../libdhcp.@A@ ../../omapip/libomapi.@A@ \
	@BINDLIBIRSDIR@/libirs.@A@ \
	@BINDLIBDNSDIR@/libdns.@A@ \
	@BINDLIBISCCFGDIR@/libisccfg.@A@  \
	@BINDLIBISCDIR@/libisc.@A@

check: $(ATF_TESTS)
	@if test $(top_srcdir) != ${top_builddir}; then \
		cp $(top_srcdir)/common/tests/Atffile Atffile; \
		cp $(top_srcdir)/common/tests/Kyuafile Kyuafile; \
	fi
	sh ${top_builddir}/tests/unittest.sh

distclean-local:
	@if test $(top_srcdir) != ${top_builddir}; then \
		rm -f Atffile Kyuafile; \
	fi

endif

check_PROGRAMS = $(ATF_TESTS)