diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 58933c9d6eb..503120213a6 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -31,6 +31,7 @@ from .util import ( PortSeed, assert_equal, check_json_precision, + export_env_build_path, find_vout_for_address, get_binary_paths, get_datadir_path, @@ -226,14 +227,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass): """Call this method to start up the test framework object with options set.""" check_json_precision() + export_env_build_path(self.config) self.options.cachedir = os.path.abspath(self.options.cachedir) - os.environ['PATH'] = os.pathsep.join([ - os.path.join(self.config["environment"]["BUILDDIR"], "bin"), - os.environ['PATH'] - ]) - # Set up temp directory and start logging if self.options.tmpdir: self.options.tmpdir = os.path.abspath(self.options.tmpdir) diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 4ee654949c7..b9f1b488e09 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -322,6 +322,13 @@ def get_binary_paths(config): return paths +def export_env_build_path(config): + os.environ["PATH"] = os.pathsep.join([ + os.path.join(config["environment"]["BUILDDIR"], "bin"), + os.environ["PATH"], + ]) + + def count_bytes(hex_string): return len(bytearray.fromhex(hex_string))