hpc-coveralls icon indicating copy to clipboard operation
hpc-coveralls copied to clipboard

Coverage for binaries

Open atodorov opened this issue 7 years ago • 1 comments

According to https://github.com/haskell/cabal/issues/3902 cabal is very bad at reporting coverage on binaries. However when the --enable-coverage flag is used and these binaries are executed they will produce a binary.tix file on disk.

Can hpc-coveralls use these extra files when building the JSON data ?

What needs to happen for this to work? Can you point me around the code, give me some hints. I may be able to contribute a PR if I know what to look for.

atodorov avatar Jun 16 '17 12:06 atodorov

FYI I've had this working by executing my binaries and then

cp binary.tix dist/hpc/vanilla/binary/binary.tix
hpc-coveralls --display-report tests binary

More info at http://atodorov.org/blog/2017/06/27/producing-coverage-report-for-haskell-binaries/

however for some reason in my latest build jobs I don't see coverage being generated for the binaries files. Not sure why.

atodorov avatar Aug 09 '17 10:08 atodorov