Skip to content

Commit

Permalink
Hack around wrong .mix directories for tests haskell#5213
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj committed Jul 24, 2021
1 parent 304d029 commit 20879a1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Cabal/src/Distribution/Simple/Hpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ mixDir :: FilePath -- ^ \"dist/\" prefix
-> Way
-> FilePath -- ^ Component name
-> FilePath -- ^ Directory containing test suite's .mix files
mixDir distPref way name = hpcDir distPref way </> "mix" </> name
mixDir distPref way name = hpcDir distPrefBuild way </> "mix" </> name
where
-- This is a hack for HPC over test suites, needed to match the directory
-- where HPC stores .mix files when the main library of the same package
-- is being processed, perhaps in a previous cabal run (#5213).
distPrefElements = splitDirectories distPref
distPrefBuild = case drop (length distPrefElements - 2) distPrefElements of
"t" : _ -> joinPath $ take (length distPrefElements - 2) distPrefElements
_ -> distPref

tixDir :: FilePath -- ^ \"dist/\" prefix
-> Way
Expand Down

0 comments on commit 20879a1

Please sign in to comment.