diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2022-02-02 20:25:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 20:25:55 +0200 |
commit | 9a1a5c2b74627d8d0476def0ae11848308994b5f (patch) | |
tree | 280f7f1169c227ec001e19e6963afece7c6b5b4f /docs | |
parent | 6383eb227992a3ae77182a990b9b5ce2175846f2 (diff) | |
parent | 7a975d75cf57b0a0de3f12b9d8727394c70839d4 (diff) | |
download | meson-9a1a5c2b74627d8d0476def0ae11848308994b5f.zip meson-9a1a5c2b74627d8d0476def0ae11848308994b5f.tar.gz meson-9a1a5c2b74627d8d0476def0ae11848308994b5f.tar.bz2 |
Merge pull request #9834 from bonzini/test-verbose-kwarg
New keyword argument `verbose` for tests and benchmarks
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/snippets/test-verbose.md | 6 | ||||
-rw-r--r-- | docs/yaml/functions/benchmark.yaml | 8 | ||||
-rw-r--r-- | docs/yaml/functions/test.yaml | 7 |
3 files changed, 21 insertions, 0 deletions
diff --git a/docs/markdown/snippets/test-verbose.md b/docs/markdown/snippets/test-verbose.md new file mode 100644 index 0000000..6d9aa0f --- /dev/null +++ b/docs/markdown/snippets/test-verbose.md @@ -0,0 +1,6 @@ +## New keyword argument `verbose` for tests and benchmarks + +The new keyword argument `verbose` can be used to mark tests and benchmarks +that must always be logged verbosely on the console. This is particularly +useful for long-running tests, or when a single Meson test() is wrapping +an external test harness. diff --git a/docs/yaml/functions/benchmark.yaml b/docs/yaml/functions/benchmark.yaml index da465aa..3082fbe 100644 --- a/docs/yaml/functions/benchmark.yaml +++ b/docs/yaml/functions/benchmark.yaml @@ -104,3 +104,11 @@ kwargs: The starting order of tests with identical priorities is implementation-defined. The default priority is 0, negative numbers are permitted. + + verbose: + type: bool + since: 0.62.0 + default: false + description: | + if true, forces the test results to be logged as if `--verbose` was passed + to `meson test`. diff --git a/docs/yaml/functions/test.yaml b/docs/yaml/functions/test.yaml index 96a2b28..bc9ad03 100644 --- a/docs/yaml/functions/test.yaml +++ b/docs/yaml/functions/test.yaml @@ -33,6 +33,13 @@ description: | test(..., env: nomalloc, ...) ``` + In addition to running individual executables as test cases, `test()` + can also be used to invoke an external test harness. In this case, + it is best to use `verbose: true` *(since 0.62.0)* and, if supported + by the external harness, `protocol: 'tap'` *(since 0.50.0)*. This will + ensure that Meson logs each subtest as it runs, instead of including + the whole log at the end of the run. + Defined tests can be run in a backend-agnostic way by calling `meson test` inside the build dir, or by using backend-specific commands, such as `ninja test` or `msbuild RUN_TESTS.vcxproj`. |