diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-07-22 15:19:23 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-08-02 11:26:58 +1000 |
commit | eb8e1d4a137c538488c405153146f9b9ace50e51 (patch) | |
tree | c76ae068856b23cfeaa34b28f26bbf77865c8873 /doc | |
parent | 1d5c1fedb45a50fcff7b05bba7da35c5735d9fd1 (diff) |
test: add a make-like job control to run tests in parallel
Add a make-like -j/--jobs option to split the number of parallel test
processes. Defaults to 8 if not specified, future patches will default this to
1 for special cases where filters are specified or gdb is detected.
Each subprocess overwrites argv[0] to be easier identifiable in the ps
output when we're trying to figure out which tests are still running.
A -j1 is equivalent to the previous functionality, i.e. we don't fork.
One quirk needed for check: any test case not part of a test runner will not
be freed and thus triggers valgrind. We do test filtering by splitting
up the tests across multiple forks (i.e. each process has several tests that
are in the list but not added to the runner). Thus we need to mark those we
expect check to free as used.
Then on cleanup we traverse the test list, add all the unused one to a
test runner and free that test runner (without actually running it). This
cleans up both the filtered tests in each subprocess and the whole test list
in the parent process which doesn't run a test itself.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/test-suite.dox | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/test-suite.dox b/doc/test-suite.dox index 104e2a9..67d1805 100644 --- a/doc/test-suite.dox +++ b/doc/test-suite.dox @@ -7,6 +7,12 @@ during `make check`. Check itself is wrapped into a libinput-specific test suite called *litest*. Tests are found in `$srcdir/test/`, the main test suite is `libinput-test-suite-runner`. +The test suite has a make-like job control enabled by the `-j` or `--jobs` +flag and will fork off as many parallel processes as given by this flag. The +default if unspecified is 8. When debugging a specific test case failure it +is recommended to employ test filtures (see @ref test-filtering) and disable +parallel tests. + @section test-config X.Org config to avoid interference uinput devices created by the test suite are usually recognised by X as |