mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-05-17 23:56:39 +00:00
Merge bitcoin/bitcoin#27717: test: Make util/test_runner.py
honor BITCOINUTIL
and BITCOINTX
4f2f615d1362afe92cabe9eab50087f8bfe454fd 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 (https://github.com/bitcoin/bitcoin/pull/27554, https://github.com/bitcoin/bitcoin/pull/27561) that allow them to work correctly in a multi-config build environment that is possible for [upcoming](https://github.com/bitcoin/bitcoin/pull/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 https://github.com/hebasto/bitcoin/pull/15 and it seems [useful](https://github.com/hebasto/bitcoin/pull/15#discussion_r1200251404) 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: 09351f51d2/test/functional/test_framework/test_framework.py (L231-L246)
ACKs for top commit:
MarcoFalke:
lgtm ACK 4f2f615d1362afe92cabe9eab50087f8bfe454fd
TheCharlatan:
ACK 4f2f615d1362afe92cabe9eab50087f8bfe454fd
stickies-v:
ACK 4f2f615d1362afe92cabe9eab50087f8bfe454fd
Tree-SHA512: 99ee9a727b266700649d8f2ec528dfaeb04a1e48f0cb1d4eeaece65917165be647c10c4548429a9e8b30d094597f67e860c1db03ac689ebb409b223ce1b63aa9
This commit is contained in:
commit
5ef2c1ee7a
@ -74,6 +74,11 @@ def bctest(testDir, testObj, buildenv):
|
|||||||
"""
|
"""
|
||||||
# Get the exec names and arguments
|
# Get the exec names and arguments
|
||||||
execprog = os.path.join(buildenv["BUILDDIR"], "src", testObj["exec"] + buildenv["EXEEXT"])
|
execprog = os.path.join(buildenv["BUILDDIR"], "src", testObj["exec"] + buildenv["EXEEXT"])
|
||||||
|
if testObj["exec"] == "./bitcoin-util":
|
||||||
|
execprog = os.getenv("BITCOINUTIL", default=execprog)
|
||||||
|
elif testObj["exec"] == "./bitcoin-tx":
|
||||||
|
execprog = os.getenv("BITCOINTX", default=execprog)
|
||||||
|
|
||||||
execargs = testObj['args']
|
execargs = testObj['args']
|
||||||
execrun = [execprog] + execargs
|
execrun = [execprog] + execargs
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user