Add option to run tests with Valgrind memcheck
[tig.git] / test / README.adoc
blobb4ae35eab958041818e535e0707861cf5f5c582f
1 Test Overview
2 =============
4 All tests can be run with `make test`. This will run all scripts that
5 end with `-test` in the `test` folder and summarize the test results
6 using the script `test/tools/show-results.sh`.
8 To run individual tests, use `make <path-to-test>` e.g. `make
9 test/tigrc/parse-test`. Alternatively, tests can be run directly via the
10 test scripts as long as `PATH` is set to include the directories `src/`
11 and `test/tools`. The latter directory is where the test helper
12 libraries are located, the most important of which is `libtest.sh`.
14 Options
15 -------
17 Tests can be configured by setting the `TEST_OPTS` environment variable.
18 The variable should contain a space-separated list of options. The
19 following options are supported:
21 verbose::
23         Whether to print individual test results even when all
24         assertions passed. The default is to not results for passed
25         tests.
27 no-indent::
29         Do not indent test output. This is automatically set depending
30         on whether `V=1` was passed to `make` to show verbose output.
32 debugger[=<program]::
34         Invoke tig via a debugger, for example `debugger=lldb`. When no
35         program is specified it is auto-detected. Remember to recompile
36         using `make clean all-debug` to expose all symbols.
38 trace::
40         Show trace information.
42 valgrind::
44         Run tests and verify memory access with Valgrind.