mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-19 19:29:45 +02:00
test: skip tool_wallet test when bitcoin-wallet isn't compiled
This commit is contained in:
@@ -596,6 +596,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
if not self.is_wallet_compiled():
|
||||
raise SkipTest("wallet has not been compiled.")
|
||||
|
||||
def skip_if_no_wallet_tool(self):
|
||||
"""Skip the running test if bitcoin-wallet has not been compiled."""
|
||||
if not self.is_wallet_tool_compiled():
|
||||
raise SkipTest("bitcoin-wallet has not been compiled")
|
||||
|
||||
def skip_if_no_cli(self):
|
||||
"""Skip the running test if bitcoin-cli has not been compiled."""
|
||||
if not self.is_cli_compiled():
|
||||
@@ -609,6 +614,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
"""Checks whether the wallet module was compiled."""
|
||||
return self.config["components"].getboolean("ENABLE_WALLET")
|
||||
|
||||
def is_wallet_tool_compiled(self):
|
||||
"""Checks whether bitcoin-wallet was compiled."""
|
||||
return self.config["components"].getboolean("ENABLE_WALLET_TOOL")
|
||||
|
||||
def is_zmq_compiled(self):
|
||||
"""Checks whether the zmq module was compiled."""
|
||||
return self.config["components"].getboolean("ENABLE_ZMQ")
|
||||
|
||||
@@ -23,6 +23,7 @@ class ToolWalletTest(BitcoinTestFramework):
|
||||
|
||||
def skip_test_if_missing_module(self):
|
||||
self.skip_if_no_wallet()
|
||||
self.skip_if_no_wallet_tool()
|
||||
|
||||
def bitcoin_wallet_process(self, *args):
|
||||
binary = self.config["environment"]["BUILDDIR"] + '/src/bitcoin-wallet' + self.config["environment"]["EXEEXT"]
|
||||
|
||||
Reference in New Issue
Block a user