diff options
author | Thomas Markwalder <tmark@isc.org> | 2019-12-20 10:11:54 -0500 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2020-01-14 14:28:42 -0500 |
commit | 0a2f9a62bceb90b0d30461add2e25c4ce7a24547 (patch) | |
tree | 26125fe40514062d8f61a259d1ecb97352b94ea2 /relay/tests/Makefile.am | |
parent | 5da634c5af4ad1ed21d1822de5105ac3edf0eeee (diff) | |
download | isc-dhcp-0a2f9a62bceb90b0d30461add2e25c4ce7a24547.tar.gz |
[#71] Fix dhcrelay agent option buffer pointer logic
relay/dhcrelay.c
Added UNIT_TEST conditionals and such for unit test support
strip_relay_agent_options()
strip_relay_agent_options()
- corrected buffer pointer logic
relay/tests/Atffile
relay/tests/Kyuafile
relay/tests/Makefile.am
relay/tests/relay_unittests.c
- new unit test files
configure.ac-base
added relay/tests/Makefile
regenerated configure files
configure
configure.ac
configure.ac+lt
configure.ac-lt
Diffstat (limited to 'relay/tests/Makefile.am')
-rw-r--r-- | relay/tests/Makefile.am | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/relay/tests/Makefile.am b/relay/tests/Makefile.am new file mode 100644 index 00000000..0da6e292 --- /dev/null +++ b/relay/tests/Makefile.am @@ -0,0 +1,49 @@ +SUBDIRS = . + +AM_CPPFLAGS = $(ATF_CFLAGS) -DUNIT_TEST -I$(top_srcdir)/includes +AM_CPPFLAGS += -I@BINDDIR@/include -I$(top_srcdir) +AM_CPPFLAGS += -DLOCALSTATEDIR='"."' + +EXTRA_DIST = Atffile Kyuafile + +# for autotools debugging only +info: + @echo "ATF_CFLAGS=$(ATF_CFLAGS)" + @echo "ATF_LDFLAGS=$(ATF_LDFLAGS)" + @echo "ATF_LIBS=$(ATF_LIBS)" + +DHCPSRC = ../dhcrelay.c + +DHCPLIBS = $(top_builddir)/common/libdhcp.@A@ \ + $(top_builddir)/omapip/libomapi.@A@ \ + @BINDLIBIRSDIR@/libirs.@A@ \ + @BINDLIBDNSDIR@/libdns.@A@ \ + @BINDLIBISCCFGDIR@/libisccfg.@A@ \ + @BINDLIBISCDIR@/libisc.@A@ + +ATF_TESTS = +if HAVE_ATF + +ATF_TESTS += relay_unittests + +relay_unittests_SOURCES = $(DHCPSRC) +relay_unittests_SOURCES += relay_unittests.c + +relay_unittests_LDADD = $(ATF_LDFLAGS) +relay_unittests_LDADD += $(DHCPLIBS) + +check: $(ATF_TESTS) + @if test $(top_srcdir) != ${top_builddir}; then \ + cp $(top_srcdir)/relay/tests/Atffile Atffile; \ + cp $(top_srcdir)/relay/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) |