Skip to content

Enable code coverage analysis and reporting

Diego Pino requested to merge dpino/libsoup:test-coverage into master

Based on https://gitlab.gnome.org/sdroege/glib/-/blob/master/.gitlab-ci.yml. Perhaps some scripts are not necessary (for instance, .gitlab-ci/fixup-cov-paths.py).

To test it I manually run the steps in the "build" stage and after that I run the steps in the "coverage" stage. The result of running .gitlab-ci/coverage-docker.sh printed out the following output:

...
Processing file tests/xmlrpc-old-test.c
Processing file tests/samesite-test.c
Processing file tests/header-parsing-test.c
Processing file tests/session-test.c
Writing directory view page.
Overall coverage rate:
  lines......: 0.0% (0 of 31685 lines)
  functions..: 0.0% (0 of 2821 functions)
  branches...: 0.0% (0 of 14561 branches)

I expected that the lines of code coverage would be something higher than 0%. I add a screenshot of lcov main page.

lcov

Edited by Diego Pino

Merge request reports