Skip to content

Commit fa95515

Browse files
author
MarcoFalke
committed
test: Add missing skip_if_no_bitcoin_tx
1 parent fac9db6 commit fa95515

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

test/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function(create_test_config)
1717

1818
set_configure_variable(ENABLE_WALLET ENABLE_WALLET)
1919
set_configure_variable(BUILD_CLI BUILD_BITCOIN_CLI)
20+
set_configure_variable(BUILD_TX BUILD_BITCOIN_TX)
2021
set_configure_variable(BUILD_UTIL BUILD_BITCOIN_UTIL)
2122
set_configure_variable(BUILD_UTIL_CHAINSTATE BUILD_BITCOIN_CHAINSTATE)
2223
set_configure_variable(BUILD_WALLET_TOOL BUILD_BITCOIN_WALLET)

test/config.ini.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py
1717
# Which components are enabled. These are commented out by cmake if they were disabled during configuration.
1818
@ENABLE_WALLET_TRUE@ENABLE_WALLET=true
1919
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
20+
@BUILD_BITCOIN_TX_TRUE@BUILD_BITCOIN_TX=true
2021
@BUILD_BITCOIN_UTIL_TRUE@ENABLE_BITCOIN_UTIL=true
2122
@BUILD_BITCOIN_CHAINSTATE_TRUE@ENABLE_BITCOIN_CHAINSTATE=true
2223
@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true

test/functional/test_framework/test_framework.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,6 +1002,11 @@ def skip_if_no_wallet_tool(self):
10021002
if not self.is_wallet_tool_compiled():
10031003
raise SkipTest("bitcoin-wallet has not been compiled")
10041004

1005+
def skip_if_no_bitcoin_tx(self):
1006+
"""Skip the running test if bitcoin-tx has not been compiled."""
1007+
if not self.is_bitcoin_tx_compiled():
1008+
raise SkipTest("bitcoin-tx has not been compiled")
1009+
10051010
def skip_if_no_bitcoin_util(self):
10061011
"""Skip the running test if bitcoin-util has not been compiled."""
10071012
if not self.is_bitcoin_util_compiled():
@@ -1056,6 +1061,10 @@ def is_wallet_tool_compiled(self):
10561061
"""Checks whether bitcoin-wallet was compiled."""
10571062
return self.config["components"].getboolean("ENABLE_WALLET_TOOL")
10581063

1064+
def is_bitcoin_tx_compiled(self):
1065+
"""Checks whether bitcoin-tx was compiled."""
1066+
return self.config["components"].getboolean("BUILD_BITCOIN_TX")
1067+
10591068
def is_bitcoin_util_compiled(self):
10601069
"""Checks whether bitcoin-util was compiled."""
10611070
return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL")

0 commit comments

Comments
 (0)