diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index f1a8fdefd01..0617d334119 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -1124,55 +1124,55 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): def is_bench_compiled(self): """Checks whether bench_bitcoin was compiled.""" - return self.config["components"].getboolean("BUILD_BENCH") + return self.config.getboolean("components", "BUILD_BENCH") def is_cli_compiled(self): """Checks whether bitcoin-cli was compiled.""" - return self.config["components"].getboolean("ENABLE_CLI") + return self.config.getboolean("components", "ENABLE_CLI") def is_external_signer_compiled(self): """Checks whether external signer support was compiled.""" - return self.config["components"].getboolean("ENABLE_EXTERNAL_SIGNER") + return self.config.getboolean("components", "ENABLE_EXTERNAL_SIGNER") def is_wallet_compiled(self): """Checks whether the wallet module was compiled.""" - return self.config["components"].getboolean("ENABLE_WALLET") + return self.config.getboolean("components", "ENABLE_WALLET") def is_wallet_tool_compiled(self): """Checks whether bitcoin-wallet was compiled.""" - return self.config["components"].getboolean("ENABLE_WALLET_TOOL") + return self.config.getboolean("components", "ENABLE_WALLET_TOOL") def is_bitcoin_tx_compiled(self): """Checks whether bitcoin-tx was compiled.""" - return self.config["components"].getboolean("BUILD_BITCOIN_TX") + return self.config.getboolean("components", "BUILD_BITCOIN_TX") def is_bitcoin_util_compiled(self): """Checks whether bitcoin-util was compiled.""" - return self.config["components"].getboolean("ENABLE_BITCOIN_UTIL") + return self.config.getboolean("components", "ENABLE_BITCOIN_UTIL") def is_bitcoin_chainstate_compiled(self): """Checks whether bitcoin-chainstate was compiled.""" - return self.config["components"].getboolean("ENABLE_BITCOIN_CHAINSTATE") + return self.config.getboolean("components", "ENABLE_BITCOIN_CHAINSTATE") def is_zmq_compiled(self): """Checks whether the zmq module was compiled.""" - return self.config["components"].getboolean("ENABLE_ZMQ") + return self.config.getboolean("components", "ENABLE_ZMQ") def is_embedded_asmap_compiled(self): """Checks whether ASMap data was embedded during compilation.""" - return self.config["components"].getboolean("ENABLE_EMBEDDED_ASMAP") + return self.config.getboolean("components", "ENABLE_EMBEDDED_ASMAP") def is_usdt_compiled(self): """Checks whether the USDT tracepoints were compiled.""" - return self.config["components"].getboolean("ENABLE_USDT_TRACEPOINTS") + return self.config.getboolean("components", "ENABLE_USDT_TRACEPOINTS") def is_ipc_compiled(self): """Checks whether ipc was compiled.""" - return self.config["components"].getboolean("ENABLE_IPC") + return self.config.getboolean("components", "ENABLE_IPC") def is_gui_compiled(self): """Checks whether the GUI was compiled.""" - return self.config["components"].getboolean("BUILD_GUI", fallback=False) + return self.config.getboolean("components", "BUILD_GUI") def has_blockfile(self, node, filenum: str): return (node.blocks_path/ f"blk{filenum}.dat").is_file() diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 0a27c8b184d..7ff46f35f0f 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -476,7 +476,7 @@ def main(): assert results_filepath.parent.exists(), "Results file parent directory does not exist" logging.debug("Test results will be written to " + str(results_filepath)) - enable_bitcoind = config["components"].getboolean("ENABLE_BITCOIND") + enable_bitcoind = config.getboolean("components", "ENABLE_BITCOIND") if not enable_bitcoind: print("No functional tests to run.") @@ -545,7 +545,7 @@ def main(): # Exclude all variants of a test remove_tests([test for test in test_list if test.split('.py')[0] == exclude_test.split('.py')[0]]) - if config["components"].getboolean("BUILD_BENCH") and TOOL_BENCH_SANITY_CHECK in test_list: + if config.getboolean("components", "BUILD_BENCH") and TOOL_BENCH_SANITY_CHECK in test_list: # Remove it, and expand it for each bench in the list test_list.remove(TOOL_BENCH_SANITY_CHECK) bench_cmd = Binaries(get_binary_paths(config), bin_dir=None).bench_argv() + ["-list"] diff --git a/test/fuzz/test_runner.py b/test/fuzz/test_runner.py index 503acdc1c9c..91df295f62c 100755 --- a/test/fuzz/test_runner.py +++ b/test/fuzz/test_runner.py @@ -101,7 +101,7 @@ def main(): configfile = os.path.abspath(os.path.dirname(__file__)) + "/../config.ini" config.read_file(open(configfile)) - if not config["components"].getboolean("ENABLE_FUZZ_BINARY"): + if not config.getboolean("components", "ENABLE_FUZZ_BINARY"): logging.error("Must have fuzz executable built") sys.exit(1)