Changeset View
Changeset View
Standalone View
Standalone View
src/test/CMakeLists.txt
Show All 36 Lines | gen_json_header(JSON_HEADERS | ||||
data/tx_invalid.json | data/tx_invalid.json | ||||
data/tx_valid.json | data/tx_valid.json | ||||
data/sighash.json | data/sighash.json | ||||
) | ) | ||||
include(TestSuite) | include(TestSuite) | ||||
create_test_suite(bitcoin) | create_test_suite(bitcoin) | ||||
add_dependencies(check check-bitcoin) | add_dependencies(check check-bitcoin) | ||||
add_executable(test_bitcoin EXCLUDE_FROM_ALL | |||||
jsonutil.cpp | |||||
scriptflags.cpp | |||||
sigutil.cpp | |||||
test_bitcoin.cpp | |||||
test_bitcoin_main.cpp | |||||
add_test_to_suite(bitcoin test_bitcoin | # Tests generated from JSON | ||||
${JSON_HEADERS} | |||||
) | |||||
add_dependencies(check-bitcoin test_bitcoin) | |||||
set(TEST_BITCOIN_SOURCES | |||||
activation_tests.cpp | activation_tests.cpp | ||||
addrman_tests.cpp | addrman_tests.cpp | ||||
allocator_tests.cpp | allocator_tests.cpp | ||||
amount_tests.cpp | amount_tests.cpp | ||||
arith_uint256_tests.cpp | arith_uint256_tests.cpp | ||||
avalanche_tests.cpp | avalanche_tests.cpp | ||||
base32_tests.cpp | base32_tests.cpp | ||||
base58_tests.cpp | base58_tests.cpp | ||||
Show All 20 Lines | set(TEST_BITCOIN_SOURCES | ||||
DoS_tests.cpp | DoS_tests.cpp | ||||
dstencode_tests.cpp | dstencode_tests.cpp | ||||
excessiveblock_tests.cpp | excessiveblock_tests.cpp | ||||
feerate_tests.cpp | feerate_tests.cpp | ||||
finalization_tests.cpp | finalization_tests.cpp | ||||
getarg_tests.cpp | getarg_tests.cpp | ||||
hash_tests.cpp | hash_tests.cpp | ||||
inv_tests.cpp | inv_tests.cpp | ||||
jsonutil.cpp | |||||
key_tests.cpp | key_tests.cpp | ||||
lcg_tests.cpp | lcg_tests.cpp | ||||
limitedmap_tests.cpp | limitedmap_tests.cpp | ||||
main_tests.cpp | main_tests.cpp | ||||
mempool_tests.cpp | mempool_tests.cpp | ||||
merkle_tests.cpp | merkle_tests.cpp | ||||
miner_tests.cpp | miner_tests.cpp | ||||
monolith_opcodes_tests.cpp | monolith_opcodes_tests.cpp | ||||
Show All 11 Lines | set(TEST_BITCOIN_SOURCES | ||||
reverselock_tests.cpp | reverselock_tests.cpp | ||||
rpc_tests.cpp | rpc_tests.cpp | ||||
rwcollection_tests.cpp | rwcollection_tests.cpp | ||||
sanity_tests.cpp | sanity_tests.cpp | ||||
scheduler_tests.cpp | scheduler_tests.cpp | ||||
script_commitment_tests.cpp | script_commitment_tests.cpp | ||||
script_P2SH_tests.cpp | script_P2SH_tests.cpp | ||||
script_tests.cpp | script_tests.cpp | ||||
scriptflags.cpp | |||||
scriptnum_tests.cpp | scriptnum_tests.cpp | ||||
serialize_tests.cpp | serialize_tests.cpp | ||||
sigcache_tests.cpp | sigcache_tests.cpp | ||||
sigencoding_tests.cpp | sigencoding_tests.cpp | ||||
sighash_tests.cpp | sighash_tests.cpp | ||||
sighashtype_tests.cpp | sighashtype_tests.cpp | ||||
sigopcount_tests.cpp | sigopcount_tests.cpp | ||||
sigutil.cpp | |||||
skiplist_tests.cpp | skiplist_tests.cpp | ||||
streams_tests.cpp | streams_tests.cpp | ||||
sync_tests.cpp | sync_tests.cpp | ||||
test_bitcoin.cpp | |||||
test_bitcoin_main.cpp | |||||
timedata_tests.cpp | timedata_tests.cpp | ||||
transaction_tests.cpp | transaction_tests.cpp | ||||
txvalidationcache_tests.cpp | txvalidationcache_tests.cpp | ||||
versionbits_tests.cpp | versionbits_tests.cpp | ||||
uint256_tests.cpp | uint256_tests.cpp | ||||
undo_tests.cpp | undo_tests.cpp | ||||
univalue_tests.cpp | univalue_tests.cpp | ||||
util_tests.cpp | util_tests.cpp | ||||
validation_tests.cpp | validation_tests.cpp | ||||
work_comparator_tests.cpp | work_comparator_tests.cpp | ||||
) | |||||
# RPC Tests | function(add_bitcoin_test TEST_NAME SRC) | ||||
../rpc/test/server_tests.cpp | target_sources(test_bitcoin PRIVATE ${SRC}) | ||||
add_test(NAME ${TEST_NAME} COMMAND test_bitcoin --run_test=${TEST_NAME}) | |||||
endfunction(add_bitcoin_test) | |||||
foreach(TEST_SOURCE ${TEST_BITCOIN_SOURCES}) | |||||
STRING(REGEX REPLACE ".cpp$" "" TEST_NAME ${TEST_SOURCE}) | |||||
add_bitcoin_test(${TEST_NAME} ${TEST_SOURCE}) | |||||
endforeach(TEST_SOURCE) | |||||
# Tests generated from JSON | # RPC Tests | ||||
${JSON_HEADERS} | add_bitcoin_test(server_tests ../rpc/test/server_tests.cpp) | ||||
) | |||||
target_include_directories(test_bitcoin | target_include_directories(test_bitcoin | ||||
PUBLIC | PUBLIC | ||||
# To access the generated json headers. | # To access the generated json headers. | ||||
${CMAKE_CURRENT_BINARY_DIR} | ${CMAKE_CURRENT_BINARY_DIR} | ||||
) | ) | ||||
find_package(Boost 1.58 REQUIRED unit_test_framework) | find_package(Boost 1.58 REQUIRED unit_test_framework) | ||||
Show All 25 Lines |