aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/test_framework.py
diff options
context:
space:
mode:
authorSjors Provoost <sjors@sprovoost.nl>2020-11-23 11:23:31 +0100
committerSjors Provoost <sjors@sprovoost.nl>2020-11-23 11:30:55 +0100
commitb87caf10b57fbab148949727f4004805be2bbc1d (patch)
tree7c79f84e71173a3859e0599262d6e405881b3952 /test/functional/test_framework/test_framework.py
parent86bf3ae3b57eea4361452d19e3e62c8847d23714 (diff)
downloadbitcoin-b87caf10b57fbab148949727f4004805be2bbc1d.tar.xz
test: add is_bdb_compiled helper
Diffstat (limited to 'test/functional/test_framework/test_framework.py')
-rwxr-xr-xtest/functional/test_framework/test_framework.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index 831599913d..bf047c5f68 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -782,6 +782,11 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
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():
@@ -822,5 +827,9 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
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")