summaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-11-30 17:22:49 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2023-12-06 23:54:42 +0200
commit254abb999fae0e29a20200472f016f2cd7236aef (patch)
tree71f4a39d156ea6646034f1112fc8c8ea0c67d130 /mesonbuild/scripts
parent7148b4f207bd7a09d9191abe7ffee8d7996c4634 (diff)
downloadmeson-254abb999fae0e29a20200472f016f2cd7236aef.tar.gz
Fix coverage with lcov 2.0 and uncovered subprojects
Version 2.0 of lcov triggers an error when an exclude pattern is unused. This can happen when the project has subprojects, but no code in them ends up covered: lcov: ERROR: 'exclude' pattern '/[...]/subprojects/*' is unused. (use "lcov --ignore-errors unused ..." to bypass this error) So, simply do as it says. Unused patterns doesn't seem problematic (or even interesting) here, so I don't think there's any risk in simply turning this off, which matches what happened with earlier versions of lcov anyway.
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r--mesonbuild/scripts/coverage.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/mesonbuild/scripts/coverage.py b/mesonbuild/scripts/coverage.py
index 4c0f81e8a..54b00cbc4 100644
--- a/mesonbuild/scripts/coverage.py
+++ b/mesonbuild/scripts/coverage.py
@@ -145,6 +145,7 @@ def coverage(outputs: T.List[str], source_root: str, subproject_root: str, build
'--remove', covinfo,
*lcov_subpoject_exclude,
*lcov_exe_rc_branch_coverage,
+ '--ignore-errors', 'unused',
'--output-file', covinfo] + lcov_config)
subprocess.check_call([genhtml_exe,
'--prefix', build_root,