Move the libtest code into a 'libtest' subdirectory and make it
one of the SUBDIRS in the tests Makefile. having it at the top level
required having "." as one of the subdirs, and that caused the
unit tests to be executed twice.
(cherry picked from commit
568f65cc56370c211454d041c6b13d0d593cadab)
-DNAMED_PLUGINDIR=\"$(pkglibdir)\" \
-DTESTS_DIR=\"$(abs_srcdir)\"
-LDADD += \
- $(top_builddir)/tests/libtest.la \
+LDADD += \
+ $(top_builddir)/tests/libtest/libtest.la \
$(CMOCKA_LIBS)
tests/dns/Makefile
tests/ns/Makefile
tests/irs/Makefile
- tests/isccfg/Makefile])
+ tests/isccfg/Makefile
+ tests/libtest/Makefile])
AC_CONFIG_FILES([tests/unit-test-driver.sh],
[chmod +x tests/unit-test-driver.sh])
$(LIBDNS_LIBS) \
$(LIBNS_LIBS)
-SUBDIRS = . isc dns ns isccfg irs
-
-check_LTLIBRARIES = libtest.la
-
-noinst_libtest_ladir = .
-noinst_libtest_la_HEADERS = \
- include/tests/dns.h \
- include/tests/isc.h \
- include/tests/ns.h
-libtest_la_SOURCES = \
- $(noinst_libtest_la_HEADERS) \
- dns.c \
- isc.c \
- ns.c
-
-include $(top_srcdir)/Makefile.tests
+SUBDIRS = libtest isc dns ns isccfg irs
+check_PROGRAMS =
--- /dev/null
+include $(top_srcdir)/Makefile.top
+
+AM_CPPFLAGS += \
+ $(LIBISC_CFLAGS) \
+ $(LIBDNS_CFLAGS) \
+ $(LIBNS_CFLAGS) \
+ $(LIBUV_CFLAGS) \
+ -I$(top_srcdir)/lib/isc
+
+LDADD += \
+ $(LIBISC_LIBS) \
+ $(LIBDNS_LIBS) \
+ $(LIBNS_LIBS)
+
+check_LTLIBRARIES = libtest.la
+
+noinst_libtest_ladir = ..
+noinst_libtest_la_HEADERS = \
+ ../include/tests/dns.h \
+ ../include/tests/isc.h \
+ ../include/tests/ns.h
+libtest_la_SOURCES = \
+ $(noinst_libtest_la_HEADERS) \
+ dns.c \
+ isc.c \
+ ns.c
+
+include $(top_srcdir)/Makefile.tests