From 350210774e4789dc429b8eb3768d37f5144a6ed3 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Tue, 22 Apr 2025 11:47:45 +0100 Subject: [PATCH] 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. --- .github/workflows/ci.yml | 2 ++ cmake/tests.cmake | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1dff87ad238..35789efbfdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -242,6 +242,8 @@ jobs: working-directory: build env: QT_PLUGIN_PATH: '${{ github.workspace }}\build\vcpkg_installed\x64-windows\Qt6\plugins' + BITCOINUTIL: '${{ github.workspace }}\build\bin\Release\bitcoin-util.exe' + BITCOINTX: '${{ github.workspace }}\build\bin\Release\bitcoin-tx.exe' run: | ctest --output-on-failure --stop-on-failure -j $NUMBER_OF_PROCESSORS -C Release diff --git a/cmake/tests.cmake b/cmake/tests.cmake index 27913298001..c1d9bb31cf4 100644 --- a/cmake/tests.cmake +++ b/cmake/tests.cmake @@ -4,7 +4,7 @@ if(TARGET bitcoin-util AND TARGET bitcoin-tx AND PYTHON_COMMAND) add_test(NAME util_test_runner - COMMAND ${CMAKE_COMMAND} -E env BITCOINUTIL=$ BITCOINTX=$ ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py + COMMAND ${PYTHON_COMMAND} ${PROJECT_BINARY_DIR}/test/util/test_runner.py ) endif()