From 06ec7f56dfb8d29b8aacccc4c0206ee029a075af Mon Sep 17 00:00:00 2001 From: Luke Dashjr Date: Sat, 12 Jan 2019 13:31:40 +0000 Subject: [PATCH] test: Support -cli tests using external bitcoin-cli --- test/functional/test_framework/test_framework.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 40360c54a0f71..cd56cfc62e6c8 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -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): @@ -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):