merge bitcoin#20458: add is_bdb_compiled helper

This commit is contained in:
Kittywhiskers Van Gogh 2020-11-23 11:23:31 +01:00 committed by PastaPastaPasta
parent 33ae65f2fd
commit aaa7ffc1b1
2 changed files with 10 additions and 1 deletions

View File

@ -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. # Which components are enabled. These are commented out by `configure` if they were disabled when running config.
@ENABLE_WALLET_TRUE@ENABLE_WALLET=true @ENABLE_WALLET_TRUE@ENABLE_WALLET=true
@USE_SQLITE_TRUE@USE_SQLITE=true @USE_SQLITE_TRUE@USE_SQLITE=true
@USE_BDB_TRUE@USE_BDB=true
@BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true @BUILD_BITCOIN_CLI_TRUE@ENABLE_CLI=true
@BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true @BUILD_BITCOIN_WALLET_TRUE@ENABLE_WALLET_TOOL=true
@BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true @BUILD_BITCOIND_TRUE@ENABLE_BITCOIND=true

View File

@ -874,6 +874,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
if not self.is_sqlite_compiled(): if not self.is_sqlite_compiled():
raise SkipTest("sqlite has not been 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): def skip_if_no_wallet_tool(self):
"""Skip the running test if dash-wallet has not been compiled.""" """Skip the running test if dash-wallet has not been compiled."""
if not self.is_wallet_tool_compiled(): if not self.is_wallet_tool_compiled():
@ -901,9 +906,12 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
return self.config["components"].getboolean("ENABLE_ZMQ") return self.config["components"].getboolean("ENABLE_ZMQ")
def is_sqlite_compiled(self): 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") 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")
MASTERNODE_COLLATERAL = 1000 MASTERNODE_COLLATERAL = 1000
HIGHPERFORMANCE_MASTERNODE_COLLATERAL = 4000 HIGHPERFORMANCE_MASTERNODE_COLLATERAL = 4000