mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
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
This commit is contained in:
parent
eb2ffbb7c1
commit
8a22fd0114
1 changed files with 12 additions and 2 deletions
|
@ -185,8 +185,18 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||
config = configparser.ConfigParser()
|
||||
config.read_file(open(self.options.configfile))
|
||||
self.config = config
|
||||
self.options.bitcoind = os.getenv("BITCOIND", default=config["environment"]["BUILDDIR"] + '/src/bitcoind' + config["environment"]["EXEEXT"])
|
||||
self.options.bitcoincli = os.getenv("BITCOINCLI", default=config["environment"]["BUILDDIR"] + '/src/bitcoin-cli' + config["environment"]["EXEEXT"])
|
||||
fname_bitcoind = os.path.join(
|
||||
config["environment"]["BUILDDIR"],
|
||||
"src",
|
||||
"bitcoind" + config["environment"]["EXEEXT"]
|
||||
)
|
||||
fname_bitcoincli = os.path.join(
|
||||
config["environment"]["BUILDDIR"],
|
||||
"src",
|
||||
"bitcoin-cli" + config["environment"]["EXEEXT"]
|
||||
)
|
||||
self.options.bitcoind = os.getenv("BITCOIND", default=fname_bitcoind)
|
||||
self.options.bitcoincli = os.getenv("BITCOINCLI", default=fname_bitcoincli)
|
||||
|
||||
self.options.previous_releases_path = os.getenv("PREVIOUS_RELEASES_DIR") or os.getcwd() + "/releases"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue