test: Provide path to `bitcoin` binary
What changed, and why it matters
This commit is a harmless test-infrastructure change. It tells the Bitcoin Core test framework where to find the new `bitcoin` wrapper binary by adding an environment variable override (`BITCOIN_BIN`) and a default path. There is no security issue here.
No security action required. This is a normal test-framework enhancement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds bitcoin to the binary_paths namespace in test/functional/test_framework/test_framework.py, mapping it to the BITCOIN_BIN environment variable. It also sets BITCOIN_BIN in the Windows CI workflow so tests can locate bitcoin.exe. This enables future functional tests for bitcoin-mine and bitcoin-cli IPC modes to run without requiring the BITCOIN_CMD environment variable. The change is purely additive to the test harness and does not alter consensus, networking, wallet, or node runtime code.
Changed components
test/functional/test_framework/test_framework.py.github/workflows/ci.ymlInspect captured patch +4 / −0
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 1f729a62..87dd2107 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -275,6 +275,7 @@ jobs:
if: matrix.job-type == 'standard'
working-directory: build
env:
+ BITCOIN_BIN: '${{ github.workspace }}\build\bin\Release\bitcoin.exe'
BITCOIND: '${{ github.workspace }}\build\bin\Release\bitcoind.exe'
BITCOINCLI: '${{ github.workspace }}\build\bin\Release\bitcoin-cli.exe'
BITCOINTX: '${{ github.workspace }}\build\bin\Release\bitcoin-tx.exe'
diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py
index abe62bc2..bc722ab7 100755
--- a/test/functional/test_framework/test_framework.py
+++ b/test/functional/test_framework/test_framework.py
@@ -278,6 +278,7 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
paths = types.SimpleNamespace()
binaries = {
+ "bitcoin": "BITCOIN_BIN",
"bitcoind": "BITCOIND",
"bitcoin-cli": "BITCOINCLI",
"bitcoin-util": "BITCOINUTIL",
@@ -285,6 +286,8 @@ class BitcoinTestFramework(metaclass=BitcoinTestMetaClass):
"bitcoin-chainstate": "BITCOINCHAINSTATE",
"bitcoin-wallet": "BITCOINWALLET",
}
+ # Set paths to bitcoin core binaries allowing overrides with environment
+ # variables.
for binary, env_variable_name in binaries.items():
default_filename = os.path.join(
self.config["environment"]["BUILDDIR"],
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.