diff --git a/Makefile.tests b/Makefile.tests index d7b2e948e0..e1b7e0e046 100644 --- a/Makefile.tests +++ b/Makefile.tests @@ -18,6 +18,6 @@ AM_CPPFLAGS += \ -DNAMED_PLUGINDIR=\"$(pkglibdir)\" \ -DTESTS_DIR=\"$(abs_srcdir)\" -LDADD += \ - $(top_builddir)/tests/libtest.la \ +LDADD += \ + $(top_builddir)/tests/libtest/libtest.la \ $(CMOCKA_LIBS) diff --git a/configure.ac b/configure.ac index b6b546e6c4..6d7f5feb54 100644 --- a/configure.ac +++ b/configure.ac @@ -1586,7 +1586,8 @@ AC_CONFIG_FILES([tests/Makefile 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]) diff --git a/tests/Makefile.am b/tests/Makefile.am index 0a19bb1d1f..8b5dcbe842 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,19 +12,5 @@ LDADD += \ $(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 = diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am new file mode 100644 index 0000000000..2699f4bfcf --- /dev/null +++ b/tests/libtest/Makefile.am @@ -0,0 +1,28 @@ +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 diff --git a/tests/dns.c b/tests/libtest/dns.c similarity index 100% rename from tests/dns.c rename to tests/libtest/dns.c diff --git a/tests/isc.c b/tests/libtest/isc.c similarity index 100% rename from tests/isc.c rename to tests/libtest/isc.c diff --git a/tests/ns.c b/tests/libtest/ns.c similarity index 100% rename from tests/ns.c rename to tests/libtest/ns.c