From: Otto Moerbeek Date: Mon, 15 Apr 2019 10:32:18 +0000 (+0200) Subject: Explicitly call reportAllTypes() on test suite init, it is needed for various tests. X-Git-Tag: dnsdist-1.4.0-alpha2~16^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5feab2fa874f080ce34064f81bbc539d6b1c4596;p=thirdparty%2Fpdns.git Explicitly call reportAllTypes() on test suite init, it is needed for various tests. --- diff --git a/pdns/recursordist/test-syncres_cc.cc b/pdns/recursordist/test-syncres_cc.cc index 4b5e629722..f31f115e72 100644 --- a/pdns/recursordist/test-syncres_cc.cc +++ b/pdns/recursordist/test-syncres_cc.cc @@ -113,8 +113,6 @@ static void init(bool debug=false) g_log.toConsole(Logger::Error); } - reportAllTypes(); - t_RC = std::unique_ptr(new MemRecursorCache()); SyncRes::s_maxqperq = 50; diff --git a/pdns/recursordist/testrunner.cc b/pdns/recursordist/testrunner.cc index b6a6852886..78c2a1d4f5 100644 --- a/pdns/recursordist/testrunner.cc +++ b/pdns/recursordist/testrunner.cc @@ -20,12 +20,23 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #define BOOST_TEST_DYN_LINK -#define BOOST_TEST_MAIN -#define BOOST_TEST_MODULE unit #ifdef HAVE_CONFIG_H #include "config.h" #endif #include +#include +#include +bool init_unit_test() { + std::cerr << "Initing..." << std::endl; + reportAllTypes(); + return true; +} + +// entry point: +int main(int argc, char* argv[]) +{ + return boost::unit_test::unit_test_main( &init_unit_test, argc, argv ); +} diff --git a/pdns/test-dnsrecordcontent.cc b/pdns/test-dnsrecordcontent.cc index 1d99f1f6c5..527b49b8dd 100644 --- a/pdns/test-dnsrecordcontent.cc +++ b/pdns/test-dnsrecordcontent.cc @@ -10,7 +10,6 @@ BOOST_AUTO_TEST_SUITE(test_dnsrecordcontent) BOOST_AUTO_TEST_CASE(test_equality) { - reportAllTypes(); ComboAddress ip("1.2.3.4"), ip2("10.0.0.1"), ip6("::1"); ARecordContent a1(ip), a2(ip), a3(ip2); AAAARecordContent aaaa(ip6), aaaa1(ip6); diff --git a/pdns/test-dnsrecords_cc.cc b/pdns/test-dnsrecords_cc.cc index 764d8fdf36..5e50111a3f 100644 --- a/pdns/test-dnsrecords_cc.cc +++ b/pdns/test-dnsrecords_cc.cc @@ -44,7 +44,6 @@ BOOST_AUTO_TEST_CASE(test_record_types) { // tuple contains typedef boost::tuple case_t; typedef std::list cases_t; - reportAllTypes(); MRRecordContent::report(); IPSECKEYRecordContent::report(); KXRecordContent::report();