]> granicus.if.org Git - pdns/commitdiff
Only run tests when --enable-unit-tests
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 20 Jul 2014 11:55:28 +0000 (13:55 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 20 Jul 2014 11:55:28 +0000 (13:55 +0200)
If we don't check this, the tests will break
with a lot of noise because the boost unit tests
libraries are not found.

m4/pdns_enable_unit_tests.m4
modules/remotebackend/Makefile.am
pdns/Makefile.am

index 9853a361aae5774e8ec31b67f4dcdaad62a2eac4..f186474db790fefab4e5e55d1f0295ff2fed127c 100644 (file)
@@ -7,6 +7,7 @@ AC_DEFUN([PDNS_ENABLE_UNIT_TESTS], [
     [enable_unit_tests=no]
   )
   AC_MSG_RESULT([$enable_unit_tests])
+  AM_CONDITIONAL([UNIT_TESTS], [test "x$enable_unit_tests" != "xno"])
   AS_IF([test "x$enable_unit_tests" != "xno"], [
      BOOST_TEST([mt])
    ])
index e7479f510fe5295cc9d1aa52d27cefbd25e22aaf..a2ad46224fee67528222f7a28fbc4ccbcfbfab66 100644 (file)
@@ -18,8 +18,10 @@ libremotebackend_la_SOURCES=remotebackend.hh remotebackend.cc unixconnector.cc h
 libremotebackend_la_LDFLAGS=-module -avoid-version
 libremotebackend_la_LIBADD=$(LIBZMQ_LIBS) 
 
+if UNIT_TESTS
 TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message REMOTEBACKEND_ZEROMQ=$(REMOTEBACKEND_ZEROMQ) ./testrunner.sh 
 TESTS=test_remotebackend_pipe test_remotebackend_unix test_remotebackend_http test_remotebackend_post test_remotebackend_json test_remotebackend_zeromq
+endif
 
 BUILT_SOURCES=../../pdns/dnslabeltext.cc
 
index d3f0bcb4f5abd0ce8054c9a607e2e389ef90fab5..0c6f9c6a0f30d1be5d8bd323b73fbab050da2fc1 100644 (file)
@@ -349,8 +349,10 @@ misc.cc unix_utility.cc qtype.cc
 
 pdns_control_LDFLAGS=@THREADFLAGS@
 
+if UNIT_TESTS
 TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message
 TESTS=testrunner
+endif
 
 dnslabeltext.cc: dnslabeltext.rl
        ragel dnslabeltext.rl -o dnslabeltext.cc