Skip to content

Commit 5ef2c1e

Browse files
committed
Merge bitcoin/bitcoin#27717: test: Make util/test_runner.py honor BITCOINUTIL and BITCOINTX
4f2f615 test: Make `util/test_runner.py` honor `BITCOINUTIL` and `BITCOINTX` (Hennadii Stepanov) Pull request description: This PR is a continuation of changes to our testing frameworks (bitcoin/bitcoin#27554, bitcoin/bitcoin#27561) that allow them to work correctly in a multi-config build environment that is possible for [upcoming](bitcoin/bitcoin#25797) CMake-based build system. That means that built for different configurations binaries (e.g., "Debug" and "Release") can coexist in separated directories. The commit has been pulled from hebasto/bitcoin#15 and it seems [useful](hebasto/bitcoin#15 (comment)) by itself as: > I believe the rationale for allowing to drop in the executables via env var is to allow to test the guix-produced, or other third-party-produced executables... The current implementation of the `test/functional/test_framework/test_framework.py` script uses the same approach: https://github.com/bitcoin/bitcoin/blob/09351f51d279612973ecd76811dc075dff08209f/test/functional/test_framework/test_framework.py#L231-L246 ACKs for top commit: MarcoFalke: lgtm ACK 4f2f615 TheCharlatan: ACK 4f2f615 stickies-v: ACK 4f2f615 Tree-SHA512: 99ee9a727b266700649d8f2ec528dfaeb04a1e48f0cb1d4eeaece65917165be647c10c4548429a9e8b30d094597f67e860c1db03ac689ebb409b223ce1b63aa9
2 parents 22139f6 + 4f2f615 commit 5ef2c1e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/util/test_runner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ def bctest(testDir, testObj, buildenv):
7474
"""
7575
# Get the exec names and arguments
7676
execprog = os.path.join(buildenv["BUILDDIR"], "src", testObj["exec"] + buildenv["EXEEXT"])
77+
if testObj["exec"] == "./bitcoin-util":
78+
execprog = os.getenv("BITCOINUTIL", default=execprog)
79+
elif testObj["exec"] == "./bitcoin-tx":
80+
execprog = os.getenv("BITCOINTX", default=execprog)
81+
7782
execargs = testObj['args']
7883
execrun = [execprog] + execargs
7984

0 commit comments

Comments
 (0)