Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
7e8dfac4
Commit
7e8dfac4
authored
Mar 03, 2011
by
ttuegel
Browse files
Remove log files before running tests by default.
parent
5d457a31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Distribution/Simple/Test.hs
View file @
7e8dfac4
...
...
@@ -77,12 +77,12 @@ import Distribution.Verbosity ( normal, Verbosity )
import
Distribution.System
(
buildPlatform
,
Platform
)
import
Control.Exception
(
bracket
)
import
Control.Monad
(
when
,
liftM
,
unless
)
import
Control.Monad
(
when
,
liftM
,
unless
,
filterM
)
import
Data.Char
(
toUpper
)
import
Data.Monoid
(
mempty
)
import
System.Directory
(
createDirectoryIfMissing
,
doesFileExist
,
getCurrentDirectory
,
removeFile
)
,
removeFile
,
getDirectoryContents
)
import
System.Environment
(
getEnvironment
)
import
System.Exit
(
ExitCode
(
..
),
exitFailure
,
exitSuccess
,
exitWith
)
import
System.FilePath
(
(
</>
),
(
<.>
)
)
...
...
@@ -327,6 +327,11 @@ test pkg_descr lbi flags = do
createDirectoryIfMissing
True
testLogDir
-- Delete ordinary files from test log directory.
getDirectoryContents
testLogDir
>>=
filterM
doesFileExist
.
map
(
testLogDir
</>
)
>>=
mapM_
removeFile
let
totalSuites
=
length
testsToRun
notice
verbosity
$
"Running "
++
show
totalSuites
++
" test suites..."
suites
<-
mapM
doTest
testsToRun
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment