build: Fix 'make deploy' for OSX
[bitcoinplatinum.git] / qa / README.md
blob225207cc1cebffabe86ed043acf2b7d4272ab216
1 The [pull-tester](/qa/pull-tester/) folder contains a script to call
2 multiple tests from the [rpc-tests](/qa/rpc-tests/) folder.
4 Every pull request to the bitcoin repository is built and run through
5 the regression test suite. You can also run all or only individual
6 tests locally.
8 Test dependencies
9 =================
10 Before running the tests, the following must be installed.
12 Unix
13 ----
14 The python3-zmq library is required. On Ubuntu or Debian it can be installed via:
15 ```
16 sudo apt-get install python3-zmq
17 ```
19 OS X
20 ------
21 ```
22 pip3 install pyzmq
23 ```
25 Running tests
26 =============
28 You can run any single test by calling
30     qa/pull-tester/rpc-tests.py <testname>
32 Or you can run any combination of tests by calling
34     qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...
36 Run the regression test suite with
38     qa/pull-tester/rpc-tests.py
40 Run all possible tests with
42     qa/pull-tester/rpc-tests.py -extended
44 By default, tests will be run in parallel. To specify how many jobs to run,
45 append `-parallel=n` (default n=4).
47 If you want to create a basic coverage report for the rpc test suite, append `--coverage`.
49 Possible options, which apply to each individual test run:
51 ```
52   -h, --help            show this help message and exit
53   --nocleanup           Leave bitcoinds and test.* datadir on exit or error
54   --noshutdown          Don't stop bitcoinds after the test execution
55   --srcdir=SRCDIR       Source directory containing bitcoind/bitcoin-cli
56                         (default: ../../src)
57   --tmpdir=TMPDIR       Root directory for datadirs
58   --tracerpc            Print out all RPC calls as they are made
59   --coveragedir=COVERAGEDIR
60                         Write tested RPC commands into this directory
61 ```
63 If you set the environment variable `PYTHON_DEBUG=1` you will get some debug
64 output (example: `PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.py wallet`).
66 A 200-block -regtest blockchain and wallets for four nodes
67 is created the first time a regression test is run and
68 is stored in the cache/ directory. Each node has 25 mature
69 blocks (25*50=1250 BTC) in its wallet.
71 After the first run, the cache/ blockchain and wallets are
72 copied into a temporary directory and used as the initial
73 test state.
75 If you get into a bad state, you should be able
76 to recover with:
78 ```bash
79 rm -rf cache
80 killall bitcoind
81 ```
83 Writing tests
84 =============
85 You are encouraged to write tests for new or existing features.
86 Further information about the test framework and individual rpc
87 tests is found in [qa/rpc-tests](/qa/rpc-tests).