Commit a46cb110 authored by Evan Hunt's avatar Evan Hunt
Browse files

make early building of test binaries condtional

added an --enable-testbuild option to cause test binaries to be built
before tests are run, which is on by default when using --enable-developer.
parent e36d00ff
Pipeline #40117 passed with stages
in 19 minutes
......@@ -10,7 +10,7 @@ LDADD = \
if HAVE_PERL
noinst_PROGRAMS = \
check_PROGRAMS = \
feature-test \
makejournal \
pipelined/pipequeries \
......@@ -19,6 +19,10 @@ noinst_PROGRAMS = \
tkey/keycreate \
tkey/keydelete
if TESTBUILD
noinst_PROGRAMS=$(check_PROGRAMS)
endif TESTBUILD
feature_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(LIBDNS_CFLAGS)
......
......@@ -152,6 +152,15 @@ AC_ARG_ENABLE([warn_error],
AS_IF([test "$enable_warn_error" = "yes"],
[STD_CFLAGS="$STD_CFLAGS -Werror"])
#
# Build all tests?
#
AC_ARG_ENABLE([testbuild],
[AS_HELP_STRING([--enable-testbuild],
[build all tests when building (default=no)])],
[], [enable_testbuild=no])
AM_CONDITIONAL([TESTBUILD], [test "$enable_testbuild" != "no"])
AC_ARG_ENABLE([developer],
[AS_HELP_STRING([--enable-developer],
[enable developer build settings])])
......@@ -164,6 +173,7 @@ AS_IF([test "$enable_developer" = "yes"],
test "${with_dlz_filesystem+set}" = set || with_dlz_filesystem=yes
test "${with_zlib+set}" = set || with_zlib=yes
test "${enable_warn_error+set}" = set || enable_warn_error=yes
test "${enable_testbuild+set}" = set || enable_testbuild=yes
])
AC_SUBST([STD_CFLAGS])
......
......@@ -16,7 +16,7 @@ LDADD += \
noinst_LTLIBRARIES = libdnstest.la
libdnstest_la_SOURCES = dnstest.c dnstest.h
noinst_PROGRAMS = \
check_PROGRAMS = \
acl_test \
db_test \
dbdiff_test \
......@@ -46,11 +46,11 @@ noinst_PROGRAMS = \
zonemgr_test \
zt_test
TESTS = $(noinst_PROGRAMS)
TESTS = $(check_PROGRAMS)
if HAVE_PERL
noinst_PROGRAMS += \
check_PROGRAMS += \
master_test
EXTRA_master_test_DEPENDENCIES = testdata/master/master12.data testdata/master/master13.data testdata/master/master14.data
......@@ -71,7 +71,7 @@ testdata/master/master14.data: testdata/master/master14.data.in
endif
if HAVE_GEOIP2
noinst_PROGRAMS += \
check_PROGRAMS += \
geoip_test
geoip_test_CPPFLAGS = \
......@@ -84,7 +84,7 @@ geoip_test_LDADD = \
endif
if HAVE_DNSTAP
noinst_PROGRAMS += \
check_PROGRAMS += \
dnstap_test
dnstap_test_CPPFLAGS = \
......@@ -107,4 +107,8 @@ rsa_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(OPENSSL_CFLAGS)
if TESTBUILD
noinst_PROGRAMS=$(check_PROGRAMS)
endif TESTBUILD
unit-local: check
......@@ -9,9 +9,13 @@ LDADD += \
$(LIBISC_LIBS) \
$(LIBIRS_LIBS)
noinst_PROGRAMS = \
check_PROGRAMS = \
resconf_test
TESTS = $(noinst_PROGRAMS)
TESTS = $(check_PROGRAMS)
if TESTBUILD
noinst_PROGRAMS=$(check_PROGRAMS)
endif TESTBUILD
unit-local: check
......@@ -11,7 +11,7 @@ LDADD += \
noinst_LTLIBRARIES = libisctest.la
libisctest_la_SOURCES = isctest.c isctest.h
noinst_PROGRAMS = \
check_PROGRAMS = \
aes_test \
buffer_test \
counter_test \
......@@ -42,7 +42,7 @@ noinst_PROGRAMS = \
time_test \
timer_test
TESTS = $(noinst_PROGRAMS)
TESTS = $(check_PROGRAMS)
hmac_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
......@@ -64,4 +64,8 @@ random_test_LDADD = \
$(LDADD) \
-lm
if TESTBUILD
noinst_PROGRAMS=$(check_PROGRAMS)
endif TESTBUILD
unit-local: check
......@@ -9,9 +9,13 @@ LDADD += \
$(LIBISC_LIBS) \
$(LIBISCCC_LIBS)
noinst_PROGRAMS = \
check_PROGRAMS = \
result_test
TESTS = $(noinst_PROGRAMS)
TESTS = $(check_PROGRAMS)
if TESTBUILD
noinst_PROGRAMS=$(check_PROGRAMS)
endif TESTBUILD
unit-local: check
......@@ -11,9 +11,13 @@ LDADD += \
$(LIBDNS_LIBS) \
$(LIBISCCFG_LIBS)
noinst_PROGRAMS = \
check_PROGRAMS = \
parser_test
TESTS = $(noinst_PROGRAMS)
TESTS = $(check_PROGRAMS)
if TESTBUILD
noinst_PROGRAMS=$(check_PROGRAMS)
endif TESTBUILD
unit-local: check
......@@ -14,15 +14,15 @@ LDADD += \
noinst_LTLIBRARIES = libnstest.la
libnstest_la_SOURCES = nstest.c nstest.h
noinst_PROGRAMS = \
check_PROGRAMS = \
listenlist_test \
plugin_test
TESTS = $(noinst_PROGRAMS)
TESTS = $(check_PROGRAMS)
if HAVE_LD_WRAP
noinst_PROGRAMS += \
check_PROGRAMS += \
notify_test \
query_test
......@@ -44,4 +44,8 @@ query_test_LDFLAGS = \
endif
if TESTBUILD
noinst_PROGRAMS=$(check_PROGRAMS)
endif TESTBUILD
unit-local: check
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment