Skip to content

Commit f8123d4

Browse files
author
MarcoFalke
committed
Merge #18952: test: avoid os-dependant path
8a22fd0 avoided os-dependant path (Ferdinando M. Ametrano) Pull request description: The current code fails on windows because of the forward slashes; using os.path.join solves the problem and it is in general more robust ACKs for top commit: MarcoFalke: ACK 8a22fd0 Tree-SHA512: 813f27aea33f97c8afac52e716a55fc5d7fb69621023aba99d40df7e1d145e0ec8d1eee49ddd403b219bf0e0e168e0e987b05c78eaef611f744d99bf2fc8bc91
2 parents 5a454d7 + 8a22fd0 commit f8123d4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,18 @@ def setup(self):
185185
config = configparser.ConfigParser()
186186
config.read_file(open(self.options.configfile))
187187
self.config = config
188-
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/bitcoind' + config["environment"]["EXEEXT"])
189-
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/bitcoin-cli' + config["environment"]["EXEEXT"])
188+
fname_bitcoind = os.path.join(
189+
config["environment"]["BUILDDIR"],
190+
"src",
191+
"bitcoind" + config["environment"]["EXEEXT"]
192+
)
193+
fname_bitcoincli = os.path.join(
194+
config["environment"]["BUILDDIR"],
195+
"src",
196+
"bitcoin-cli" + config["environment"]["EXEEXT"]
197+
)
198+
self.options.bitcoind = os.getenv("BITCOIND", default=fname_bitcoind)
199+
self.options.bitcoincli = os.getenv("BITCOINCLI", default=fname_bitcoincli)
190200

191201
self.options.previous_releases_path = os.getenv("PREVIOUS_RELEASES_DIR") or os.getcwd() + "/releases"
192202

0 commit comments

Comments
 (0)