diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2019-02-27 07:25:33 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-03-02 09:07:54 +0100 |
commit | 91f847d308b57adec89245308b60ae063026b456 (patch) | |
tree | c81abbf9cc46c75322f5838cea7ed1492733c8ad /docs/markdown/Unit-tests.md | |
parent | f2e513791e56886a145a8e72854841b9f9122ca6 (diff) | |
download | meson-91f847d308b57adec89245308b60ae063026b456.zip meson-91f847d308b57adec89245308b60ae063026b456.tar.gz meson-91f847d308b57adec89245308b60ae063026b456.tar.bz2 |
mtest: implement TAP parsing
This provides an initial support for parsing TAP output. It detects failures
and skipped tests without relying on exit code, as well as early termination
of the test due to an error or a crash.
For now, subtests are not recorded in the TestRun object. However, because the
TAP output goes on stdout, it is printed by --print-errorlogs when a test does
not behave as expected. Handling subtests as TestRuns, and serializing them
to JSON, can be added later.
The parser was written specifically for Meson, and comes with its own
test suite.
Fixes #2923.
Diffstat (limited to 'docs/markdown/Unit-tests.md')
-rw-r--r-- | docs/markdown/Unit-tests.md | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md index 9148bd5..9e61739 100644 --- a/docs/markdown/Unit-tests.md +++ b/docs/markdown/Unit-tests.md @@ -53,7 +53,11 @@ $ MESON_TESTTHREADS=5 ninja test ## Skipped tests and hard errors -Sometimes a test can only determine at runtime that it can not be run. The GNU standard approach in this case is to exit the program with error code 77. Meson will detect this and report these tests as skipped rather than failed. This behavior was added in version 0.37.0. +Sometimes a test can only determine at runtime that it can not be run. + +For the default `exitcode` testing protocol, the GNU standard approach in this case is to exit the program with error code 77. Meson will detect this and report these tests as skipped rather than failed. This behavior was added in version 0.37.0. + +For TAP-based tests, skipped tests should print a single line starting with `1..0 # SKIP`. In addition, sometimes a test fails set up so that it should fail even if it is marked as an expected failure. The GNU standard approach in this case is to exit the program with error code 99. Again, Meson will detect this and report these tests as `ERROR`, ignoring the setting of `should_fail`. This behavior was added in version 0.50.0. |