Merge branch 'g-clear-pointer-no-side-effects' into 'master'
[glib.git] / .gitlab-ci / coverage-docker.sh
blob63e3051477b383dc06a97f1dafc8156b856cc534
1 #!/bin/bash
3 set -e
5 # Fixup Windows paths
6 python3 ./.gitlab-ci/fixup-cov-paths.py _coverage/*.lcov
8 for path in _coverage/*.lcov; do
9 # Remove coverage from generated code in the build directory
10 lcov --rc lcov_branch_coverage=1 -r "${path}" '*/_build/*' -o "$(pwd)/${path}"
11 # Remove any coverage from system files
12 lcov --rc lcov_branch_coverage=1 -e "${path}" "$(pwd)/*" -o "$(pwd)/${path}"
13 done
15 genhtml \
16 --ignore-errors=source \
17 --rc lcov_branch_coverage=1 \
18 _coverage/*.lcov \
19 -o _coverage/coverage
21 cd _coverage
22 rm -f *.lcov
24 cat >index.html <<EOL
25 <html>
26 <body>
27 <ul>
28 <li><a href="coverage/index.html">Coverage</a></li>
29 </ul>
30 </body>
31 </html>
32 EOL