[Doc] Update OS X build notes for 10.11 SDK
[bitcoinplatinum.git] / qa / README.md
blob7489eb5130ac090658051ef17b98a7296a19293e
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 Running tests
20 =============
22 You can run any single test by calling
24     qa/pull-tester/rpc-tests.py <testname>
26 Or you can run any combination of tests by calling
28     qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...
30 Run the regression test suite with
32     qa/pull-tester/rpc-tests.py
34 Run all possible tests with
36     qa/pull-tester/rpc-tests.py -extended
38 By default, tests will be run in parallel if you want to specify how many
39 tests should be run in parallel, append `-paralell=n` (default n=4).
41 If you want to create a basic coverage report for the rpc test suite, append `--coverage`.
43 Possible options, which apply to each individual test run:
45 ```
46   -h, --help            show this help message and exit
47   --nocleanup           Leave bitcoinds and test.* datadir on exit or error
48   --noshutdown          Don't stop bitcoinds after the test execution
49   --srcdir=SRCDIR       Source directory containing bitcoind/bitcoin-cli
50                         (default: ../../src)
51   --tmpdir=TMPDIR       Root directory for datadirs
52   --tracerpc            Print out all RPC calls as they are made
53   --coveragedir=COVERAGEDIR
54                         Write tested RPC commands into this directory
55 ```
57 If you set the environment variable `PYTHON_DEBUG=1` you will get some debug
58 output (example: `PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.py wallet`).
60 A 200-block -regtest blockchain and wallets for four nodes
61 is created the first time a regression test is run and
62 is stored in the cache/ directory. Each node has 25 mature
63 blocks (25*50=1250 BTC) in its wallet.
65 After the first run, the cache/ blockchain and wallets are
66 copied into a temporary directory and used as the initial
67 test state.
69 If you get into a bad state, you should be able
70 to recover with:
72 ```bash
73 rm -rf cache
74 killall bitcoind
75 ```
77 Writing tests
78 =============
79 You are encouraged to write tests for new or existing features.
80 Further information about the test framework and individual rpc
81 tests is found in [qa/rpc-tests](/qa/rpc-tests).