Skip to content

Commit

Permalink
Fix test coverage 'did not consider any code' on Windows
Browse files Browse the repository at this point in the history
This also fixes the multi-test integration suite.
  • Loading branch information
borsboom committed Jan 6, 2016
1 parent 8472020 commit df40565
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Stack/Coverage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ generateHpcReportInternal tixSrc reportDir report extraMarkupArgs extraReportArg
["--hpcdir", toFilePathNoTrailingSep hpcRelDir, "--reset-hpcdirs"]
menv <- getMinimalEnvOverride
$logInfo $ "Generating " <> report
outputLines <- liftM S8.lines $ readProcessStdout Nothing menv "hpc"
outputLines <- liftM (map (S8.filter (/= '\r')) . S8.lines) $
readProcessStdout Nothing menv "hpc"
( "report"
: toFilePath tixSrc
: (args ++ extraReportArgs)
Expand All @@ -186,7 +187,7 @@ generateHpcReportInternal tixSrc reportDir report extraMarkupArgs extraReportArg
generateHpcErrorReport reportDir (msg True)
else do
-- Print output, stripping @\r@ characters because Windows.
forM_ outputLines ($logInfo . T.decodeUtf8 . S8.filter (/= '\r'))
forM_ outputLines ($logInfo . T.decodeUtf8)
$logInfo
("The " <> report <> " is available at " <>
T.pack (toFilePath (reportDir </> $(mkRelFile "hpc_index.html"))))
Expand Down

0 comments on commit df40565

Please sign in to comment.