mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-03-23 09:40:36 +01:00
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>
29 lines
722 B
Meson
29 lines
722 B
Meson
prog_gcovr = find_program('gcovr', required: false, disabler: true)
|
|
|
|
# Configure the build:
|
|
# $ meson configure -Db_sanitize=none -Db_coverage=true -Dwerror=true
|
|
#
|
|
# Ensure there are no stale .gcno or .gcda files around:
|
|
# $ meson setup --wipe ~/git/weston
|
|
#
|
|
# Run the test suite:
|
|
# $ meson compile
|
|
# $ meson test
|
|
#
|
|
# Generate the reports:
|
|
# $ meson compile gcovr-report
|
|
|
|
run_target(
|
|
'gcovr-report',
|
|
command: [
|
|
prog_gcovr,
|
|
'--root', '@SOURCE_ROOT@',
|
|
'--cobertura', meson.current_build_dir() / 'cobertura.xml',
|
|
'--html', meson.current_build_dir() / 'index.html',
|
|
'--html-nested',
|
|
'--html-theme', 'github.green',
|
|
'--html-title', 'Weston test suite coverage',
|
|
'--print-summary',
|
|
meson.build_root(),
|
|
],
|
|
)
|