diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Commands.md | 6 | ||||
-rw-r--r-- | docs/markdown/Unit-tests.md | 21 | ||||
-rw-r--r-- | docs/markdown/snippets/test_name_filters.md | 9 |
3 files changed, 36 insertions, 0 deletions
diff --git a/docs/markdown/Commands.md b/docs/markdown/Commands.md index 52eb76c..75b2281 100644 --- a/docs/markdown/Commands.md +++ b/docs/markdown/Commands.md @@ -281,6 +281,12 @@ Run tests for the configure Meson project. See [the unit test documentation](Unit-tests.md) for more info. +Since *1.2.0* you can use wildcards in *args* for test names. +For example, "bas*" will match all test with names beginning with "bas". + +Since *1.2.0* it is an error to provide a test name or wildcard that +does not match any test. + #### Examples: Run tests for the project: diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md index 36fbdcf..18ab111 100644 --- a/docs/markdown/Unit-tests.md +++ b/docs/markdown/Unit-tests.md @@ -153,6 +153,27 @@ Specify test(s) by name like: $ meson test A D ``` +You can run tests from specific (sub)project: + +```console +$ meson test (sub)project_name: +``` + +or a specific test in a specific project: + +```console +$ meson test (sub)project_name:test_name +``` + +Since version *1.2.0*, you can use wildcards in project +and test names. For instance, to run all tests beginning with +"foo" and all tests from projects beginning with "bar": + +```console +$ meson test "foo*" "bar*:" +``` + + Tests belonging to a suite `suite` can be run as follows ```console diff --git a/docs/markdown/snippets/test_name_filters.md b/docs/markdown/snippets/test_name_filters.md new file mode 100644 index 0000000..14e62a9 --- /dev/null +++ b/docs/markdown/snippets/test_name_filters.md @@ -0,0 +1,9 @@ +## Wildcards in list of tests to run + +The `meson test` command now accepts wildcards in the list of test names. +For example `meson test basic*` will run all tests whose name begins +with "basic". + +meson will report an error if the given test name does not match any +existing test. meson will log a warning if two redundant test names +are given (for example if you give both "proj:basic" and "proj:"). |