Skip to content

Commit 0916a2a

Browse files
committed
rename test_bitcoin to test_elements
1 parent 33ff16c commit 0916a2a

10 files changed

Lines changed: 29 additions & 29 deletions

File tree

ci/test/03_test_script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ if [ "$RUN_UNIT_TESTS" = "true" ]; then
179179
fi
180180

181181
if [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
182-
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
182+
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
183183
fi
184184

185185
if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then

cmake/module/AddBoostIfNeeded.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function(add_boost_if_needed)
7171
include(CheckIncludeFileCXX)
7272
check_include_file_cxx(boost/test/included/unit_test.hpp HAVE_BOOST_INCLUDED_UNIT_TEST_H)
7373
if(NOT HAVE_BOOST_INCLUDED_UNIT_TEST_H)
74-
message(FATAL_ERROR "Building test_bitcoin executable requested but boost/test/included/unit_test.hpp header not available.")
74+
message(FATAL_ERROR "Building test_elements executable requested but boost/test/included/unit_test.hpp header not available.")
7575
endif()
7676
endif()
7777

cmake/module/GenerateSetupNsi.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ function(generate_setup_nsi)
1212
set(BITCOIN_CLI_NAME "elements-cli")
1313
set(BITCOIN_TX_NAME "elements-tx")
1414
set(BITCOIN_WALLET_TOOL_NAME "elements-wallet")
15-
set(BITCOIN_TEST_NAME "test_bitcoin")
15+
set(BITCOIN_TEST_NAME "test_elements")
1616
set(EXEEXT ${CMAKE_EXECUTABLE_SUFFIX})
1717
configure_file(${PROJECT_SOURCE_DIR}/share/setup.nsi.in ${PROJECT_BINARY_DIR}/elements-win64-setup.nsi USE_SOURCE_PERMISSIONS @ONLY)
1818
endfunction()

cmake/module/Maintenance.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function(add_maintenance_targets)
2323
return()
2424
endif()
2525

26-
foreach(target IN ITEMS elementsd elements-qt elements-cli elements-tx elements-util elements-wallet test_bitcoin bench_bitcoin)
26+
foreach(target IN ITEMS elementsd elements-qt elements-cli elements-tx elements-util elements-wallet test_elements bench_bitcoin)
2727
if(TARGET ${target})
2828
list(APPEND executables $<TARGET_FILE:${target}>)
2929
endif()
@@ -43,7 +43,7 @@ function(add_maintenance_targets)
4343
endfunction()
4444

4545
function(add_windows_deploy_target)
46-
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)
46+
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)
4747
# TODO: Consider replacing this code with the CPack NSIS Generator.
4848
# See https://cmake.org/cmake/help/latest/cpack_gen/nsis.html
4949
include(GenerateSetupNsi)
@@ -57,7 +57,7 @@ function(add_windows_deploy_target)
5757
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-tx> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-tx>
5858
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-wallet> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-wallet>
5959
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:elements-util> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:elements-util>
60-
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_bitcoin> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_bitcoin>
60+
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:test_elements> -o ${PROJECT_BINARY_DIR}/release/$<TARGET_FILE_NAME:test_elements>
6161
COMMAND makensis -V2 ${PROJECT_BINARY_DIR}/elements-win64-setup.nsi
6262
VERBATIM
6363
)

