Convert HPC output into LCOV format
|Version on this page:||1.0.1@rev:4|
|LTS Haskell 20.16:||1.1.0@rev:2|
|Stackage Nightly 2023-03-31:||1.1.0@rev:2|
|Latest on Hackage:||1.1.0@rev:2|
This version can be pinned in stack with:
Module documentation for 1.0.1
Depends on 12 packages(full list with versions):
Used by 1 package in nightly-2022-08-17(full list with versions):
Convert HPC output into
lcov.info files that can be uploaded to coverage
services, like Codecov.
stack install hpc-lcov
- Run your test(s) with coverage, e.g.
stack test --coverage
- Upload the generated
lcov.infofile to your coverage service
Coming soon! (https://github.com/LeapYear/hpc-lcov/issues/3)
How do I convert coverage for an executable?
Note: If you have both tests and executables, HPC will write outputs to the
same file. Because of this, you’ll have to load the coverage for each
separately, with a
stack clean in between.
- Build the executable with coverage enabled (e.g.
stack build --coverage)
- Run the executable
- This should generate a
.tixfile in the current directory
- Run the following, specifying the package that builds the executable:
stack exec -- hpc-lcov --file my-exe.tix --main-package my-package
How do I merge coverage files?
Install LCOV (e.g.
brew install lcov)
lcov -a lcov1.info -a lcov2.info ... > lcov.info
- Don’t error if the
Initial release of
- Generates LCOV files from HPC
.tixfiles generated by Stack test suites
- Allows manually specifying a
.tixfile (useful for executables with coverage enabled)