Skip to content

Generate combined code coverage reports for C and Python

Description

Measure C code coverage with gcc and Python coverage with coverage.py in a single test run.

Output a Cobertura XML reports from the C coverage measurement using gcovr, and from Python using coverage.py. Then, merge into a single XML file, and generate an HTML report using pycobertura.

GitLab has built-in support for viewing Cobertura code coverage measurements in merge requests, so we expose the merged XML file to GitLab using artifacts:reports:cobertura:.

Based on the GitLab CI script for https://git.ligo.org/lscsoft/ligo.skymap.

API Changes and Justification

Backwards Compatible Changes

  • This change introduces no API changes
  • This change adds new API calls

Backwards Incompatible Changes

  • This change modifies an existing API
  • This change removes an existing API

If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.

Review Status

@adam-mercer, @duncanmmacleod

Edited by LALSuite Bot

Merge request reports