Print useful information when running spec
This commit is contained in:
parent
8741323f5b
commit
44b897c6a5
10
test/Main.hs
10
test/Main.hs
@ -1,9 +1,13 @@
|
|||||||
|
{-# LANGUAGE ScopedTypeVariables #-}
|
||||||
import Spec
|
import Spec
|
||||||
import Dir
|
import Dir
|
||||||
|
|
||||||
import Test.Hspec
|
import Test.Hspec
|
||||||
import System.Process
|
import System.Process
|
||||||
|
|
||||||
|
import Language.Haskell.GhcMod (debugInfo, defaultOptions, findCradle)
|
||||||
|
import Control.Exception as E
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
let sandboxes = [ "test/data", "test/data/check-packageid"
|
let sandboxes = [ "test/data", "test/data/check-packageid"
|
||||||
, "test/data/duplicate-pkgver/" ]
|
, "test/data/duplicate-pkgver/" ]
|
||||||
@ -17,4 +21,10 @@ main = do
|
|||||||
genSandboxCfg `mapM_` sandboxes
|
genSandboxCfg `mapM_` sandboxes
|
||||||
genGhcPkgCache `mapM_` pkgDirs
|
genGhcPkgCache `mapM_` pkgDirs
|
||||||
system "find test -name setup-config -exec rm {} \\;"
|
system "find test -name setup-config -exec rm {} \\;"
|
||||||
|
system "cabal --version"
|
||||||
|
system "ghc --version"
|
||||||
|
|
||||||
|
(putStrLn =<< debugInfo defaultOptions =<< findCradle)
|
||||||
|
`E.catch` (\(_ :: E.SomeException) -> return () )
|
||||||
|
|
||||||
hspec spec
|
hspec spec
|
||||||
|
Loading…
Reference in New Issue
Block a user