summaryrefslogtreecommitdiff
path: root/client/tests/Makefile.am
blob: c07c504a943a38a930d8aad0956d684dc93be4ce (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
SUBDIRS = .

BINDLIBDIR = @BINDDIR@/lib

AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes
AM_CPPFLAGS += -I$(top_srcdir)/bind/include -I$(top_srcdir)
AM_CPPFLAGS += -DLOCALSTATEDIR='"."'
AM_CPPFLAGS += -DCLIENT_PATH='"."'

EXTRA_DIST = Atffile duid0_test.txt duid1_test.txt duid2_test.txt duid3_test.txt

# for autotools debugging only
info:
	@echo "ATF_CFLAGS=$(ATF_CFLAGS)"
	@echo "ATF_LDFLAGS=$(ATF_LDFLAGS)"
	@echo "ATF_LIBS=$(ATF_LIBS)"

DHCPSRC = ../clparse.c ../dhc6.c ../dhclient.c

DHCPLIBS = $(top_builddir)/common/libdhcp.a $(top_builddir)/omapip/libomapi.a    \
          $(top_builddir)/dhcpctl/libdhcpctl.a $(BINDLIBDIR)/libirs.a \
	  $(BINDLIBDIR)/libdns.a $(BINDLIBDIR)/libisccfg.a \
	  $(BINDLIBDIR)/libisc.a

ATF_TESTS =
if HAVE_ATF

ATF_TESTS += duid_unittests 

duid_unittests_SOURCES = $(DHCPSRC) 
duid_unittests_SOURCES += duid_unittest.c

duid_unittests_LDADD = $(ATF_LDFLAGS)
duid_unittests_LDADD += $(DHCPLIBS)

check: $(ATF_TESTS)
	sh ${top_srcdir}/tests/unittest.sh

endif

check_PROGRAMS = $(ATF_TESTS)