mirror of
https://github.com/mesonbuild/meson.git
synced 2026-06-30 19:57:45 +00:00
mtest: support --exclude
Support `--exclude name` where `name` is a full test name, optionally including the subproject name. Wildcards are not currently supported. Accept both `name` for the main project and `subproject:name`. We want `name` for convenience so users don't have to write out their project name when no subprojects are involved. Extended matching could be added in future, but the primary usecase for this is where distributions want to skip known-buggy or irrelevant tests, rather than developers working on their own project. The test changes are a bit noisy because needed to add a test with the same name in the main project and a subproject to check that --exclude w/ an unqualified name only affected the main parent, but adding 2 new failing tests required all the numbers to be adjusted. Closes: https://github.com/mesonbuild/meson/pull/11502 Closes: https://github.com/mesonbuild/meson/issues/6999 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -216,6 +216,32 @@ into `n` slices and execute the `ith` such slice. This allows you to distribute
|
||||
a set of long-running tests across multiple machines to decrease the overall
|
||||
runtime of tests.
|
||||
|
||||
Since version *1.12.0*, you can pass `--exclude NAME` to skip processing
|
||||
of named tests:
|
||||
```console
|
||||
$ meson test --list
|
||||
m:basic
|
||||
m:buggy
|
||||
|
||||
$ meson test
|
||||
...
|
||||
1/2 m:basic OK 0.01s
|
||||
2/2 m:buggy FAIL 0.00s ...
|
||||
|
||||
Ok: 1
|
||||
Fail: 1
|
||||
|
||||
$ meson test --exclude buggy
|
||||
...
|
||||
1/1 m:basic OK 0.00s
|
||||
|
||||
Ok: 1
|
||||
Fail: 0
|
||||
```
|
||||
|
||||
For unqualified names (no subproject specified), `--exclude NAME` matches
|
||||
the main project.
|
||||
|
||||
### Other test options
|
||||
|
||||
Sometimes you need to run the tests multiple times, which is done like this:
|
||||
|
||||
6
docs/markdown/snippets/tests-exclude.md
Normal file
6
docs/markdown/snippets/tests-exclude.md
Normal file
@@ -0,0 +1,6 @@
|
||||
## `meson test` now accepts `--exclude`
|
||||
|
||||
`meson test` has a new `--exclude` argument to allow skipping named
|
||||
tests. It takes a full test name and can be specified repeatedly. This
|
||||
should help distributions that need to skip tests irrelevant for them
|
||||
or known to be buggy.
|
||||
Reference in New Issue
Block a user