Skip to content

Commit 0b0fc17

Browse files
committed
Merge pull request #7028
e16ee1c [qa] Extend README.md (MarcoFalke) cc97574 [qa] Split README.md to /qa and /qa/rpc-tests (MarcoFalke)
2 parents 9cdd407 + e16ee1c commit 0b0fc17

File tree

3 files changed

+60
-45
lines changed

3 files changed

+60
-45
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ lots of money.
4949
### Automated Testing
5050

5151
Developers are strongly encouraged to write unit tests for new code, and to
52-
submit new unit tests for old code. Unit tests can be compiled and run (assuming they weren't disabled in configure) with: `make check`
52+
submit new unit tests for old code. Unit tests can be compiled and run
53+
(assuming they weren't disabled in configure) with: `make check`
5354

54-
There are also regression and integration tests of the RPC interface, written
55+
There are also [regression and integration tests](/qa) of the RPC interface, written
5556
in Python, that are run automatically on the build server.
5657
These tests can be run with: `qa/pull-tester/rpc-tests.py`
5758

qa/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
The [pull-tester](/qa/pull-tester/) folder contains a script to call
2+
multiple tests from the [rpc-tests](/qa/rpc-tests/) folder.
3+
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.
7+
8+
Running tests
9+
=============
10+
11+
You can run any single test by calling `qa/pull-tester/rpc-tests.py <testname>`.
12+
13+
Or you can run any combination of tests by calling `qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...`
14+
15+
Run the regression test suite with `qa/pull-tester/rpc-tests.py`
16+
17+
Run all possible tests with `qa/pull-tester/rpc-tests.py -extended`
18+
19+
Possible options:
20+
21+
```
22+
-h, --help show this help message and exit
23+
--nocleanup Leave bitcoinds and test.* datadir on exit or error
24+
--noshutdown Don't stop bitcoinds after the test execution
25+
--srcdir=SRCDIR Source directory containing bitcoind/bitcoin-cli
26+
(default: ../../src)
27+
--tmpdir=TMPDIR Root directory for datadirs
28+
--tracerpc Print out all RPC calls as they are made
29+
--coveragedir=COVERAGEDIR
30+
Write tested RPC commands into this directory
31+
```
32+
33+
If you set the environment variable `PYTHON_DEBUG=1` you will get some debug
34+
output (example: `PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.py wallet`).
35+
36+
A 200-block -regtest blockchain and wallets for four nodes
37+
is created the first time a regression test is run and
38+
is stored in the cache/ directory. Each node has 25 mature
39+
blocks (25*50=1250 BTC) in its wallet.
40+
41+
After the first run, the cache/ blockchain and wallets are
42+
copied into a temporary directory and used as the initial
43+
test state.
44+
45+
If you get into a bad state, you should be able
46+
to recover with:
47+
48+
```bash
49+
rm -rf cache
50+
killall bitcoind
51+
```
52+
53+
Writing tests
54+
=============
55+
You are encouraged to write tests for new or existing features.
56+
Further information about the test framework and individual rpc
57+
tests is found in [qa/rpc-tests](/qa/rpc-tests).

qa/rpc-tests/README.md

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -33,49 +33,6 @@ Helpers for script.py
3333
### [test_framework/blocktools.py](test_framework/blocktools.py)
3434
Helper functions for creating blocks and transactions.
3535

36-
37-
Notes
38-
=====
39-
40-
You can run any single test by calling `qa/pull-tester/rpc-tests.py <testname>`.
41-
42-
Or you can run any combination of tests by calling `qa/pull-tester/rpc-tests.py <testname1> <testname2> <testname3> ...`
43-
44-
Run the regression test suite with `qa/pull-tester/rpc-tests.py`
45-
46-
Run all possible tests with `qa/pull-tester/rpc-tests.py -extended`
47-
48-
Possible options:
49-
50-
```
51-
-h, --help show this help message and exit
52-
--nocleanup Leave bitcoinds and test.* datadir on exit or error
53-
--noshutdown Don't stop bitcoinds after the test execution
54-
--srcdir=SRCDIR Source directory containing bitcoind/bitcoin-cli (default:
55-
../../src)
56-
--tmpdir=TMPDIR Root directory for datadirs
57-
--tracerpc Print out all RPC calls as they are made
58-
```
59-
60-
If you set the environment variable `PYTHON_DEBUG=1` you will get some debug output (example: `PYTHON_DEBUG=1 qa/pull-tester/rpc-tests.py wallet`).
61-
62-
A 200-block -regtest blockchain and wallets for four nodes
63-
is created the first time a regression test is run and
64-
is stored in the cache/ directory. Each node has 25 mature
65-
blocks (25*50=1250 BTC) in its wallet.
66-
67-
After the first run, the cache/ blockchain and wallets are
68-
copied into a temporary directory and used as the initial
69-
test state.
70-
71-
If you get into a bad state, you should be able
72-
to recover with:
73-
74-
```bash
75-
rm -rf cache
76-
killall bitcoind
77-
```
78-
7936
P2P test design notes
8037
---------------------
8138

0 commit comments

Comments
 (0)