diff --git a/ci/test/03_test_script.sh b/ci/test/03_test_script.sh index a9b8f73fe6..4a07fa71a9 100755 --- a/ci/test/03_test_script.sh +++ b/ci/test/03_test_script.sh @@ -179,7 +179,7 @@ if [ "$RUN_UNIT_TESTS" = "true" ]; then fi if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then - DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_bitcoin --catch_system_errors=no -l test_suite + DIR_UNIT_TEST_DATA="${DIR_UNIT_TEST_DATA}" LD_LIBRARY_PATH="${DEPENDS_DIR}/${HOST}/lib" "${BASE_OUTDIR}"/bin/test_elements --catch_system_errors=no -l test_suite fi if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then diff --git a/cmake/module/AddBoostIfNeeded.cmake b/cmake/module/AddBoostIfNeeded.cmake index ecd0d6f2ab..589c88bf74 100644 --- a/cmake/module/AddBoostIfNeeded.cmake +++ b/cmake/module/AddBoostIfNeeded.cmake @@ -71,7 +71,7 @@ function(add_boost_if_needed) include(CheckIncludeFileCXX) check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H) if(NOT HAVE_BOOST_INCLUDED_UNIT_TEST_H) - message(FATAL_ERROR "Building test_bitcoin executable requested but boost/test/included/unit_test.hpp header not available.") + message(FATAL_ERROR "Building test_elements executable requested but boost/test/included/unit_test.hpp header not available.") endif() endif() diff --git a/cmake/module/GenerateSetupNsi.cmake b/cmake/module/GenerateSetupNsi.cmake index f4b825a0f0..39a141e123 100644 --- a/cmake/module/GenerateSetupNsi.cmake +++ b/cmake/module/GenerateSetupNsi.cmake @@ -12,7 +12,7 @@ function(generate_setup_nsi) set(BITCOIN_CLI_NAME "elements-cli") set(BITCOIN_TX_NAME "elements-tx") set(BITCOIN_WALLET_TOOL_NAME "elements-wallet") - set(BITCOIN_TEST_NAME "test_bitcoin") + set(BITCOIN_TEST_NAME "test_elements") set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX}) configure_file(${PROJECT_SOURCE_DIR}/share/setup.nsi.in ${PROJECT_BINARY_DIR}/elements-win64-setup.nsi USE_SOURCE_PERMISSIONS @ONLY) endfunction() diff --git a/cmake/module/Maintenance.cmake b/cmake/module/Maintenance.cmake index 522d5844ac..13e6b95ac7 100644 --- a/cmake/module/Maintenance.cmake +++ b/cmake/module/Maintenance.cmake @@ -23,7 +23,7 @@ function(add_maintenance_targets) return() endif() - foreach(target IN ITEMS elementsd elements-qt elements-cli elements-tx elements-util elements-wallet test_bitcoin bench_bitcoin) + foreach(target IN ITEMS elementsd elements-qt elements-cli elements-tx elements-util elements-wallet test_elements bench_bitcoin) if(TARGET ${target}) list(APPEND executables $) endif() @@ -43,7 +43,7 @@ function(add_maintenance_targets) endfunction() function(add_windows_deploy_target) - if(MINGW AND TARGET elements-qt AND TARGET elementsd AND TARGET elements-cli AND TARGET elements-tx AND TARGET elements-wallet AND TARGET elements-util AND TARGET test_bitcoin) + if(MINGW AND TARGET elements-qt AND TARGET elementsd AND TARGET elements-cli AND TARGET elements-tx AND TARGET elements-wallet AND TARGET elements-util AND TARGET test_elements) # TODO: Consider replacing this code with the CPack NSIS Generator. # See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html include(GenerateSetupNsi) @@ -57,7 +57,7 @@ function(add_windows_deploy_target) COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ - COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ + COMMAND ${CMAKE_STRIP} $ -o ${PROJECT_BINARY_DIR}/release/$ COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/elements-win64-setup.nsi VERBATIM ) diff --git a/cmake/script/Coverage.cmake b/cmake/script/Coverage.cmake index 72587a5eb6..7394e5157d 100644 --- a/cmake/script/Coverage.cmake +++ b/cmake/script/Coverage.cmake @@ -19,7 +19,7 @@ execute_process( COMMAND_ERROR_IS_FATAL ANY ) execute_process( - COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_bitcoin --output-file test_bitcoin.info + COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_elements --output-file test_elements.info WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND_ERROR_IS_FATAL ANY ) @@ -29,22 +29,22 @@ execute_process( COMMAND_ERROR_IS_FATAL ANY ) execute_process( - COMMAND ${LCOV_FILTER_COMMAND} test_bitcoin.info test_bitcoin_filtered.info + COMMAND ${LCOV_FILTER_COMMAND} test_elements.info test_elements_filtered.info WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND_ERROR_IS_FATAL ANY ) execute_process( - COMMAND ${LCOV_COMMAND} --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_filtered.info + COMMAND ${LCOV_COMMAND} --add-tracefile test_elements_filtered.info --output-file test_elements_filtered.info WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND_ERROR_IS_FATAL ANY ) execute_process( - COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_coverage.info + COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_elements_filtered.info --output-file test_elements_coverage.info WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND_ERROR_IS_FATAL ANY ) execute_process( - COMMAND ${GENHTML_COMMAND} test_bitcoin_coverage.info --output-directory test_bitcoin.coverage + COMMAND ${GENHTML_COMMAND} test_elements_coverage.info --output-directory test_elements.coverage WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR} COMMAND_ERROR_IS_FATAL ANY ) @@ -75,7 +75,7 @@ execute_process( COMMAND_ERROR_IS_FATAL ANY ) execute_process( - COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --add-tracefile functional_test_filtered.info --output-file total_coverage.info + COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_elements_filtered.info --add-tracefile functional_test_filtered.info --output-file total_coverage.info COMMAND ${GREP_EXECUTABLE} "%" COMMAND ${AWK_EXECUTABLE} "{ print substr($3,2,50) \"/\" $5 }" OUTPUT_FILE coverage_percent.txt diff --git a/contrib/devtools/test_deterministic_coverage.sh b/contrib/devtools/test_deterministic_coverage.sh index 885396bb25..988db90fd2 100755 --- a/contrib/devtools/test_deterministic_coverage.sh +++ b/contrib/devtools/test_deterministic_coverage.sh @@ -34,7 +34,7 @@ NON_DETERMINISTIC_TESTS=( "wallet_tests/wallet_disableprivkeys" # validation.cpp: if (signals.CallbacksPending() > 10) ) -TEST_BITCOIN_BINARY="src/test/test_bitcoin" +TEST_BITCOIN_BINARY="src/test/test_elements" print_usage() { echo "Usage: $0 [custom test filter (default: all but known non-deterministic tests)] [number of test runs (default: 2)]" diff --git a/contrib/valgrind.supp b/contrib/valgrind.supp index 9a9e640c61..87f3874ddb 100644 --- a/contrib/valgrind.supp +++ b/contrib/valgrind.supp @@ -2,14 +2,14 @@ # dependencies that cannot be fixed in-tree. # # Example use: -# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_bitcoin +# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_elements # $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \ -# --show-leak-kinds=all build/bin/test_bitcoin +# --show-leak-kinds=all build/bin/test_elements # # To create suppressions for found issues, use the --gen-suppressions=all option: # $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \ # --show-leak-kinds=all --gen-suppressions=all --show-reachable=yes \ -# --error-limit=no build/bin/test_bitcoin +# --error-limit=no build/bin/test_elements # # Note that suppressions may depend on OS and/or library versions. # Tested on: diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index e33f133f7d..073bea6304 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -4,7 +4,7 @@ # Do not use generator expressions in test sources because the # SOURCES property is processed to gather test suite macros. -add_executable(test_bitcoin +add_executable(test_elements main.cpp addrman_tests.cpp allocator_tests.cpp @@ -130,7 +130,7 @@ add_executable(test_bitcoin ) include(TargetDataSources) -target_json_data_sources(test_bitcoin +target_json_data_sources(test_elements data/base58_encode_decode.json data/bip341_wallet_vectors.json data/blockfilters.json @@ -141,11 +141,11 @@ target_json_data_sources(test_bitcoin data/tx_invalid.json data/tx_valid.json ) -target_raw_data_sources(test_bitcoin NAMESPACE test::data +target_raw_data_sources(test_elements NAMESPACE test::data data/asmap.raw ) -target_link_libraries(test_bitcoin +target_link_libraries(test_elements core_interface test_util bitcoin_cli @@ -169,11 +169,11 @@ if(WITH_MULTIPROCESS) univalue ) - target_sources(test_bitcoin + target_sources(test_elements PRIVATE ipc_tests.cpp ) - target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc) + target_link_libraries(test_elements bitcoin_ipc_test bitcoin_ipc) endif() function(add_boost_test source_file) @@ -192,7 +192,7 @@ function(add_boost_test source_file) ) if(test_suite_name) add_test(NAME ${test_suite_name} - COMMAND test_bitcoin --run_test=${test_suite_name} --catch_system_error=no --log_level=test_suite -- DEBUG_LOG_OUT + COMMAND test_elements --run_test=${test_suite_name} --catch_system_error=no --log_level=test_suite -- DEBUG_LOG_OUT ) set_property(TEST ${test_suite_name} PROPERTY SKIP_REGULAR_EXPRESSION "no test cases matching filter" @@ -201,8 +201,8 @@ function(add_boost_test source_file) endfunction() function(add_all_test_targets) - get_target_property(test_source_dir test_bitcoin SOURCE_DIR) - get_target_property(test_sources test_bitcoin SOURCES) + get_target_property(test_source_dir test_elements SOURCE_DIR) + get_target_property(test_sources test_elements SOURCES) foreach(test_source ${test_sources}) cmake_path(IS_RELATIVE test_source result) if(result) @@ -214,4 +214,4 @@ endfunction() add_all_test_targets() -install_binary_component(test_bitcoin) +install_binary_component(test_elements) diff --git a/src/wallet/test/CMakeLists.txt b/src/wallet/test/CMakeLists.txt index f14a78ca1d..2d66c6e353 100644 --- a/src/wallet/test/CMakeLists.txt +++ b/src/wallet/test/CMakeLists.txt @@ -4,7 +4,7 @@ # Do not use generator expressions in test sources because the # SOURCES property is processed to gather test suite macros. -target_sources(test_bitcoin +target_sources(test_elements PRIVATE init_test_fixture.cpp wallet_test_fixture.cpp @@ -23,4 +23,4 @@ target_sources(test_bitcoin walletdb_tests.cpp walletload_tests.cpp ) -target_link_libraries(test_bitcoin bitcoin_wallet) +target_link_libraries(test_elements bitcoin_wallet) diff --git a/vcpkg.json b/vcpkg.json index d5dfb05ebe..2e9d6e9956 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -35,7 +35,7 @@ ] }, "tests": { - "description": "Build test_bitcoin.exe executable", + "description": "Build test_elements.exe executable", "dependencies": [ "boost-test" ]