This version can be pinned in stack with:hpc-lcov-1.1.0@sha256:5663526c1a74c843b611a77b2a03cf6fe5bf2b7984b33ce6a1a7ba968fb54b87,2763
Module documentation for 1.1.0
Depends on 12 packages
(full list with versions ) :
aeson ,
base ,
containers ,
hpc ,
hpc-lcov ,
optparse-applicative ,
path ,
path-io ,
process ,
text ,
unordered-containers ,
yaml hpc-lcov
Convert HPC output into lcov.info
files that can be uploaded to coverage
services, like Codecov .
Quickstart
Stack
Run stack install hpc-lcov
Run your test(s) with coverage, e.g. stack test --coverage
Run hpc-lcov
Upload the generated lcov.info
file to your coverage service
Cabal
Coming soon! (https://github.com/LeapYear/hpc-lcov/issues/3 )
FAQs
How do I convert coverage for an executable?
Note: If you have both tests and executables, HPC will write module information to the same file. Because of this, you’ll have to load the coverage for each separately, with a stack clean
in between.
Build a single executable with coverage enabled (e.g. stack build :my-exe --coverage
)
Run the executable
This should generate a .tix
file 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
)
Run
lcov -a lcov1.info -a lcov2.info ... > lcov.info
Resources
v1.1.0
Drop support for GHC < 8.6
v1.0.1
Bug fix:
Don’t error if the packages
field in stack.yaml
doesn’t exist
v1.0.0
Initial release of hpc-lcov
:
Generates LCOV files from HPC .tix
files
Discovers .tix
files generated by Stack test suites
Allows manually specifying a .tix
file (useful for executables with coverage enabled)
Stackage is a service provided by the
Haskell Foundation
│ Originally developed by
FP Complete