[GHC] #9619: HPC Code Coverage complains when two exactly the same mix files are on the path
GHC
ghc-devs at haskell.org
Sat Sep 20 14:48:11 UTC 2014
#9619: HPC Code Coverage complains when two exactly the same mix files are on the
path
-------------------------------------+-------------------------------------
Reporter: Kasper | Owner:
Type: bug | Status: new
Priority: lowest | Milestone:
Component: Code Coverage | Version: 7.8.3
Keywords: | Operating System: Linux
Architecture: x86_64 (amd64) | Type of failure: Incorrect
Difficulty: Unknown | result at runtime
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Cabal's --enable-library-coverage flag generates the .mix files in the
dist/mix directory that cabal creates during compilation. I have two test
suites, integration tests and unit tests. Those test suites calll tests
for moduleA in moduleATest. Unfortunately, in a first version, the
integration tests and unit tests for moduleA were both present in
moduleATest. Therefore, the unit test suite (in UnitTests.hs) and the
integration test suite (in IntegrationTests.hs) both 'use' the moduleATest
by linking in tests from that module. This leads to cabal generating a
directory integration-tests and a directory unit-tests with .mix files,
but the moduleATest.mix file is present in both directories. When
performing hpc sum and hpc markup to get the total result of the test runs
I need to specify the directories where the mix files are present (so
dist/hpc/mix/unit-tests and dist/hpc/mix/integration-tests) and it will
then complain that it finds moduleATest.mix file twice.
This issue is not present when using the -fhpc flag, as the directory
structure with integration-tests and unit-tests is not present in the .hpc
directory at that moment. That being said, I don't think it's a cabal
issue as it's more or less expected what they're doing, generating the mix
files necessary to instrument integration-tests and unit-tests separately.
Priority put to lowest because I can work around it by diving moduleATest
up in moduleATest and moduleAIntegrationTest, which is saner in the end
anyway. But I guess somebody will come up with a use case where a split up
isn't possible, in the future.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9619>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list