aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts
diff options
context:
space:
mode:
authorMohammed Sadiq <sadiq@sadiqpk.org>2018-10-08 09:58:48 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2018-10-09 22:43:27 +0300
commit25fef3d1facecfb64108ef0a1439d24100593935 (patch)
tree033136b5b9b8f169b8b37f4cfab2eeba8e9e9431 /mesonbuild/scripts
parentbb9f60624b27041805ca87a48f9a4196afb84ccc (diff)
downloadmeson-25fef3d1facecfb64108ef0a1439d24100593935.zip
meson-25fef3d1facecfb64108ef0a1439d24100593935.tar.gz
meson-25fef3d1facecfb64108ef0a1439d24100593935.tar.bz2
coverage: fix lcov branch coverage generation
lcov branch coverage are disabled by default. So branch coverage has to be enabled for every stage to make them work. Fixes https://github.com/mesonbuild/meson/issues/4319
Diffstat (limited to 'mesonbuild/scripts')
-rw-r--r--mesonbuild/scripts/coverage.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/mesonbuild/scripts/coverage.py b/mesonbuild/scripts/coverage.py
index 916c84f..0509eff 100644
--- a/mesonbuild/scripts/coverage.py
+++ b/mesonbuild/scripts/coverage.py
@@ -77,16 +77,19 @@ def coverage(outputs, source_root, subproject_root, build_root, log_dir):
subprocess.check_call([lcov_exe,
'-a', initial_tracefile,
'-a', run_tracefile,
+ '--rc', 'lcov_branch_coverage=1',
'-o', raw_tracefile])
# Remove all directories outside the source_root from the covinfo
subprocess.check_call([lcov_exe,
'--extract', raw_tracefile,
os.path.join(source_root, '*'),
+ '--rc', 'lcov_branch_coverage=1',
'--output-file', covinfo])
# Remove all directories inside subproject dir
subprocess.check_call([lcov_exe,
'--remove', covinfo,
os.path.join(subproject_root, '*'),
+ '--rc', 'lcov_branch_coverage=1',
'--output-file', covinfo])
subprocess.check_call([genhtml_exe,
'--prefix', build_root,