cmake, test: Disable tests instead of ignoring them

This commit is contained in:
Hennadii Stepanov 2025-02-12 12:39:30 +00:00
parent 274a89e052
commit fee2ccfb67
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -2,14 +2,16 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or https://opensource.org/license/mit/.
if(TARGET bitcoin-util AND TARGET bitcoin-tx AND TARGET Python3::Interpreter)
add_test(NAME util_test_runner
COMMAND Python3::Interpreter ${PROJECT_BINARY_DIR}/test/util/test_runner.py
)
endif()
set_tests_properties(util_test_runner PROPERTIES
DISABLED $<NOT:$<AND:$<TARGET_EXISTS:Python3::Interpreter>,$<TARGET_EXISTS:bitcoin-util>,$<TARGET_EXISTS:bitcoin-tx>>>
)
if(TARGET Python3::Interpreter)
add_test(NAME util_rpcauth_test
COMMAND Python3::Interpreter ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
)
endif()
set_tests_properties(util_rpcauth_test PROPERTIES
DISABLED $<NOT:$<TARGET_EXISTS:Python3::Interpreter>>
)