@@ -24,13 +24,16 @@ user inputs. Such environments include the Python3 command line interpreter or
2424
2525## 2. Importing ` TestShell ` from the Bitcoin Core repository
2626
27- We can import the ` TestShell ` by adding the path of the Bitcoin Core
27+ We can import the ` TestShell ` by adding the path of the configured Bitcoin Core
2828` test_framework ` module to the beginning of the PATH variable, and then
29- importing the ` TestShell ` class from the ` test_shell ` sub-package.
29+ importing the ` TestShell ` class from the ` test_shell ` sub-package. Since
30+ the build system creates a copy of the ` test_framework ` module into a new ` build/ `
31+ directory along with the required configuration file, the path to the build copy
32+ must be used.
3033
3134```
3235>>> import sys
33- >>> sys.path.insert(0, "/path/to/bitcoin/test/functional")
36+ >>> sys.path.insert(0, "/path/to/bitcoin/build/ test/functional")
3437>>> from test_framework.test_shell import TestShell
3538```
3639
@@ -155,7 +158,7 @@ To prevent the logs from being removed after a shutdown, simply set the
155158The following utility consolidates logs from the bitcoind nodes and the
156159underlying ` BitcoinTestFramework ` :
157160
158- * `/path/to/bitcoin/test/functional/combine_logs.py
161+ * `/path/to/bitcoin/build/ test/functional/combine_logs.py
159162 '/path/to/bitcoin_func_test_XXXXXXX'`
160163
161164## 6. Custom ` TestShell ` parameters
@@ -170,9 +173,9 @@ can be called after the TestShell is shut down.
170173| Test parameter key | Default Value | Description |
171174| ---| ---| ---|
172175| ` bind_to_localhost_only ` | ` True ` | Binds bitcoind P2P services to ` 127.0.0.1 ` if set to ` True ` .|
173- | ` cachedir ` | ` "/path/to/bitcoin/test/cache" ` | Sets the bitcoind datadir directory. |
176+ | ` cachedir ` | ` "/path/to/bitcoin/build/ test/cache" ` | Sets the bitcoind datadir directory. |
174177| ` chain ` | ` "regtest" ` | Sets the chain-type for the underlying test bitcoind processes. |
175- | ` configfile ` | ` "/path/to/bitcoin/test/config.ini" ` | Sets the location of the test framework config file. |
178+ | ` configfile ` | ` "/path/to/bitcoin/build/ test/config.ini" ` | Sets the location of the test framework config file. |
176179| ` coveragedir ` | ` None ` | Records bitcoind RPC test coverage into this directory if set. |
177180| ` loglevel ` | ` INFO ` | Logs events at this level and higher. Can be set to ` DEBUG ` , ` INFO ` , ` WARNING ` , ` ERROR ` or ` CRITICAL ` . |
178181| ` nocleanup ` | ` False ` | Cleans up temporary test directory if set to ` True ` during ` shutdown ` . |
0 commit comments