Skip to content

Commit 6c37d81

Browse files
Merge pull request #11584 from Mic92/devdocs
2 parents 322d2c7 + eb3a368 commit 6c37d81

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/manual/src/development/testing.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ ninja: no work to do.
162162
Individual tests can be run with `meson`:
163163

164164
```shell-session
165-
$ meson test ${testName}
165+
$ meson test --verbose ${testName}
166166
ninja: Entering directory `/home/jcericson/src/nix/master/build'
167167
ninja: no work to do.
168168
1/1 nix-functional-tests:main / ${testName} OK 0.41s
@@ -177,7 +177,11 @@ Timeout: 0
177177
Full log written to /home/jcericson/src/nix/master/build/meson-logs/testlog.txt
178178
```
179179

180-
or without `meson`, showing the output:
180+
The `--verbose` flag will make Meson also show the console output of each test for easier debugging.
181+
The test script will then be traced with `set -x` and the output displayed as it happens,
182+
regardless of whether the test succeeds or fails.
183+
184+
Tests can be also run directly without `meson`:
181185

182186
```shell-session
183187
$ TEST_NAME=${testName} NIX_REMOTE='' PS4='+(${BASH_SOURCE[0]-$0}:$LINENO) tests/functional/${testName}.sh
@@ -188,8 +192,6 @@ output from bar
188192
...
189193
```
190194

191-
The test script will then be traced with `set -x` and the output displayed as it happens, regardless of whether the test succeeds or fails.
192-
193195
### Debugging failing functional tests
194196

195197
When a functional test fails, it usually does so somewhere in the middle of the script.

0 commit comments

Comments
 (0)