Stop the unit tests from running twice
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -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 =
|
||||
|
||||
28
tests/libtest/Makefile.am
Normal file
28
tests/libtest/Makefile.am
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user