diff options
author | Ferdinando M. Ametrano <fametrano@users.noreply.github.com> | 2020-05-11 22:31:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-11 22:31:02 +0200 |
commit | 8a22fd01140bd957036fc00419b147e4268ae9b1 (patch) | |
tree | c72211db254469633ee340a41b11b047e6f16333 /test/functional/test_framework/test_framework.py | |
parent | eb2ffbb7c1347115e6a3d6fa30f909959b6170a5 (diff) | |
download | bitcoin-8a22fd01140bd957036fc00419b147e4268ae9b1.tar.xz |
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
Diffstat (limited to 'test/functional/test_framework/test_framework.py')
-rwxr-xr-x | test/functional/test_framework/test_framework.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 11c96deefb..c84a7e7c12 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -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" |