Commit graph

3 commits

Author SHA1 Message Date
Pekka Paalanen
5fa20c75ca coverage: exclude assert branches
Assertions have two branches, and the fail branch must never be taken,
so it does not make sense to count them in branch coverage. Ignore all
branches on lines matching weston_assert_ regular expression.

The RE must match from the beginning of the line, hence allow leading
whitespace. This is a Python 're' module usage thing. Unfortunately it
is impossible to pass a backslash in a meson.build file as an argument
to a command[1], so let's use a configuration file.

[1]: https://github.com/mesonbuild/meson/issues/1564

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-06-10 14:11:27 +00:00
Marius Vlad
01078b890a coverage: Fix meson deprecated function arg
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2026-04-02 15:01:36 +03:00
Pekka Paalanen
a2f6eb4fe2 build: add manual gcovr coverage report
Meson's 'coverage-html' target defaults to using the Perl script LCOV.
LCOV has problems with newer GCCs like 14 in Debian Trixie, leading to
many consistency errors about function end lines. Gcovr OTOH runs just
fine.

Create a new target

  $ meson compile gcovr-report

that creates a coverage report in HTML and Cobertura using gcovr.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2026-03-13 15:25:31 +02:00