Skip to content

Commit 449b96e

Browse files
committed
test: add is_bitcoin_util_compiled helper
1 parent dde33ec commit 449b96e

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/config.ini.in

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py
1919
@USE_SQLITE_TRUE@USE_SQLITE=true
2020
@USE_BDB_TRUE@USE_BDB=true
2121
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
22+
@BUILD_BITCOIN_UTIL_TRUE@ENABLE_BITCOIN_UTIL=true
2223
@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true
2324
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true
2425
@ENABLE_FUZZ_TRUE@ENABLE_FUZZ=true

test/functional/test_framework/test_framework.py

+9
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,11 @@ def skip_if_no_wallet_tool(self):
886886
if not self.is_wallet_tool_compiled():
887887
raise SkipTest("bitcoin-wallet has not been compiled")
888888

889+
def skip_if_no_bitcoin_util(self):
890+
"""Skip the running test if bitcoin-util has not been compiled."""
891+
if not self.is_bitcoin_util_compiled():
892+
raise SkipTest("bitcoin-util has not been compiled")
893+
889894
def skip_if_no_cli(self):
890895
"""Skip the running test if bitcoin-cli has not been compiled."""
891896
if not self.is_cli_compiled():
@@ -933,6 +938,10 @@ def is_wallet_tool_compiled(self):
933938
"""Checks whether bitcoin-wallet was compiled."""
934939
return self.config["components"].getboolean("ENABLE_WALLET_TOOL")
935940

941+
def is_bitcoin_util_compiled(self):
942+
"""Checks whether bitcoin-util was compiled."""
943+
return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL")
944+
936945
def is_zmq_compiled(self):
937946
"""Checks whether the zmq module was compiled."""
938947
return self.config["components"].getboolean("ENABLE_ZMQ")

0 commit comments

Comments
 (0)