@@ -24,13 +24,16 @@ user inputs. Such environments include the Python3 command line interpreter or
24
24
25
25
## 2. Importing ` TestShell ` from the Bitcoin Core repository
26
26
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
28
28
` 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.
30
33
31
34
```
32
35
>>> import sys
33
- >>> sys.path.insert(0, "/path/to/bitcoin/test/functional")
36
+ >>> sys.path.insert(0, "/path/to/bitcoin/build/ test/functional")
34
37
>>> from test_framework.test_shell import TestShell
35
38
```
36
39
@@ -155,7 +158,7 @@ To prevent the logs from being removed after a shutdown, simply set the
155
158
The following utility consolidates logs from the bitcoind nodes and the
156
159
underlying ` BitcoinTestFramework ` :
157
160
158
- * `/path/to/bitcoin/test/functional/combine_logs.py
161
+ * `/path/to/bitcoin/build/ test/functional/combine_logs.py
159
162
'/path/to/bitcoin_func_test_XXXXXXX'`
160
163
161
164
## 6. Custom ` TestShell ` parameters
@@ -170,9 +173,9 @@ can be called after the TestShell is shut down.
170
173
| Test parameter key | Default Value | Description |
171
174
| ---| ---| ---|
172
175
| ` 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. |
174
177
| ` 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. |
176
179
| ` coveragedir ` | ` None ` | Records bitcoind RPC test coverage into this directory if set. |
177
180
| ` loglevel ` | ` INFO ` | Logs events at this level and higher. Can be set to ` DEBUG ` , ` INFO ` , ` WARNING ` , ` ERROR ` or ` CRITICAL ` . |
178
181
| ` nocleanup ` | ` False ` | Cleans up temporary test directory if set to ` True ` during ` shutdown ` . |
0 commit comments