From 3cceb60a7153f5512ad292c2315740af64fbc41d Mon Sep 17 00:00:00 2001 From: Ryan Ofsky Date: Tue, 26 Nov 2024 22:53:46 -0500 Subject: [PATCH] test: Provide path to `bitcoin` binary Set new `BitcoinTestFramework.binary_paths.bitcoin_bin` property with path to the `bitcoin` wrapper binary. This allows new tests for `bitcoin-mine` in #30437 and `bitcoin-cli` in #32297 to find the `bitcoin` binary and call `bitcoin -m` to start nodes with IPC support. This way the new tests can run whenever the ENABLE_IPC build option is enabled, instead of only running when the `BITCOIN_CMD` environment variable is set to `bitcoin -m` --- .github/workflows/ci.yml | 1 + test/functional/test_framework/test_framework.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f729a62dcf..87dd21075b1 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 abe62bc2be1..bc722ab7e8a 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"],