Skip to content

Commit

Permalink
test: add is_bdb_compiled helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors committed Nov 23, 2020
1 parent 86bf3ae commit b87caf1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions test/config.ini.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RPCAUTH=@abs_top_srcdir@/share/rpcauth/rpcauth.py
# Which components are enabled. These are commented out by `configure` if they were disabled when running config.
@ENABLE_WALLET_TRUE@ENABLE_WALLET=true
@USE_SQLITE_TRUE@USE_SQLITE=true
@USE_BDB_TRUE@USE_BDB=true
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true
Expand Down
11 changes: 10 additions & 1 deletion test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,11 @@ def skip_if_no_sqlite(self):
if not self.is_sqlite_compiled():
raise SkipTest("sqlite has not been compiled.")

def skip_if_no_bdb(self):
"""Skip the running test if BDB has not been compiled."""
if not self.is_bdb_compiled():
raise SkipTest("BDB has not been compiled.")

def skip_if_no_wallet_tool(self):
"""Skip the running test if bitcoin-wallet has not been compiled."""
if not self.is_wallet_tool_compiled():
Expand Down Expand Up @@ -822,5 +827,9 @@ def is_zmq_compiled(self):
return self.config["components"].getboolean("ENABLE_ZMQ")

def is_sqlite_compiled(self):
"""Checks whether the wallet module was compiled."""
"""Checks whether the wallet module was compiled with Sqlite support."""
return self.config["components"].getboolean("USE_SQLITE")

def is_bdb_compiled(self):
"""Checks whether the wallet module was compiled with BDB support."""
return self.config["components"].getboolean("USE_BDB")

0 comments on commit b87caf1

Please sign in to comment.