Skip to content

Commit

Permalink
Merge bitcoin/bitcoin#27717: test: Make util/test_runner.py honor `…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
fanquake committed May 23, 2023
2 parents 22139f6 + 4f2f615 commit 5ef2c1e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/util/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5ef2c1e

Please sign in to comment.