Skip to content

Commit 8a22fd0

Browse files
authored
avoided os-dependant path
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
1 parent eb2ffbb commit 8a22fd0

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)