diff options
Diffstat (limited to 'hadrian/doc/testsuite.md')
-rw-r--r-- | hadrian/doc/testsuite.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/hadrian/doc/testsuite.md b/hadrian/doc/testsuite.md index f1164ff39e..a905e8b3bb 100644 --- a/hadrian/doc/testsuite.md +++ b/hadrian/doc/testsuite.md @@ -19,6 +19,8 @@ needed by the tests. ## Running only a subset of the testsuite +### Specific tests + You can use the `TEST` environment variable, like with the Make build system, or the `--only=...` command line argument. This is best illustrated with examples: @@ -40,6 +42,35 @@ TEST="test1 test2" build test TEST="test1 test2" build test --only="test3 test4" ``` +### Whole directories of tests + +You can also ask Hadrian to run all the tests that live under one or +more directories, under which the testsuite driver will be looking for +`.T` files (usually called `all.T`), where our tests are declared. + +By default, the `test` rule tries to run all the tests available (the ones +under `testsuite/tests/` as well as all the tests of the boot libraries +or programs (`base`, `haddock`, etc). + +To restrict the testsuite driver to only run a specific directory of tests, +e.g `testsuite/tests/th`, you can simply do: + +``` sh +$ build -j test --test-root-dirs=testsuite/tests/th +``` + +If you want to run several directories of tests, you can either +use several `--test-root-dirs` arguments or just one but separating +the various directories with `:`: + +``` sh +# first approach +build -j test --test-root-dirs=testsuite/tests/th --test-root-dirs=testsuite/tests/gadt + +# second approach +build -j test --test-root-dirs=testsuite/tests/th:testsuite/tests/gadt +``` + ## Accepting new output You can use the `-a` or `--test-accept` flag to "accept" the new |