hpc-lcov: Convert HPC output into LCOV format

[ bsd3, control, library, program ] [ Propose Tags ]

Convert HPC output into LCOV format.


[Skip to Readme]
Versions [faq] 1.0.0, 1.0.1
Change log CHANGELOG.md
Dependencies aeson (>=1.1.2.0 && <1.6), base (>=4.9 && <5), containers (>=0.5.7.1 && <0.7), hpc (>=0.6.0.3 && <0.7), hpc-lcov, optparse-applicative (>=0.13.2.0 && <0.17), path (>=0.6.0 && <0.8), path-io (>=1.2.2 && <1.7), process (>=1.4.3.0 && <1.7), text (>=1.2.2.2 && <1.4), unordered-containers (>=0.2.8.0 && <0.3), yaml (>=0.8.24 && <0.12) [details]
License BSD-3-Clause
Author Brandon Chinn <brandon@leapyear.io>
Maintainer Brandon Chinn <brandon@leapyear.io>
Revised Revision 1 made by leapyear at 2020-08-14T00:18:21Z
Category Control
Home page https://github.com/LeapYear/hpc-lcov#readme
Bug tracker https://github.com/LeapYear/hpc-lcov/issues
Source repo head: git clone https://github.com/LeapYear/hpc-lcov
Uploaded by leapyear at 2020-06-15T23:04:06Z
Distributions NixOS:1.0.1
Executables hpc-lcov
Downloads 298 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2020-06-15 [all 1 reports]

Modules

[Index] [Quick Jump]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for hpc-lcov-1.0.1

[back to package description]

hpc-lcov

codecov CircleCI Hackage

Convert HPC output into lcov.info files that can be uploaded to coverage services, like Codecov.

Quickstart

Stack

  1. Run stack install hpc-lcov
  2. Run your test(s) with coverage, e.g. stack test --coverage
  3. Run hpc-lcov
  4. 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 outputs to the same file. Because of this, you'll have to load the coverage for each separately, with a stack clean in between.

  1. Build the executable with coverage enabled (e.g. stack build --coverage)
  2. Run the executable
  3. This should generate a .tix file in the current directory
  4. 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?

  1. Install LCOV (e.g. brew install lcov)

  2. Run

    lcov -a lcov1.info -a lcov2.info ... > lcov.info
    

Resources