diff options
author | fanquake <fanquake@gmail.com> | 2023-05-23 13:06:02 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-05-23 13:23:58 +0100 |
commit | 5ef2c1ee7a7416907e0f9135dc0701a88d92a7f6 (patch) | |
tree | 7124ee39b396897061f6d72e40810a0a7685850c | |
parent | 22139f6e83a2bedd2dad9f280567d2c76c54252f (diff) | |
parent | 4f2f615d1362afe92cabe9eab50087f8bfe454fd (diff) |
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: https://github.com/bitcoin/bitcoin/blob/09351f51d279612973ecd76811dc075dff08209f/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
-rwxr-xr-x | test/util/test_runner.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/util/test_runner.py b/test/util/test_runner.py index e5cdd0bc3a..1cd368f6f4 100755 --- a/test/util/test_runner.py +++ b/test/util/test_runner.py @@ -74,6 +74,11 @@ def bctest(testDir, testObj, buildenv): """ # Get the exec names and arguments 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'] execrun = [execprog] + execargs |