mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 07:26:15 +01:00
961be2b0bf
Use lcov for both Fedora and MSYS2 to create coverage reports and add a second ci stage which merges the coverage and creates a html report using genhtml. In the final stage, which is only run on master, the result is published on gitlab pages. https://bugzilla.gnome.org/show_bug.cgi?id=795636
31 lines
553 B
Bash
Executable File
31 lines
553 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
# Fixup Windows paths
|
|
python3 ./.gitlab-ci/fixup-cov-paths.py _coverage/*.lcov
|
|
|
|
# Remove coverage from generated code in the build directory
|
|
for path in _coverage/*.lcov; do
|
|
lcov --rc lcov_branch_coverage=1 -r "${path}" '*/_build/*' -o "$(pwd)/${path}"
|
|
done
|
|
|
|
genhtml \
|
|
--ignore-errors=source \
|
|
--rc lcov_branch_coverage=1 \
|
|
_coverage/*.lcov \
|
|
-o _coverage/coverage
|
|
|
|
cd _coverage
|
|
rm -f *.lcov
|
|
|
|
cat >index.html <<EOL
|
|
<html>
|
|
<body>
|
|
<ul>
|
|
<li><a href="coverage/index.html">Coverage</a></li>
|
|
</ul>
|
|
</body>
|
|
</html>
|
|
EOL
|