Changeset View
Changeset View
Standalone View
Standalone View
src/test/CMakeLists.txt
# Copyright (c) 2018 The Bitcoin developers | # Copyright (c) 2018 The Bitcoin developers | ||||
project(bitcoin-test) | project(bitcoin-test) | ||||
option(TEST_WITH_UPGRADE_ACTIVATED "Run unit tests with the next upgrade activated in addition to regular tests" OFF) | |||||
# Process json files. | # Process json files. | ||||
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/data") | file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/data") | ||||
function(gen_json_header NAME) | function(gen_json_header NAME) | ||||
set(HEADERS "") | set(HEADERS "") | ||||
foreach(f ${ARGN}) | foreach(f ${ARGN}) | ||||
set(h "${CMAKE_CURRENT_BINARY_DIR}/${f}.h") | set(h "${CMAKE_CURRENT_BINARY_DIR}/${f}.h") | ||||
▲ Show 20 Lines • Show All 134 Lines • ▼ Show 20 Lines | add_boost_unit_tests_to_suite(bitcoin test_bitcoin | ||||
# RPC Tests | # RPC Tests | ||||
../rpc/test/server_tests.cpp | ../rpc/test/server_tests.cpp | ||||
# Tests generated from JSON | # Tests generated from JSON | ||||
${JSON_HEADERS} | ${JSON_HEADERS} | ||||
) | ) | ||||
if (TEST_WITH_UPGRADE_ACTIVATED) | |||||
add_test( | |||||
NAME | |||||
"bitcoin-upgrade-activated" | |||||
COMMAND | |||||
"test_bitcoin" | |||||
"-gravitonactivationtime=1573819200" | |||||
) | |||||
endif() | |||||
target_link_libraries(test_bitcoin rpcclient server) | target_link_libraries(test_bitcoin rpcclient server) | ||||
if(TARGET bitcoinconsensus-shared) | if(TARGET bitcoinconsensus-shared) | ||||
target_link_libraries(test_bitcoin bitcoinconsensus-shared) | target_link_libraries(test_bitcoin bitcoinconsensus-shared) | ||||
else() | else() | ||||
target_link_libraries(test_bitcoin bitcoinconsensus) | target_link_libraries(test_bitcoin bitcoinconsensus) | ||||
endif() | endif() | ||||
if(BUILD_BITCOIN_WALLET) | if(BUILD_BITCOIN_WALLET) | ||||
Show All 11 Lines |