cmake/script/Coverage.cmake

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ execute_process(
1919
COMMAND_ERROR_IS_FATAL ANY
2020
)
2121
execute_process(
22-
COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_bitcoin --output-file test_bitcoin.info
22+
COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_elements --output-file test_elements.info
2323
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
2424
COMMAND_ERROR_IS_FATAL ANY
2525
)
@@ -29,22 +29,22 @@ execute_process(
2929
COMMAND_ERROR_IS_FATAL ANY
3030
)
3131
execute_process(
32-
COMMAND ${LCOV_FILTER_COMMAND} test_bitcoin.info test_bitcoin_filtered.info
32+
COMMAND ${LCOV_FILTER_COMMAND} test_elements.info test_elements_filtered.info
3333
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
3434
COMMAND_ERROR_IS_FATAL ANY
3535
)
3636
execute_process(
37-
COMMAND ${LCOV_COMMAND} --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_filtered.info
37+
COMMAND ${LCOV_COMMAND} --add-tracefile test_elements_filtered.info --output-file test_elements_filtered.info
3838
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
3939
COMMAND_ERROR_IS_FATAL ANY
4040
)
4141
execute_process(
42-
COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_coverage.info
42+
COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_elements_filtered.info --output-file test_elements_coverage.info
4343
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
4444
COMMAND_ERROR_IS_FATAL ANY
4545
)
4646
execute_process(
47-
COMMAND ${GENHTML_COMMAND} test_bitcoin_coverage.info --output-directory test_bitcoin.coverage
47+
COMMAND ${GENHTML_COMMAND} test_elements_coverage.info --output-directory test_elements.coverage
4848
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
4949
COMMAND_ERROR_IS_FATAL ANY
5050
)
@@ -75,7 +75,7 @@ execute_process(
7575
COMMAND_ERROR_IS_FATAL ANY
7676
)
7777
execute_process(
78-
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
78+
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
7979
COMMAND ${GREP_EXECUTABLE} "%"
8080
COMMAND ${AWK_EXECUTABLE} "{ print substr($3,2,50) \"/\" $5 }"
8181
OUTPUT_FILE coverage_percent.txt

contrib/devtools/test_deterministic_coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ NON_DETERMINISTIC_TESTS=(
3434
"wallet_tests/wallet_disableprivkeys" # validation.cpp: if (signals.CallbacksPending() > 10)
3535
)
3636

37-
TEST_BITCOIN_BINARY="src/test/test_bitcoin"
37+
TEST_BITCOIN_BINARY="src/test/test_elements"
3838

3939
print_usage() {
4040
echo "Usage: $0 [custom test filter (default: all but known non-deterministic tests)] [number of test runs (default: 2)]"

contrib/valgrind.supp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# dependencies that cannot be fixed in-tree.
33
#
44
# Example use:
5-
# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_bitcoin
5+
# $ valgrind --suppressions=contrib/valgrind.supp build/bin/test_elements
66
# $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
7-
# --show-leak-kinds=all build/bin/test_bitcoin
7+
# --show-leak-kinds=all build/bin/test_elements
88
#
99
# To create suppressions for found issues, use the --gen-suppressions=all option:
1010
# $ valgrind --suppressions=contrib/valgrind.supp --leak-check=full \
1111
# --show-leak-kinds=all --gen-suppressions=all --show-reachable=yes \
12-
# --error-limit=no build/bin/test_bitcoin
12+
# --error-limit=no build/bin/test_elements
1313
#
1414
# Note that suppressions may depend on OS and/or library versions.
1515
# Tested on:

src/test/CMakeLists.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Do not use generator expressions in test sources because the
66
# SOURCES property is processed to gather test suite macros.
7-
add_executable(test_bitcoin
7+
add_executable(test_elements
88
main.cpp
99
addrman_tests.cpp
1010
allocator_tests.cpp
@@ -130,7 +130,7 @@ add_executable(test_bitcoin
130130
)
131131

132132
include(TargetDataSources)
133-
target_json_data_sources(test_bitcoin
133+
target_json_data_sources(test_elements
134134
data/base58_encode_decode.json
135135
data/bip341_wallet_vectors.json
136136
data/blockfilters.json
@@ -141,11 +141,11 @@ target_json_data_sources(test_bitcoin
141141
data/tx_invalid.json
142142
data/tx_valid.json
143143
)
144-
target_raw_data_sources(test_bitcoin NAMESPACE test::data
144+
target_raw_data_sources(test_elements NAMESPACE test::data
145145
data/asmap.raw
146146
)
147147

148-
target_link_libraries(test_bitcoin
148+
target_link_libraries(test_elements
149149
core_interface
150150
test_util
151151
bitcoin_cli
@@ -169,11 +169,11 @@ if(WITH_MULTIPROCESS)
169169
univalue
170170
)
171171

172-
target_sources(test_bitcoin
172+
target_sources(test_elements
173173
PRIVATE
174174
ipc_tests.cpp
175175
)
176-
target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc)
176+
target_link_libraries(test_elements bitcoin_ipc_test bitcoin_ipc)
177177
endif()
178178

179179
function(add_boost_test source_file)
@@ -192,7 +192,7 @@ function(add_boost_test source_file)
192192
)
193193
if(test_suite_name)
194194
add_test(NAME ${test_suite_name}
195-
COMMAND test_bitcoin --run_test=${test_suite_name} --catch_system_error=no --log_level=test_suite -- DEBUG_LOG_OUT
195+
COMMAND test_elements --run_test=${test_suite_name} --catch_system_error=no --log_level=test_suite -- DEBUG_LOG_OUT
196196
)
197197
set_property(TEST ${test_suite_name} PROPERTY
198198
SKIP_REGULAR_EXPRESSION "no test cases matching filter"
@@ -201,8 +201,8 @@ function(add_boost_test source_file)
201201
endfunction()
202202

203203
function(add_all_test_targets)
204-
get_target_property(test_source_dir test_bitcoin SOURCE_DIR)
205-
get_target_property(test_sources test_bitcoin SOURCES)
204+
get_target_property(test_source_dir test_elements SOURCE_DIR)
205+
get_target_property(test_sources test_elements SOURCES)
206206
foreach(test_source ${test_sources})
207207
cmake_path(IS_RELATIVE test_source result)
208208
if(result)
@@ -214,4 +214,4 @@ endfunction()
214214

215215
add_all_test_targets()
216216

217-
install_binary_component(test_bitcoin)
217+
install_binary_component(test_elements)

src/wallet/test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
# Do not use generator expressions in test sources because the
66
# SOURCES property is processed to gather test suite macros.
7-
target_sources(test_bitcoin
7+
target_sources(test_elements
88
PRIVATE
99
init_test_fixture.cpp
1010
wallet_test_fixture.cpp
@@ -23,4 +23,4 @@ target_sources(test_bitcoin
2323
walletdb_tests.cpp
2424
walletload_tests.cpp
2525
)
26-
target_link_libraries(test_bitcoin bitcoin_wallet)
26+
target_link_libraries(test_elements bitcoin_wallet)

vcpkg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
]
3636
},
3737
"tests": {
38-
"description": "Build test_bitcoin.exe executable",
38+
"description": "Build test_elements.exe executable",
3939
"dependencies": [
4040
"boost-test"
4141
]

0 commit comments

Comments
 (0)