aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/coverage.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/scripts/coverage.py')
-rw-r--r--mesonbuild/scripts/coverage.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/scripts/coverage.py b/mesonbuild/scripts/coverage.py
index 4746134..564286a 100644
--- a/mesonbuild/scripts/coverage.py
+++ b/mesonbuild/scripts/coverage.py
@@ -70,13 +70,21 @@ def coverage(source_root, build_root, log_dir):
'--show-details',
'--branch-coverage',
covinfo])
+ elif gcovr_exe and gcovr_3_1:
+ htmloutdir = os.path.join(log_dir, 'coveragereport')
+ subprocess.check_call([gcovr_exe,
+ '--html',
+ '--html-details',
+ '-r', build_root,
+ '-o', os.path.join(htmloutdir, 'index.html'),
+ ])
if gcovr_exe:
print('')
print('XML coverage report can be found at',
pathlib.Path(log_dir, 'coverage.xml').as_uri())
print('Text coverage report can be found at',
pathlib.Path(log_dir, 'coverage.txt').as_uri())
- if lcov_exe and genhtml_exe:
+ if (lcov_exe and genhtml_exe) or (gcovr_exe and gcovr_3_1):
print('Html coverage report can be found at',
pathlib.Path(htmloutdir, 'index.html').as_uri())
return 0