bitcoin/cmake/tests.cmake
Hennadii Stepanov 350210774e
test: Treat executable paths in tests consistently
When using multi-config CMake generators, executable paths include
per-config subdirectories, which require special handling in tests.
Using dedicated environment variables to specify executable paths
works well in such scenarios. However, the `util_test_runner` test
sets these variables for the `util/test_runner.py` script
unconditionally, which diverges from the approach used when running
`functional/test_runner.py`.

This change makes the usage of the aforementioned environment variables
uniform.
2025-04-22 11:47:45 +01:00

15 lines
511 B
CMake

# Copyright (c) 2023-present The Bitcoin Core developers
# 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 PYTHON_COMMAND)
add_test(NAME util_test_runner
COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py
)
endif()
if(PYTHON_COMMAND)
add_test(NAME util_rpcauth_test
COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/rpcauth-test.py
)
endif()