[commit: packages/time] master: We now need to check the exitcode of the tests (ccb1264)

git at git.haskell.org git at git.haskell.org
Fri Jan 23 22:58:16 UTC 2015


Repository : ssh://git@git.haskell.org/time

On branch  : master
Link       : http://git.haskell.org/packages/time.git/commitdiff/ccb1264e93dfa379d26368677aa05ec3b7ec34c2

>---------------------------------------------------------------

commit ccb1264e93dfa379d26368677aa05ec3b7ec34c2
Author: Ian Lynagh <igloo at earth.li>
Date:   Sat Apr 21 09:23:30 2007 -0700

    We now need to check the exitcode of the tests
    
    darcs-hash:20070421162330-3fd76-36ce113c06f673ae509deac9eb047e5f539a69c5


>---------------------------------------------------------------

ccb1264e93dfa379d26368677aa05ec3b7ec34c2
 Setup.hs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Setup.hs b/Setup.hs
index caecfdd..d2fff29 100644
--- a/Setup.hs
+++ b/Setup.hs
@@ -2,10 +2,11 @@ module Main (main) where
 
 import Control.Exception
 import Data.List
-import Distribution.Simple
 import Distribution.PackageDescription
 import Distribution.Setup
+import Distribution.Simple
 import Distribution.Simple.LocalBuildInfo
+import Distribution.Simple.Utils
 import System.Cmd
 import System.Directory
 import System.Environment
@@ -29,10 +30,9 @@ withCurrentDirectory path f = do
     setCurrentDirectory path
     finally f (setCurrentDirectory cur)
 
-runTestScript :: Args -> Bool -> PackageDescription -> LocalBuildInfo
-              -> IO ()
+runTestScript :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO ()
 runTestScript _args _flag _pd _lbi
- = withCurrentDirectory "test" (system "make")
+ = maybeExit $ withCurrentDirectory "test" $ system "make"
 
 extractGhcArgs :: [String] -> ([String], [String])
 extractGhcArgs = extractPrefixArgs "--ghc-option="



More information about the ghc-commits mailing list