mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-09 08:43:04 +01:00
test: Move export_env_build_path to util.py
This commit is contained in:
@@ -31,6 +31,7 @@ from .util import (
|
|||||||
PortSeed,
|
PortSeed,
|
||||||
assert_equal,
|
assert_equal,
|
||||||
check_json_precision,
|
check_json_precision,
|
||||||
|
export_env_build_path,
|
||||||
find_vout_for_address,
|
find_vout_for_address,
|
||||||
get_binary_paths,
|
get_binary_paths,
|
||||||
get_datadir_path,
|
get_datadir_path,
|
||||||
@@ -226,14 +227,10 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
|||||||
"""Call this method to start up the test framework object with options set."""
|
"""Call this method to start up the test framework object with options set."""
|
||||||
|
|
||||||
check_json_precision()
|
check_json_precision()
|
||||||
|
export_env_build_path(self.config)
|
||||||
|
|
||||||
self.options.cachedir = os.path.abspath(self.options.cachedir)
|
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
|
# Set up temp directory and start logging
|
||||||
if self.options.tmpdir:
|
if self.options.tmpdir:
|
||||||
self.options.tmpdir = os.path.abspath(self.options.tmpdir)
|
self.options.tmpdir = os.path.abspath(self.options.tmpdir)
|
||||||
|
|||||||
@@ -322,6 +322,13 @@ def get_binary_paths(config):
|
|||||||
return paths
|
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):
|
def count_bytes(hex_string):
|
||||||
return len(bytearray.fromhex(hex_string))
|
return len(bytearray.fromhex(hex_string))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user