A minimal, reproducible example for testing code coverage of C code using GCC or Clang.
Use nix for an automatic setup.
nix developOtherwise, install gcc, just and lcov.
Run the report target to generate an HTML coverage report.
just reportTake a look at the justfile to see the individual steps.
Use nix for an automatic setup.
nix develop .#clangOtherwise, install clang, just, lcov and llvm.
Run the report1 target to generate an HTML coverage report.
just report1Take a look at the justfile to see the individual steps.