I find hpc really confusing, even after reading several explanations and playing around quite a bit.
I have a library HML, and two test suites fileio-test and types-test, using HTF (I plan on moving to tasty). I'd like to run the two tests and then see the combined coverage from the two over the library.
At the moment I build the library using
cabal configure --enable-coverage
cabal build
And run the tests using
cabal configure --enable-coverage --enable-tests
cabal build
cabal test
hpc report --hpc-dir dist/hpc/vanilla/mix/fileio-test dist/hpc/vanilla/tix/fileio-test/fileio-test.tix
This shows me some coverage, but not the correct one. What I think is that it shows coverage, but only from one of the tests, and also includes coverage of the tests themselves.
I tried using
--hpc-dir dist/hpc/vanilla/mix/HML-0.1.0.0
But then hpc complains it can't find the module files it needs. I also tried combining coverage from the two tests with no luck.
Any pointers?