Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/uncomputable/coverage-example
Minimal, reproducible example for testing code coverage using GCC or Clang
https://github.com/uncomputable/coverage-example
code-coverage coverage gcov lcov tutorial
Last synced: about 2 months ago
JSON representation
Minimal, reproducible example for testing code coverage using GCC or Clang
- Host: GitHub
- URL: https://github.com/uncomputable/coverage-example
- Owner: uncomputable
- Created: 2023-12-11T16:08:26.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-11T16:14:00.000Z (about 1 year ago)
- Last Synced: 2023-12-11T17:31:35.270Z (about 1 year ago)
- Topics: code-coverage, coverage, gcov, lcov, tutorial
- Language: Just
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example for testing code coverage [GCC, Clang]
A minimal, reproducible example for testing code coverage of C code using GCC or Clang.
## Set up GCC
Use nix for an automatic setup.
```bash
nix develop
```Otherwise, install `gcc`, `just` and `lcov`.
## Test coverage using GCC
Run the `report` target to generate an HTML coverage report.
```bash
just report
```Take a look at the justfile to see the individual steps.
## Set up Clang
Use nix for an automatic setup.
```bash
nix develop .#clang
```Otherwise, install `clang`, `just`, `lcov` and `llvm`.
## Test coverage using Clang
Run the `report1` target to generate an HTML coverage report.
```bash
just report1
```Take a look at the justfile to see the individual steps.