From fa955154c773c5129f9594982343b440d05957e2 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Fri, 13 Jun 2025 13:12:41 +0200 Subject: [PATCH] test: Add missing skip_if_no_bitcoin_tx --- test/CMakeLists.txt | 1 + test/config.ini.in | 1 + test/functional/test_framework/test_framework.py | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 7de03407354..ab67b1f1d86 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -17,6 +17,7 @@ function(create_test_config) set_configure_variable(ENABLE_WALLET ENABLE_WALLET) set_configure_variable(BUILD_CLI BUILD_BITCOIN_CLI) + set_configure_variable(BUILD_TX BUILD_BITCOIN_TX) set_configure_variable(BUILD_UTIL BUILD_BITCOIN_UTIL) set_configure_variable(BUILD_UTIL_CHAINSTATE BUILD_BITCOIN_CHAINSTATE) set_configure_variable(BUILD_WALLET_TOOL BUILD_BITCOIN_WALLET) diff --git a/test/config.ini.in b/test/config.ini.in index 9a297cb3391..6865fa8a47d 100644 --- a/test/config.ini.in +++ b/test/config.ini.in @@ -17,6 +17,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py # Which components are enabled. These are commented out by cmake if they were disabled during configuration. @ENABLE_WALLET_TRUE@ENABLE_WALLET=true @BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true +@BUILD_BITCOIN_TX_TRUE@BUILD_BITCOIN_TX=true @BUILD_BITCOIN_UTIL_TRUE@ENABLE_BITCOIN_UTIL=true @BUILD_BITCOIN_CHAINSTATE_TRUE@ENABLE_BITCOIN_CHAINSTATE=true @BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 5867398e1f7..1014a608ab9 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -1002,6 +1002,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_tx(self): + """Skip the running test if bitcoin-tx has not been compiled.""" + if not self.is_bitcoin_tx_compiled(): + raise SkipTest("bitcoin-tx 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(): @@ -1056,6 +1061,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): """Checks whether bitcoin-wallet was compiled.""" return self.config["components"].getboolean("ENABLE_WALLET_TOOL") + def is_bitcoin_tx_compiled(self): + """Checks whether bitcoin-tx was compiled.""" + return self.config["components"].getboolean("BUILD_BITCOIN_TX") + def is_bitcoin_util_compiled(self): """Checks whether bitcoin-util was compiled.""" return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL")