hpc-lcov: Convert HPC output into LCOV format

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

Convert HPC output into LCOV format.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 1.0.0, 1.0.1, 1.1.0, 1.1.1, 1.1.2
Change log CHANGELOG.md
Dependencies aeson, base (<5), containers, hpc (<0.8), hpc-lcov, optparse-applicative, path, path-io, process, text, unordered-containers, yaml [details]
License BSD-3-Clause
Author Brandon Chinn <brandonchinn178@gmail.com>
Maintainer Brandon Chinn <brandonchinn178@gmail.com>
Category Control
Home page https://github.com/brandonchinn178/hpc-lcov#readme
Bug tracker https://github.com/brandonchinn178/hpc-lcov/issues
Source repo head: git clone https://github.com/brandonchinn178/hpc-lcov
Uploaded by brandonchinn178 at 2023-12-26T18:17:53Z
Distributions LTSHaskell:1.1.2, NixOS:1.1.2, Stackage:1.1.2
Executables hpc-lcov
Downloads 1008 total (27 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-12-26 [all 1 reports]

Readme for hpc-lcov-1.1.2

[back to package description]

hpc-lcov

GitHub Actions codecov Hackage

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

Quickstart

  1. Download hpc-lcov from the releases page or install it from Hackage with your favorite package manager
  2. Run your tests with coverage enabled
  3. Run hpc-lcov
  4. Upload the generated lcov.info file to your coverage service

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.

  1. Build a single executable with coverage enabled (e.g. stack build :my-exe --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