Skip to content

Commit

Permalink
Add clear examples of what tools to use locally to display lcov
Browse files Browse the repository at this point in the history
  • Loading branch information
ksew1 committed Nov 26, 2024
1 parent f9a5549 commit 76cece4
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@ example of the `lcov` format [here](./lcov.md).
cairo-coverage path/to/trace/1.json path/to/trace/2.json path/to/trace/3.json
```

### Coverage statistics
### Usage locally

Various tools exist that can produce coverage statistics based on an lcov file. One of the most well-known among these
is [genhtml](https://github.com/linux-test-project/lcov/blob/master/bin/genhtml),
a tool that generates an html summary report using the coverage data in an lcov file, `genhtml` is part of
the [lcov package](https://github.com/linux-test-project/lcov/tree/master).
A summary report with aggregated data can be produced by one of many tools that accept the `lcov` format.
In this example we will use the `genhtml` tool from the [lcov package](https://github.com/linux-test-project/lcov/tree/master) to generate an HTML report.

Run the following command in the directory containing your `coverage.lcov` file:

```shell
genhtml -o coverage_report coverage.lcov
```

You can now open the `index.html` file in the `coverage_report` directory to see the generated coverage report.

## Usage in GitHub actions

Expand Down

0 comments on commit 76cece4

Please sign in to comment.