From fc661c35a20a7cc85f76e5e0c502700f42e27cf2 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sat, 15 Jan 2022 23:36:42 +0100 Subject: interpreter: support for forcibly verbose logging of some tests Add a new keyword argument to test() and benchmark(), completing the implementation of the feature. Signed-off-by: Paolo Bonzini --- docs/yaml/functions/benchmark.yaml | 8 ++++++++ docs/yaml/functions/test.yaml | 7 +++++++ 2 files changed, 15 insertions(+) (limited to 'docs/yaml/functions') 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`. -- cgit v1.1