mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 09:15:04 +02:00
cmake: Set top-level target output locations
This change: 1. Collects build artifacts in dedicated locations. 2. Allows running bitcoin-chainstate.exe with bitcoinkernel.dll directly from the build tree on Windows.
This commit is contained in:
@@ -255,7 +255,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
for binary, [attribute_name, env_variable_name] in binaries.items():
|
||||
default_filename = os.path.join(
|
||||
self.config["environment"]["BUILDDIR"],
|
||||
"src",
|
||||
"bin",
|
||||
binary + self.config["environment"]["EXEEXT"],
|
||||
)
|
||||
setattr(self.options, attribute_name, os.getenv(env_variable_name, default=default_filename))
|
||||
@@ -272,8 +272,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
|
||||
self.set_binary_paths()
|
||||
|
||||
os.environ['PATH'] = os.pathsep.join([
|
||||
os.path.join(config['environment']['BUILDDIR'], 'src'),
|
||||
os.path.join(config['environment']['BUILDDIR'], 'src', 'qt'), os.environ['PATH']
|
||||
os.path.join(config['environment']['BUILDDIR'], 'bin'),
|
||||
os.environ['PATH']
|
||||
])
|
||||
|
||||
# Set up temp directory and start logging
|
||||
|
||||
@@ -109,7 +109,7 @@ def main():
|
||||
logging.error("Must have fuzz executable built")
|
||||
sys.exit(1)
|
||||
|
||||
fuzz_bin=os.getenv("BITCOINFUZZ", default=os.path.join(config["environment"]["BUILDDIR"], 'src', 'test', 'fuzz', 'fuzz'))
|
||||
fuzz_bin=os.getenv("BITCOINFUZZ", default=os.path.join(config["environment"]["BUILDDIR"], 'bin', 'fuzz'))
|
||||
|
||||
# Build list of tests
|
||||
test_list_all = parse_test_list(
|
||||
|
||||
@@ -73,7 +73,7 @@ def bctest(testDir, testObj, buildenv):
|
||||
are not as expected. Error is caught by bctester() and reported.
|
||||
"""
|
||||
# Get the exec names and arguments
|
||||
execprog = os.path.join(buildenv["BUILDDIR"], "src", testObj["exec"] + buildenv["EXEEXT"])
|
||||
execprog = os.path.join(buildenv["BUILDDIR"], "bin", testObj["exec"] + buildenv["EXEEXT"])
|
||||
if testObj["exec"] == "./bitcoin-util":
|
||||
execprog = os.getenv("BITCOINUTIL", default=execprog)
|
||||
elif testObj["exec"] == "./bitcoin-tx":
|
||||
|
||||
Reference in New Issue
Block a user