mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
cmake: Add total_coverage
target
This commit is contained in:
parent
55014d1ae2
commit
30e25a7fb9
1 changed files with 12 additions and 0 deletions
|
@ -416,6 +416,18 @@ if(BUILD_FOR_COVERAGE)
|
|||
add_custom_target(test_bitcoin_coverage
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/test_bitcoin.coverage/index.html
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${PROJECT_BINARY_DIR}/total.coverage/index.html
|
||||
COMMAND Python3::Interpreter ${PROJECT_BINARY_DIR}/test/functional/test_runner.py
|
||||
COMMAND llvm-profdata merge --instr ${PROFILE_DATA_DIR}/*.profraw --output ${PROFILE_DATA_DIR}/total.profdata
|
||||
COMMAND llvm-cov show -instr-profile=${PROFILE_DATA_DIR}/total.profdata -object=$<TARGET_FILE:bitcoind> -object=$<TARGET_FILE:bitcoin-cli> -object=$<TARGET_FILE:bitcoin-wallet> -object=$<TARGET_FILE:test_bitcoin> -object=$<TARGET_FILE:bitcoin-util> -object=$<TARGET_FILE:bitcoin-tx> -output-dir=${PROJECT_BINARY_DIR}/total.coverage -format=html ${coverage_ignore_paths}
|
||||
DEPENDS bitcoind bitcoin-cli bitcoin-wallet
|
||||
)
|
||||
add_custom_target(total_coverage
|
||||
DEPENDS ${PROJECT_BINARY_DIR}/total.coverage/index.html
|
||||
)
|
||||
add_dependencies(total_coverage test_bitcoin_coverage)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in a new issue