rename test_bitcoin to test_elements

This commit is contained in:
Tom Trevethan 2026-05-11 23:57:42 +01:00
parent e1c714f2d5
commit f29fe12e1e
No known key found for this signature in database
10 changed files with 29 additions and 29 deletions

View file

@ -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

View file

@ -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()

View file

@ -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()

View file

@ -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 $<TARGET_FILE:${target}>)
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} $<TARGET_FILE:elements-tx> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-tx>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-wallet>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-util>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_elements> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_elements>
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/elements-win64-setup.nsi
VERBATIM
)

View file

@ -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

View file

@ -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)]"

View file

@ -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:

View file

@ -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)

View file

@ -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)

View file

@ -35,7 +35,7 @@
]
},
"tests": {
"description": "Build test_bitcoin.exe executable",
"description": "Build test_elements.exe executable",
"dependencies": [
"boost-test"
]