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) 2024-present The Bitcoin Core developers2# Distributed under the MIT software license, see the accompanying3# file COPYING or https://opensource.org/license/mit/.5include(${CMAKE_CURRENT_LIST_DIR}/CoverageInclude.cmake)7set(functional_test_runner test/functional/test_runner.py)8if(EXTENDED_FUNCTIONAL_TESTS)9list(APPEND functional_test_runner --extended)10endif()11if(DEFINED JOBS)12list(APPEND CMAKE_CTEST_COMMAND -j ${JOBS})13list(APPEND functional_test_runner -j ${JOBS})14endif()16execute_process(17COMMAND ${CMAKE_CTEST_COMMAND} --build-config Coverage18WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}19COMMAND_ERROR_IS_FATAL ANY20)21execute_process(22COMMAND ${LCOV_COMMAND} --capture --directory src --test-name test_bitcoin --output-file test_bitcoin.info23WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}24COMMAND_ERROR_IS_FATAL ANY25)26execute_process(27COMMAND ${LCOV_COMMAND} --zerocounters --directory src28WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}29COMMAND_ERROR_IS_FATAL ANY30)31execute_process(32COMMAND ${LCOV_FILTER_COMMAND} test_bitcoin.info test_bitcoin_filtered.info33WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}34COMMAND_ERROR_IS_FATAL ANY35)36execute_process(37COMMAND ${LCOV_COMMAND} --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_filtered.info38WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}39COMMAND_ERROR_IS_FATAL ANY40)41execute_process(42COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --output-file test_bitcoin_coverage.info43WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}44COMMAND_ERROR_IS_FATAL ANY45)46execute_process(47COMMAND ${GENHTML_COMMAND} test_bitcoin_coverage.info --output-directory test_bitcoin.coverage48WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}49COMMAND_ERROR_IS_FATAL ANY50)52execute_process(53COMMAND ${functional_test_runner}54WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}55COMMAND_ERROR_IS_FATAL ANY56)57execute_process(58COMMAND ${LCOV_COMMAND} --capture --directory src --test-name functional-tests --output-file functional_test.info59WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}60COMMAND_ERROR_IS_FATAL ANY61)62execute_process(63COMMAND ${LCOV_COMMAND} --zerocounters --directory src64WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}65COMMAND_ERROR_IS_FATAL ANY66)67execute_process(68COMMAND ${LCOV_FILTER_COMMAND} functional_test.info functional_test_filtered.info69WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}70COMMAND_ERROR_IS_FATAL ANY71)72execute_process(73COMMAND ${LCOV_COMMAND} --add-tracefile functional_test_filtered.info --output-file functional_test_filtered.info74WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}75COMMAND_ERROR_IS_FATAL ANY76)77execute_process(78COMMAND ${LCOV_COMMAND} --add-tracefile baseline_filtered.info --add-tracefile test_bitcoin_filtered.info --add-tracefile functional_test_filtered.info --output-file total_coverage.info79COMMAND ${GREP_EXECUTABLE} "%"80COMMAND ${AWK_EXECUTABLE} "{ print substr($3,2,50) \"/\" $5 }"81OUTPUT_FILE coverage_percent.txt82WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}83COMMAND_ERROR_IS_FATAL ANY84)85execute_process(86COMMAND ${GENHTML_COMMAND} total_coverage.info --output-directory total.coverage87WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}88COMMAND_ERROR_IS_FATAL ANY89)
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.