Skip to content

Commit 9739572

Browse files
committed
doc: unit test runner documentation improvements
including hoisting the `test_bitcoin --help` sentence to the beginning of the section, where it is probably the most useful.
1 parent 03c48f9 commit 9739572

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

src/test/README.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,23 @@ the `src/qt/test/test_main.cpp` file.
3535

3636
### Running individual tests
3737

38-
`test_bitcoin` accepts the command line arguments from the boost framework.
39-
For example, to run just the `getarg_tests` suite of tests:
38+
The `test_bitcoin` command accepts command line arguments from the Boost framework.
39+
40+
Run `test_bitcoin --help` for the full list of arguments that can be passed.
41+
42+
For example, to run only the tests in the `getarg_tests` file, with full logging:
4043

4144
```bash
4245
build/src/test/test_bitcoin --log_level=all --run_test=getarg_tests
4346
```
4447

45-
`log_level` controls the verbosity of the test framework, which logs when a
46-
test case is entered, for example.
48+
or
49+
50+
```bash
51+
build/src/test/test_bitcoin -l all -t getarg_tests
52+
```
53+
54+
The `--log_level=` (or `-l`) argument controls the verbosity of the test output.
4755

4856
`test_bitcoin` also accepts some of the command line arguments accepted by
4957
`bitcoind`. Use `--` to separate these sets of arguments:
@@ -62,7 +70,7 @@ standard terminal output.
6270
build/src/test/test_bitcoin --run_test=getarg_tests/doubledash
6371
```
6472

65-
`test_bitcoin` creates a temporary working (data) directory with a randomly
73+
Running `test_bitcoin` creates a temporary working (data) directory with a randomly
6674
generated pathname within `test_common bitcoin/`, which in turn is within
6775
the system's temporary directory (see
6876
[`temp_directory_path`](https://en.cppreference.com/w/cpp/filesystem/temp_directory_path)).
@@ -97,8 +105,6 @@ If you run an entire test suite, such as `--run_test=getarg_tests`, or all the t
97105
(by not specifying `--run_test`), a separate directory
98106
will be created for each individual test.
99107

100-
Run `test_bitcoin --help` for the full list of arguments that can be passed.
101-
102108
### Adding test cases
103109

104110
To add a new unit test file to our test suite, you need

0 commit comments

Comments
 (0)