diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2017-11-29 22:36:25 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2018-01-18 14:10:26 +0100 |
commit | 8d2dbc7ce3211725561bd419271ac4cabb8c7ae8 (patch) | |
tree | 28a0831268f11dd24170560e97b563337f45f465 /tests | |
parent | 93a139b03320e00316411cd9220ad7c304ad55c6 (diff) |
Cleaning up
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GhcSession.hs | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index f627cae..42193b9 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -27,9 +27,8 @@ main = do args <- getArgs topdir <- getCurrentDirectory res <- mapM (setup topdir test) $ case args of - [] -> [ - -- ("tests/exelib" , parseVer "1.10") - ("tests/exeintlib", parseVer "2.0") + [] -> [ ("tests/exelib" , parseVer "1.10") + , ("tests/exeintlib", parseVer "2.0") ] xs -> map (,parseVer "0") xs @@ -50,7 +49,6 @@ setup :: FilePath -> (FilePath -> IO [Bool]) -> (FilePath, Version) -> IO [Bool] setup topdir act (srcdir, min_cabal_ver) = do ci_ver <- cabalInstallVersion c_ver <- cabalInstallBuiltinCabalVersion - putStrLn $ "(ci_ver,c_ver)=" ++ show (ci_ver,c_ver) -- AZ-DEBUG let mreason | (ci_ver < parseVer "1.24") = Just $ "cabal-install-" ++ showVersion ci_ver ++ " is too old" @@ -65,9 +63,7 @@ setup topdir act (srcdir, min_cabal_ver) = do putStrLn $ "Skipping test '" ++ srcdir ++ "' because " ++ reason ++ "." return [] Nothing -> do - -- withSystemTempDirectory "cabal-helper.ghc-session.test" $ \dir -> do - let dir = "/tmp/xxx" - do + withSystemTempDirectory "cabal-helper.ghc-session.test" $ \dir -> do setCurrentDirectory $ topdir </> srcdir run "cabal" [ "sdist", "--output-dir", dir ] @@ -80,9 +76,7 @@ setup topdir act (srcdir, min_cabal_ver) = do run x xs = do print $ x:xs o <- readProcess x xs "" - putStrLn "=======================output============" -- AZ-DEBUG putStrLn o - putStrLn "=======================output-done=======" -- AZ-DEBUG return () test :: FilePath -> IO [Bool] @@ -91,9 +85,7 @@ test dir = do cs <- runQuery qe $ components $ (,,) <$> entrypoints <.> ghcOptions forM cs $ \(ep, opts, cn) -> do let sopts = intercalate " " $ map formatArg $ "ghc" : opts - putStrLn "======================= cn ============" -- AZ-DEBUG putStrLn $ "\n" ++ show cn ++ ": " ++ sopts - putStrLn "======================= cn done =======" -- AZ-DEBUG compileModule ep opts where formatArg x @@ -103,8 +95,6 @@ test dir = do compileModule :: ChEntrypoint -> [String] -> IO Bool compileModule ep opts = do - putStrLn $ "compileModule:ep=" ++ show ep - E.handle (\(ec :: ExitCode) -> print ec >> return False) $ do defaultErrorHandler defaultFatalMessager defaultFlushOut $ do |