Skip to content

Commit 2ee954d

Browse files
author
MarcoFalke
committed
Merge #20458: test: add is_bdb_compiled helper
b87caf1 test: add is_bdb_compiled helper (Sjors Provoost) Pull request description: Followup for #20202, needed by #16546. Allow the functional test suite to skip tests that require BDB, as well as introduce specific logic to handle whether BDB support is enabled or not. It follows the same pattern as `skip_if_no_sqlite` and `is_sqlite_compiled`. ACKs for top commit: laanwj: Code review ACK b87caf1 Tree-SHA512: e84fb22e017b28f0f75d17e5368fcba22a893484b31b12082cfe9354e6fbd566daf34b3b82f7deb7205b2061c9c61538e402df000e2f05428affae6dbea05c5e
2 parents 555b5d1 + b87caf1 commit 2ee954d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

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 `configure` if they were disabled when running config.
1818
@ENABLE_WALLET_TRUE@ENABLE_WALLET=true
1919
@USE_SQLITE_TRUE@USE_SQLITE=true
20+
@USE_BDB_TRUE@USE_BDB=true
2021
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
2122
@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true
2223
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true

test/functional/test_framework/test_framework.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,11 @@ def skip_if_no_sqlite(self):
782782
if not self.is_sqlite_compiled():
783783
raise SkipTest("sqlite has not been compiled.")
784784

785+
def skip_if_no_bdb(self):
786+
"""Skip the running test if BDB has not been compiled."""
787+
if not self.is_bdb_compiled():
788+
raise SkipTest("BDB has not been compiled.")
789+
785790
def skip_if_no_wallet_tool(self):
786791
"""Skip the running test if bitcoin-wallet has not been compiled."""
787792
if not self.is_wallet_tool_compiled():
@@ -822,5 +827,9 @@ def is_zmq_compiled(self):
822827
return self.config["components"].getboolean("ENABLE_ZMQ")
823828

824829
def is_sqlite_compiled(self):
825-
"""Checks whether the wallet module was compiled."""
830+
"""Checks whether the wallet module was compiled with Sqlite support."""
826831
return self.config["components"].getboolean("USE_SQLITE")
832+
833+
def is_bdb_compiled(self):
834+
"""Checks whether the wallet module was compiled with BDB support."""
835+
return self.config["components"].getboolean("USE_BDB")

0 commit comments

Comments
 (0)