From: Kees Monshouwer Date: Fri, 2 Oct 2015 09:41:59 +0000 (+0200) Subject: configure: make backend unit tests conditional X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~20^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1176384691e8bd75acba335db18cc811d8a74b9;p=pdns configure: make backend unit tests conditional --- diff --git a/m4/pdns_enable_unit_tests.m4 b/m4/pdns_enable_unit_tests.m4 index f186474db..d72644de8 100644 --- a/m4/pdns_enable_unit_tests.m4 +++ b/m4/pdns_enable_unit_tests.m4 @@ -8,7 +8,18 @@ AC_DEFUN([PDNS_ENABLE_UNIT_TESTS], [ ) AC_MSG_RESULT([$enable_unit_tests]) AM_CONDITIONAL([UNIT_TESTS], [test "x$enable_unit_tests" != "xno"]) - AS_IF([test "x$enable_unit_tests" != "xno"], [ + + AC_MSG_CHECKING([whether to enable backend unit test building]) + AC_ARG_ENABLE([backend-unit-tests], + AS_HELP_STRING([--enable-backend-unit-tests], + [enable backend unit test building @<:@default=no@:>@]), + [enable_backend_unit_tests=$enableval], + [enable_backend_unit_tests=no] + ) + AC_MSG_RESULT([$enable_backend_unit_tests]) + AM_CONDITIONAL([BACKEND_UNIT_TESTS], [test "x$enable_backend_unit_tests" != "xno"]) + + AS_IF([test "x$enable_unit_tests" != "xno" || test "x$enable_backend_unit_tests" != "xno"], [ BOOST_TEST([mt]) ]) ]) diff --git a/modules/remotebackend/Makefile.am b/modules/remotebackend/Makefile.am index ebee121fd..7dcd9bef4 100644 --- a/modules/remotebackend/Makefile.am +++ b/modules/remotebackend/Makefile.am @@ -75,16 +75,16 @@ remotebackend_post.log: remotebackend_http.log remotebackend_json.log: remotebackend_http.log remotebackend_post.log -#if UNIT_TESTS -#TESTS = \ -# remotebackend_pipe.test \ -# remotebackend_unix.test \ -# remotebackend_http.test \ -# remotebackend_post.test \ -# remotebackend_json.test \ -# remotebackend_zeromq.test -# -#endif +if BACKEND_UNIT_TESTS +TESTS = \ + remotebackend_pipe.test \ + remotebackend_unix.test \ + remotebackend_http.test \ + remotebackend_post.test \ + remotebackend_json.test \ + remotebackend_zeromq.test + +endif BUILT_SOURCES = ../../pdns/dnslabeltext.cc