]> granicus.if.org Git - pdns/commitdiff
configure: make backend unit tests conditional
authorKees Monshouwer <mind04@monshouwer.org>
Fri, 2 Oct 2015 09:41:59 +0000 (11:41 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 2 Oct 2015 12:57:08 +0000 (14:57 +0200)
m4/pdns_enable_unit_tests.m4
modules/remotebackend/Makefile.am

index f186474db790fefab4e5e55d1f0295ff2fed127c..d72644de817dcb633d12ebd8a736e2c6379de9f3 100644 (file)
@@ -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])
    ])
 ])
index ebee121fd3f0430df48a39307b62f1ddb13ef051..7dcd9bef4ee60a317f1e488904b7aa95311f58a7 100644 (file)
@@ -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