Skip to content

Commit f6d7636

Browse files
committed
test: Treat bitcoin-wallet binary in the same way as others
This change makes the `bitcoin-wallet` binary path customizable in the same way how it can be done now with other ones, including `bitcoind`, `bitcoin-cli` and `bitcoin-util`.
1 parent dda961c commit f6d7636

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ def set_binary_paths(self):
235235
"bitcoind": ("bitcoind", "BITCOIND"),
236236
"bitcoin-cli": ("bitcoincli", "BITCOINCLI"),
237237
"bitcoin-util": ("bitcoinutil", "BITCOINUTIL"),
238+
"bitcoin-wallet": ("bitcoinwallet", "BITCOINWALLET"),
238239
}
239240
for binary, [attribute_name, env_variable_name] in binaries.items():
240241
default_filename = os.path.join(

test/functional/tool_wallet.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,11 @@ def skip_test_if_missing_module(self):
3232
self.skip_if_no_wallet_tool()
3333

3434
def bitcoin_wallet_process(self, *args):
35-
binary = self.config["environment"]["BUILDDIR"] + '/src/bitcoin-wallet' + self.config["environment"]["EXEEXT"]
3635
default_args = ['-datadir={}'.format(self.nodes[0].datadir), '-chain=%s' % self.chain]
3736
if not self.options.descriptors and 'create' in args:
3837
default_args.append('-legacy')
3938

40-
return subprocess.Popen([binary] + default_args + list(args), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
39+
return subprocess.Popen([self.options.bitcoinwallet] + default_args + list(args), stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True)
4140

4241
def assert_raises_tool_error(self, error, *args):
4342
p = self.bitcoin_wallet_process(*args)

0 commit comments

Comments
 (0)