[commit: ghc] master: Testsuite: do not print timeout message (bafd615)

git at git.haskell.org git at git.haskell.org
Tue Jun 28 12:21:40 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bafd615e40c2a11af1390e736f6122033eecc4c6/ghc

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

commit bafd615e40c2a11af1390e736f6122033eecc4c6
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Tue Jun 28 11:58:33 2016 +0200

    Testsuite: do not print timeout message
    
    This is a followup to e1293bbfb1fa1fdeb56446a7b957d6f628042e71, but then
    for Windows timeout.


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

bafd615e40c2a11af1390e736f6122033eecc4c6
 testsuite/timeout/timeout.hs | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/testsuite/timeout/timeout.hs b/testsuite/timeout/timeout.hs
index 3532497..3684b91 100644
--- a/testsuite/timeout/timeout.hs
+++ b/testsuite/timeout/timeout.hs
@@ -33,9 +33,6 @@ main = do
           _ -> die ("Can't parse " ++ show secs ++ " as a number of seconds")
       _ -> die ("Bad arguments " ++ show args)
 
-timeoutMsg :: String -> String
-timeoutMsg cmd = "Timeout happened...killing process "++cmd++"..."
-
 run :: Int -> String -> IO ()
 #if !defined(mingw32_HOST_OS)
 run secs cmd = do
@@ -61,7 +58,6 @@ run secs cmd = do
                 r <- takeMVar m
                 case r of
                   Nothing -> do
-                        hPutStrLn stderr (timeoutMsg cmd)
                         killProcess pid
                         exitWith (ExitFailure 99)
                   Just (Exited r) -> exitWith r
@@ -122,8 +118,7 @@ run secs cmd =
        let millisecs = secs * 1000
        rc <- waitForSingleObject handle (fromIntegral millisecs)
        if rc == cWAIT_TIMEOUT
-           then do hPutStrLn stderr (timeoutMsg cmd)
-                   terminateJobObject job 99
+           then do terminateJobObject job 99
                    exitWith (ExitFailure 99)
            else alloca $ \p_exitCode ->
                 do r <- getExitCodeProcess handle p_exitCode



More information about the ghc-commits mailing list