aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Unit-tests.md
diff options
context:
space:
mode:
authorMichael Hirsch, Ph.D <scivision@users.noreply.github.com>2019-07-18 10:39:00 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2019-07-30 19:08:48 +0300
commit148a3a83a647a21cc102cb01d82cbeeb0940adc8 (patch)
treec646d7eb96fbef15899e1b7b82d972e03f4aa0e9 /docs/markdown/Unit-tests.md
parent84030abd319be051ce7d9ed7488eee9535d4a3cc (diff)
downloadmeson-148a3a83a647a21cc102cb01d82cbeeb0940adc8.zip
meson-148a3a83a647a21cc102cb01d82cbeeb0940adc8.tar.gz
meson-148a3a83a647a21cc102cb01d82cbeeb0940adc8.tar.bz2
DOC: meson test multiple --suite specifications [skip ci]
docs:wrap < 80 col
Diffstat (limited to 'docs/markdown/Unit-tests.md')
-rw-r--r--docs/markdown/Unit-tests.md35
1 files changed, 32 insertions, 3 deletions
diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md
index 694c190..3c27732 100644
--- a/docs/markdown/Unit-tests.md
+++ b/docs/markdown/Unit-tests.md
@@ -71,10 +71,23 @@ The simplest thing to do is just to run all tests, which is equivalent to runnin
$ meson test
```
-You can also run only a single test by giving its name:
+### Run subsets of tests
+
+For clarity, consider the meson.build containing:
+
+```meson
+
+test('A', ..., suite: 'foo')
+test('B', ..., suite: 'foo')
+test('C', ..., suite: 'bar')
+test('D', ..., suite: 'baz')
+
+```
+
+Specify test(s) by name like:
```console
-$ meson test testname
+$ meson test A D
```
Tests belonging to a suite `suite` can be run as follows
@@ -85,6 +98,18 @@ $ meson test --suite (sub)project_name:suite
Since version *0.46*, `(sub)project_name` can be omitted if it is the top-level project.
+Multiple suites are specified like:
+
+```console
+$ meson test --suite foo --suite bar
+```
+
+NOTE: If you choose to specify both suite(s) and specific test name(s), the
+test name(s) must be contained in the suite(s). This however is redundant--
+it would be more useful to specify either specific test names or suite(s).
+
+### Other test options
+
Sometimes you need to run the tests multiple times, which is done like this:
```console
@@ -127,4 +152,8 @@ Meson will report the output produced by the failing tests along with other usef
For further information see the command line help of Meson by running `meson test -h`.
-**NOTE:** If `meson test` does not work for you, you likely have a old version of Meson. In that case you should call `mesontest` instead. If `mesontest` doesn't work either you have a very old version prior to 0.37.0 and should upgrade.
+## Legacy notes
+
+If `meson test` does not work for you, you likely have a old version of Meson.
+In that case you should call `mesontest` instead. If `mesontest` doesn't work
+either you have a very old version prior to 0.37.0 and should upgrade.