Skip to content

Commit 8640631

Browse files
Mason Simonfanquake
authored andcommitted
docs: Document lint tests
1 parent 544f323 commit 8640631

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

test/README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ utilities in their entirety. It does not contain unit tests, which
33
can be found in [/src/test](/src/test), [/src/wallet/test](/src/wallet/test),
44
etc.
55

6-
There are currently two sets of tests in this directory:
6+
This directory contains the following sets of tests:
77

88
- [functional](/test/functional) which test the functionality of
99
bitcoind and bitcoin-qt by interacting with them through the RPC and P2P
1010
interfaces.
1111
- [util](/test/util) which tests the bitcoin utilities, currently only
1212
bitcoin-tx.
13+
- [lint](/test/lint/) which perform various static analysis checks.
1314

1415
The util tests are run as part of `make check` target. The functional
15-
tests are run by the travis continuous build process whenever a pull
16-
request is opened. Both sets of tests can also be run locally.
16+
tests and lint scripts are run by the travis continuous build process whenever a pull
17+
request is opened. All sets of tests can also be run locally.
1718

1819
# Running tests locally
1920

@@ -30,7 +31,7 @@ The ZMQ functional test requires a python ZMQ library. To install it:
3031

3132
#### Running the tests
3233

33-
Individual tests can be run by directly calling the test script, eg:
34+
Individual tests can be run by directly calling the test script, e.g.:
3435

3536
```
3637
test/functional/feature_rbf.py
@@ -180,6 +181,26 @@ Note: gdb attach step may require `sudo`
180181
Util tests can be run locally by running `test/util/bitcoin-util-test.py`.
181182
Use the `-v` option for verbose output.
182183

184+
### Lint tests
185+
186+
#### Dependencies
187+
188+
The lint tests require codespell and flake8. To install: `pip3 install codespell flake8`.
189+
190+
#### Running the tests
191+
192+
Individual tests can be run by directly calling the test script, e.g.:
193+
194+
```
195+
test/lint/lint-filenames.sh
196+
```
197+
198+
You can run all the shell-based lint tests by running:
199+
200+
```
201+
test/lint/lint-all.sh
202+
```
203+
183204
# Writing functional tests
184205

185206
You are encouraged to write functional tests for new or existing features.

0 commit comments

Comments
 (0)