Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1# Copyright (c) 2023-present The Bitcoin Core developers2# Distributed under the MIT software license, see the accompanying3# file COPYING or https://opensource.org/license/mit/.5# Do not use generator expressions in test sources because the6# SOURCES property is processed to gather test suite macros.7add_executable(test_bitcoin8main.cpp9addrman_tests.cpp10allocator_tests.cpp11amount_tests.cpp12argsman_tests.cpp13arith_uint256_tests.cpp14banman_tests.cpp15base32_tests.cpp16base58_tests.cpp17base64_tests.cpp18baseindex_tests.cpp19bech32_tests.cpp20bip32_tests.cpp21bip324_tests.cpp22blockchain_tests.cpp23blockencodings_tests.cpp24blockfilter_index_tests.cpp25blockfilter_tests.cpp26blockmanager_tests.cpp27blockpolicyestimator_tests.cpp28bloom_tests.cpp29bswap_tests.cpp30btcsignals_tests.cpp31caches_tests.cpp32chain_tests.cpp33chainstate_write_tests.cpp34checkqueue_tests.cpp35cluster_linearize_tests.cpp36coins_tests.cpp37coinscachepair_tests.cpp38coinstatsindex_tests.cpp39coinsviewoverlay_tests.cpp40common_url_tests.cpp41compress_tests.cpp42crypto_tests.cpp43cuckoocache_tests.cpp44dbwrapper_tests.cpp45denialofservice_tests.cpp46descriptor_tests.cpp47disconnected_transactions.cpp48fees_util_tests.cpp49feefrac_tests.cpp50feerounder_tests.cpp51flatfile_tests.cpp52fs_tests.cpp53getarg_tests.cpp54hash_tests.cpp55headers_sync_chainwork_tests.cpp56httpserver_tests.cpp57i2p_tests.cpp58interfaces_tests.cpp59key_io_tests.cpp60key_tests.cpp61logging_tests.cpp62mempool_tests.cpp63mempool_fee_estimator_tests.cpp64merkle_tests.cpp65merkleblock_tests.cpp66miner_tests.cpp67miniminer_tests.cpp68miniscript_tests.cpp69minisketch_tests.cpp70multisig_tests.cpp71bip328_tests.cpp72net_peer_connection_tests.cpp73net_peer_eviction_tests.cpp74net_tests.cpp75netbase_tests.cpp76node_init_tests.cpp77node_warnings_tests.cpp78orphanage_tests.cpp79pcp_tests.cpp80peerman_tests.cpp81pmt_tests.cpp82pool_tests.cpp83pow_tests.cpp84prevector_tests.cpp85private_broadcast_tests.cpp86psbt_tests.cpp87random_tests.cpp88rbf_tests.cpp89rest_tests.cpp90result_tests.cpp91reverselock_tests.cpp92rpc_tests.cpp93sanity_tests.cpp94scheduler_tests.cpp95script_assets_tests.cpp96script_p2sh_tests.cpp97script_parse_tests.cpp98script_segwit_tests.cpp99script_standard_tests.cpp100script_tests.cpp101scriptnum_tests.cpp102serfloat_tests.cpp103serialize_tests.cpp104settings_tests.cpp105sighash_tests.cpp106sigopcount_tests.cpp107skiplist_tests.cpp108sock_tests.cpp109span_tests.cpp110streams_tests.cpp111sync_tests.cpp112system_ram_tests.cpp113system_tests.cpp114testnet4_miner_tests.cpp115threadpool_tests.cpp116timeoffsets_tests.cpp117torcontrol_tests.cpp118transaction_tests.cpp119translation_tests.cpp120txdownload_tests.cpp121txgraph_tests.cpp122txindex_tests.cpp123txospenderindex_tests.cpp124txpackage_tests.cpp125txreconciliation_tests.cpp126txrequest_tests.cpp127txvalidation_tests.cpp128txvalidationcache_tests.cpp129uint256_tests.cpp130util_check_tests.cpp131util_expected_tests.cpp132util_string_tests.cpp133util_tests.cpp134util_threadnames_tests.cpp135util_trace_tests.cpp136validation_block_tests.cpp137validation_chainstate_tests.cpp138validation_chainstatemanager_tests.cpp139validation_flush_tests.cpp140validation_tests.cpp141validationinterface_tests.cpp142versionbits_tests.cpp143)145include(TargetDataSources)146target_json_data_sources(test_bitcoin147data/base58_encode_decode.json148data/bip341_wallet_vectors.json149data/blockfilters.json150data/key_io_invalid.json151data/key_io_valid.json152data/script_tests.json153data/sighash.json154data/siphash.json155data/tx_invalid.json156data/tx_valid.json157)158target_raw_data_sources(test_bitcoin NAMESPACE test::data159data/asmap.raw160)162add_windows_application_manifest(test_bitcoin)164target_link_libraries(test_bitcoin165core_interface166test_util167bitcoin_cli168bitcoin_node169bitcoin_consensus170minisketch171secp256k1172Boost::headers173$<TARGET_NAME_IF_EXISTS:USDT::headers>174)176function(add_boost_test source_file)177if(NOT EXISTS ${source_file})178return()179endif()181file(READ "${source_file}" source_file_content)182string(REGEX183MATCHALL "(BOOST_FIXTURE_TEST_SUITE|BOOST_AUTO_TEST_SUITE)\\(([A-Za-z0-9_]+)"184test_suite_macro "${source_file_content}"185)186list(TRANSFORM test_suite_macro187REPLACE "(BOOST_FIXTURE_TEST_SUITE|BOOST_AUTO_TEST_SUITE)\\(" ""188)189foreach(test_suite_name IN LISTS test_suite_macro)190add_test(NAME ${test_suite_name}191COMMAND test_bitcoin --run_test=${test_suite_name} --catch_system_error=no --log_level=test_suite -- -printtoconsole=1192)193set_property(TEST ${test_suite_name} PROPERTY194SKIP_REGULAR_EXPRESSION195"no test cases matching filter"196"skipping script_assets_test"197)198endforeach()199endfunction()201function(add_all_test_targets)202get_target_property(test_source_dir test_bitcoin SOURCE_DIR)203get_target_property(test_sources test_bitcoin SOURCES)204foreach(test_source ${test_sources})205cmake_path(IS_RELATIVE test_source result)206if(result)207cmake_path(APPEND test_source_dir ${test_source} OUTPUT_VARIABLE test_source)208endif()209add_boost_test(${test_source})210endforeach()211endfunction()213if(ENABLE_WALLET)214add_subdirectory(${PROJECT_SOURCE_DIR}/src/wallet/test wallet)215endif()217if(ENABLE_IPC)218add_subdirectory(${PROJECT_SOURCE_DIR}/src/ipc/test ipc)219endif()221add_all_test_targets()223install_binary_component(test_bitcoin INTERNAL)
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.