diff options
author | Alp Mestanogullari <alpmestan@gmail.com> | 2019-05-14 18:16:52 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-05-22 16:52:22 -0400 |
commit | 2c15b85eb2541a64df0cdf3705fb9aa068634004 (patch) | |
tree | b3d784084788fc29cc09f4115c9048bc00f44640 /hadrian/doc | |
parent | ecc9366a0e0db107c286935130837b2222e2dd82 (diff) | |
download | haskell-2c15b85eb2541a64df0cdf3705fb9aa068634004.tar.gz |
Hadrian: add --test-root-dirs, to only run specific directories of tests
We can specify several of those, by using the flag multiple times or
just once but combining the directories with ':'.
Along the way, this patch also fixes the testsuite-related --only flag,
so that we can use it many times instead of being force to specify a
space-separated list of test in a single --only flag.
Diffstat (limited to 'hadrian/doc')
-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 |