Skip to content

Commit

Permalink
test: Support -cli tests using external bitcoin-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-jr committed Jul 24, 2021
1 parent 42af959 commit 06ec7f5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,8 @@ def skip_if_no_wallet_tool(self):
raise SkipTest("bitcoin-wallet has not been compiled")

def skip_if_no_cli(self):
"""Skip the running test if bitcoin-cli has not been compiled."""
if not self.is_cli_compiled():
"""Skip the running test if bitcoin-cli is not available."""
if not self.is_cli_available():
raise SkipTest("bitcoin-cli has not been compiled.")

def skip_if_no_previous_releases(self):
Expand All @@ -839,8 +839,11 @@ def skip_if_no_external_signer(self):
if not self.is_external_signer_compiled():
raise SkipTest("external signer support has not been compiled.")

def is_cli_compiled(self):
"""Checks whether bitcoin-cli was compiled."""
def is_cli_available(self):
"""Checks whether bitcoin-cli is available."""
if "BITCOINCLI" in os.environ:
return os.environ["BITCOINCLI"]

return self.config["components"].getboolean("ENABLE_CLI")

def is_external_signer_compiled(self):
Expand Down

0 comments on commit 06ec7f5

Please sign in to comment.