test: Make util/test_runner.py honor BITCOINUTIL and BITCOINTX

This change allows to drop in the executables via environment variables
in the same way as for functional tests.
This commit is contained in:
Hennadii Stepanov 2023-05-01 12:01:45 +01:00
parent ad7819d2f8
commit 4f2f615d13
No known key found for this signature in database
GPG key ID: 410108112E7EA81F

View file

@ -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