Skip to content

Create and enable post-processing job for code coverage reporting #1211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

a-wai
Copy link
Contributor

@a-wai a-wai commented Jun 19, 2025

Add a new template for generating code coverage report, meant to be used as a post-processing job for kernels built with GCOV support.

This job will collect coverage data from every test job of a given kbuild node, report lines/functions coverage for each job, aggregate coverage data for all jobs and generate the following artifacts pertaining to the kbuild node itself:

  • single-page HTML report including lines/functions coverage data for each source file
  • LCOV-compatible tracefile for further processing (filtering, generating detailed HTML report...) by individual developers
  • child nodes with global lines/functions coverage for the aggregated data

Depends on kernelci/kernelci-core#2908 & kernelci/kernelci-core#2909

@a-wai a-wai requested review from nuclearcat and laura-nao June 19, 2025 15:35
a-wai added 2 commits June 19, 2025 18:39
This new template is meant to be executed as a post-processing job, once
every test job for a given `kbuild` node are complete. It gathers the
raw coverage data from each of those test jobs and processes it as
follows:
* create a single JSON tracefile using `gcovr`
* extract lines/functions coverage percentages for each job
* create `test` child nodes for each job, reporting those percentages
* merge all tracefiles in a single results file and generate both an
  HTML report and `lcov`-compatible tracefile; the HTML report gives a
  quick overview of the code coverage, while the tracefile can then be
  downloaded by developers for more targeted processing
* create `test` child nodes for the `kbuild` job, reporting global
  lines/functions coverage percentages for this run

Signed-off-by: Arnaud Ferraris <[email protected]>
Create a generic job definition meant for post-processing coverage data
for kernel builds where GCOV support is enabled. This job is enabled for
the (currently) only kernel taking advantage of this feature.

Signed-off-by: Arnaud Ferraris <[email protected]>
@a-wai a-wai force-pushed the coverage-report-initial-template branch from f51fadf to ac283f6 Compare June 19, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant