Skip to content

Commit

Permalink
test: add is_bitcoin_util_compiled helper
Browse files Browse the repository at this point in the history
  • Loading branch information
theStack committed Apr 11, 2022
1 parent dde33ec commit 449b96e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/config.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py
@USE_SQLITE_TRUE@USE_SQLITE=true
@USE_BDB_TRUE@USE_BDB=true
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
@BUILD_BITCOIN_UTIL_TRUE@ENABLE_BITCOIN_UTIL=true
@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true
@ENABLE_FUZZ_TRUE@ENABLE_FUZZ=true
Expand Down
9 changes: 9 additions & 0 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,11 @@ def skip_if_no_wallet_tool(self):
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():
Expand Down Expand Up @@ -933,6 +938,10 @@ def is_wallet_tool_compiled(self):
"""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")
Expand Down

0 comments on commit 449b96e

Please sign in to comment.