88module Stack.Coverage
99 ( deleteHpcReports
1010 , updateTixFile
11- , testExeName
1211 , generateHpcReport
1312 , HpcReportOpts (.. )
1413 , generateHpcReportForTargets
@@ -28,7 +27,6 @@ import qualified Data.ByteString.Char8 as S8
2827import Data.Foldable (forM_ , asum , toList )
2928import Data.Function
3029import Data.List
31- import Data.List.Extra (stripSuffix )
3230import qualified Data.Map.Strict as Map
3331import Data.Maybe
3432import Data.Maybe.Extra (mapMaybeM )
@@ -39,7 +37,6 @@ import qualified Data.Text.Encoding as T
3937import qualified Data.Text.IO as T
4038import qualified Data.Text.Lazy as LT
4139import Data.Traversable (forM )
42- import Distribution.System (OS (Windows ), Platform (Platform ))
4340import Network.HTTP.Download (HasHttpManager )
4441import Path
4542import Path.Extra (toFilePathNoTrailingSep )
@@ -82,15 +79,6 @@ updateTixFile pkgName tixSrc testName = do
8279 liftIO $ writeTix (toFilePath tixDest) (removeExeModules tix)
8380 removeFileIfExists tixSrc
8481
85- testExeName :: (MonadReader env m ,HasConfig env ) => String -> m String
86- testExeName testName = do
87- config <- asks getConfig
88- let exeExtension =
89- case configPlatform config of
90- Platform _ Windows -> " .exe"
91- _ -> " "
92- return $ testName ++ exeExtension
93-
9482-- | Get the directory used for hpc reports for the given pkgId.
9583hpcPkgPath :: (MonadIO m ,MonadReader env m ,HasConfig env ,MonadLogger m ,MonadBaseControl IO m ,MonadCatch m ,HasEnvConfig env )
9684 => PackageName -> m (Path Abs Dir )
@@ -105,8 +93,7 @@ tixFilePath :: (MonadIO m,MonadReader env m,HasConfig env,MonadLogger m,MonadBas
10593 => PackageName -> String -> m (Path Abs File )
10694tixFilePath pkgName testName = do
10795 pkgPath <- hpcPkgPath pkgName
108- exeName <- testExeName testName
109- tixRel <- parseRelFile (testName ++ " /" ++ exeName ++ " .tix" )
96+ tixRel <- parseRelFile (testName ++ " /" ++ testName ++ " .tix" )
11097 return (pkgPath </> tixRel)
11198
11299-- | Generates the HTML coverage report and shows a textual coverage summary for a package.
0 commit comments