From 621d398750d9f5ce3e7ec75ccb160b3534dcc436 Mon Sep 17 00:00:00 2001 From: fanquake Date: Sat, 16 Nov 2019 20:59:03 -0500 Subject: test: skip bitcoin_cli test when the cli isn't compiled --- test/functional/interface_bitcoin_cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/functional/interface_bitcoin_cli.py b/test/functional/interface_bitcoin_cli.py index 0a378c5ef5..ec1c88ed53 100755 --- a/test/functional/interface_bitcoin_cli.py +++ b/test/functional/interface_bitcoin_cli.py @@ -12,6 +12,9 @@ class TestBitcoinCli(BitcoinTestFramework): self.setup_clean_chain = True self.num_nodes = 1 + def skip_test_if_missing_module(self): + self.skip_if_no_cli() + def run_test(self): """Main test logic""" -- cgit v1.2.3 From e9277baed64e1d4054a102e40b39a9aed7839c2f Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 18 Nov 2019 16:47:41 -0500 Subject: test: skip wallet_listreceivedby test when the cli isn't compiled --- test/functional/wallet_listreceivedby.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/functional/wallet_listreceivedby.py b/test/functional/wallet_listreceivedby.py index 5e94068930..efa6a199ad 100755 --- a/test/functional/wallet_listreceivedby.py +++ b/test/functional/wallet_listreceivedby.py @@ -19,6 +19,7 @@ class ReceivedByTest(BitcoinTestFramework): def skip_test_if_missing_module(self): self.skip_if_no_wallet() + self.skip_if_no_cli() def run_test(self): # Generate block to get out of IBD -- cgit v1.2.3 From a67352161c68fea9764cc31aff199f112d8572c6 Mon Sep 17 00:00:00 2001 From: fanquake Date: Mon, 18 Nov 2019 16:48:52 -0500 Subject: test: skip tool_wallet test when bitcoin-wallet isn't compiled --- test/config.ini.in | 1 + test/functional/test_framework/test_framework.py | 9 +++++++++ test/functional/tool_wallet.py | 1 + 3 files changed, 11 insertions(+) diff --git a/test/config.ini.in b/test/config.ini.in index 060c553da2..9687206ee1 100644 --- a/test/config.ini.in +++ b/test/config.ini.in @@ -16,6 +16,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py # Which components are enabled. These are commented out by `configure` if they were disabled when running config. @ENABLE_WALLET_TRUE@ENABLE_WALLET=true @BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true +@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true @ENABLE_FUZZ_TRUE@ENABLE_FUZZ=true @ENABLE_ZMQ_TRUE@ENABLE_ZMQ=true diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index c56c0d06ff..6b6bbfd1f9 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -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") diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py index 355cd7af75..32ef257456 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -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"] -- cgit v1.2.3