Changeset View
Changeset View
Standalone View
Standalone View
doc/developer-notes.md
Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | |||||
Simple example of debugging unit tests with LLDB (OSX or Linux): | Simple example of debugging unit tests with LLDB (OSX or Linux): | ||||
``` | ``` | ||||
cd /build/src/test | cd /build/src/test | ||||
lldb -- test_bitcoin | lldb -- test_bitcoin | ||||
break set --file interpreter.cpp --line 295 | break set --file interpreter.cpp --line 295 | ||||
run | run | ||||
``` | ``` | ||||
**writing script integration tests** | |||||
Script integration tests are built using `src/test/script_tests.cpp`: | |||||
1. Uncomment the line with `#define UPDATE_JSON_TESTS` | |||||
2. Add a new TestBuilder to the `script_build` test to cover your test case. | |||||
3. `make && ./src/test/test_bitcoin --run_test=script_tests` | |||||
4. Copy your newly generated test JSON from `<build-dir>/src/script_tests.json.gen` to `src/test/data/script_tests.json`. | |||||
Please commit your TestBuilder along with your generated test JSON and cleanup the uncommented #define before code review. | |||||
**testnet and regtest modes** | **testnet and regtest modes** | ||||
Run with the -testnet option to run with "play bitcoins" on the test network, if you | Run with the -testnet option to run with "play bitcoins" on the test network, if you | ||||
are testing multi-machine code that needs to operate across the internet. | are testing multi-machine code that needs to operate across the internet. | ||||
If you are testing something that can run on one machine, run with the -regtest option. | If you are testing something that can run on one machine, run with the -regtest option. | ||||
In regression test mode, blocks can be created on-demand; see test/functional/ for tests | In regression test mode, blocks can be created on-demand; see test/functional/ for tests | ||||
that run in -regtest mode. | that run in -regtest mode. | ||||
▲ Show 20 Lines • Show All 323 Lines • Show Last 20 Lines |