diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -802,7 +802,3 @@ if ENABLE_QT_TESTS include Makefile.qttest.include endif - -if ENABLE_SEEDER_TESTS -include Makefile.seedertest.include -endif diff --git a/src/Makefile.seedertest.include b/src/Makefile.seedertest.include deleted file mode 100644 --- a/src/Makefile.seedertest.include +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2019 The Bitcoin developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. - -bin_PROGRAMS += seeder/test/test_bitcoin-seeder -TESTS += seeder/test/test_bitcoin-seeder - -seeder_test_test_bitcoin_seeder_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_SEEDER_INCLUDES) \ - $(SEEDER_INCLUDES) $(SEEDER_TEST_INCLUDES) $(TESTDEFS) - -SEEDER_TEST_UTIL = \ - seeder/test/dns_util.h \ - seeder/test/translate_support.cpp \ - seeder/test/util.h - -SEEDER_TESTS = \ - seeder/test/p2p_messaging_tests.cpp \ - seeder/test/write_name_tests.cpp \ - seeder/test/parse_name_tests.cpp - -seeder_test_test_bitcoin_seeder_SOURCES = $(SEEDER_TEST_UTIL) $(SEEDER_TESTS) - -seeder_test_test_bitcoin_seeder_LDADD = \ - $(LIBBITCOIN_SEEDER) \ - $(LIBBITCOIN_COMMON) \ - $(LIBBITCOIN_UTIL) \ - $(LIBUNIVALUE) \ - $(LIBBITCOIN_CRYPTO) \ - $(LIBBITCOIN_CONSENSUS) \ - $(CRYPTO_LIBS) \ - $(BOOST_LIBS) \ - $(BOOST_UNIT_TEST_FRAMEWORK_LIB) - -seeder_test_test_bitcoin_seeder_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) -seeder_test_test_bitcoin_seeder_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS) - -test_bitcoin_seeder : seeder/test/test_bitcoin-seeder$(EXEEXT) - -test_bitcoin_seeder_check : seeder/test/test_bitcoin-seeder$(EXEEXT) FORCE - $(MAKE) check-TESTS TESTS=$^ - -test_bitcoin_seeder_clean: FORCE - rm -f $(seeder_test_test_bitcoin_seeder_OBJECTS) diff --git a/src/seeder/test/CMakeLists.txt b/src/seeder/test/CMakeLists.txt --- a/src/seeder/test/CMakeLists.txt +++ b/src/seeder/test/CMakeLists.txt @@ -5,11 +5,11 @@ project(bitcoin-seeder-test) include(TestSuite) -create_test_suite(bitcoin-seeder) -add_dependencies(check check-bitcoin-seeder) +create_test_suite(seeder) +add_dependencies(check check-seeder) -add_boost_unit_tests_to_suite(bitcoin-seeder test_bitcoin-seeder - translate_support.cpp +add_boost_unit_tests_to_suite(seeder test-seeder + fixture.cpp TESTS p2p_messaging_tests.cpp @@ -17,8 +17,9 @@ write_name_tests.cpp ) -target_link_libraries(test_bitcoin-seeder - common - bitcoinconsensus +target_link_libraries(test-seeder seeder + # The seeder has some bizare linking problems makign util necessary here. + util + testutil ) diff --git a/src/seeder/test/fixture.cpp b/src/seeder/test/fixture.cpp new file mode 100644 --- /dev/null +++ b/src/seeder/test/fixture.cpp @@ -0,0 +1,7 @@ +// Copyright (c) 2020 The Bitcoin developers +// Distributed under the MIT software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + +#define BOOST_TEST_MODULE Seeder Test Suite + +#include diff --git a/src/seeder/test/p2p_messaging_tests.cpp b/src/seeder/test/p2p_messaging_tests.cpp --- a/src/seeder/test/p2p_messaging_tests.cpp +++ b/src/seeder/test/p2p_messaging_tests.cpp @@ -2,8 +2,6 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#define BOOST_TEST_MODULE Bitcoin Seeder Test Suite - #include #include #include diff --git a/src/seeder/test/translate_support.cpp b/src/seeder/test/translate_support.cpp deleted file mode 100644 --- a/src/seeder/test/translate_support.cpp +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2020 The Bitcoin developers -// Distributed under the MIT software license, see the accompanying -// file COPYING or http://www.opensource.org/licenses/mit-license.php. - -/** - * This file exist for the sole purpose of avoiding link error with the - * translate module. For some obscure reason, the seeder tests do not use the - * regular boost test framework and instead had various fixtures dumped into one - * of its test. - */ -#include - -#include - -const std::function G_TRANSLATION_FUN = nullptr;