From 44b897c6a5203f2247707c75dbb59f782abdf763 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Fri, 9 May 2014 20:37:55 +0200 Subject: [PATCH] Print useful information when running spec --- test/Main.hs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/Main.hs b/test/Main.hs index bd0c8f8..0700432 100644 --- a/test/Main.hs +++ b/test/Main.hs @@ -1,9 +1,13 @@ +{-# LANGUAGE ScopedTypeVariables #-} import Spec import Dir import Test.Hspec import System.Process +import Language.Haskell.GhcMod (debugInfo, defaultOptions, findCradle) +import Control.Exception as E + main = do let sandboxes = [ "test/data", "test/data/check-packageid" , "test/data/duplicate-pkgver/" ] @@ -17,4 +21,10 @@ main = do genSandboxCfg `mapM_` sandboxes genGhcPkgCache `mapM_` pkgDirs 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