From: Ruben Kerkhof Date: Sun, 20 Jul 2014 11:55:28 +0000 (+0200) Subject: Only run tests when --enable-unit-tests X-Git-Tag: auth-3.4.0-rc1~60^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b553fa9dabc3b7456be26f8c5a3e592c56917316;p=thirdparty%2Fpdns.git Only run tests when --enable-unit-tests If we don't check this, the tests will break with a lot of noise because the boost unit tests libraries are not found. --- diff --git a/m4/pdns_enable_unit_tests.m4 b/m4/pdns_enable_unit_tests.m4 index 9853a361aa..f186474db7 100644 --- a/m4/pdns_enable_unit_tests.m4 +++ b/m4/pdns_enable_unit_tests.m4 @@ -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]) ]) diff --git a/modules/remotebackend/Makefile.am b/modules/remotebackend/Makefile.am index e7479f510f..a2ad46224f 100644 --- a/modules/remotebackend/Makefile.am +++ b/modules/remotebackend/Makefile.am @@ -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 diff --git a/pdns/Makefile.am b/pdns/Makefile.am index d3f0bcb4f5..0c6f9c6a0f 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -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