Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit b553fa9dabc3b7456be26f8c5a3e592c56917316 1 parent e02b9c4
@rubenk rubenk authored
View
1  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])
])
View
2  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
View
2  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
Please sign in to comment.
Something went wrong with that request. Please try again.