From 449b96ed97f8b95cae91858dba605b326de1fd45 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Mon, 11 Apr 2022 21:39:13 +0200 Subject: test: add `is_bitcoin_util_compiled` helper --- test/functional/test_framework/test_framework.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/functional/test_framework') diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index ecc2b12b01..a39ee003ef 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -886,6 +886,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): if not self.is_wallet_tool_compiled(): raise SkipTest("bitcoin-wallet has not been compiled") + def skip_if_no_bitcoin_util(self): + """Skip the running test if bitcoin-util has not been compiled.""" + if not self.is_bitcoin_util_compiled(): + raise SkipTest("bitcoin-util 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(): @@ -933,6 +938,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): """Checks whether bitcoin-wallet was compiled.""" return self.config["components"].getboolean("ENABLE_WALLET_TOOL") + def is_bitcoin_util_compiled(self): + """Checks whether bitcoin-util was compiled.""" + return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL") + def is_zmq_compiled(self): """Checks whether the zmq module was compiled.""" return self.config["components"].getboolean("ENABLE_ZMQ") -- cgit v1.2.3