diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CompileTest.hs | 1 | ||||
-rw-r--r-- | tests/GhcSession.hs | 16 | ||||
-rw-r--r-- | tests/exeintlib/exeintlib.cabal (renamed from tests/exeintlib/exelib.cabal) | 0 |
3 files changed, 14 insertions, 3 deletions
diff --git a/tests/CompileTest.hs b/tests/CompileTest.hs index de9b6ab..cc9c85a 100644 --- a/tests/CompileTest.hs +++ b/tests/CompileTest.hs @@ -97,6 +97,7 @@ main = do , ("8.0.1", ">= 1.24 ") , ("8.0.2", ">= 1.24.2 ") , ("8.2.1", ">= 2.0.0.2 ") + , ("8.2.2", ">= 2.0.0.2 ") ] relevant_cabal_versions = diff --git a/tests/GhcSession.hs b/tests/GhcSession.hs index 42193b9..f627cae 100644 --- a/tests/GhcSession.hs +++ b/tests/GhcSession.hs @@ -27,8 +27,9 @@ 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 @@ -49,6 +50,7 @@ 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" @@ -63,7 +65,9 @@ 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 + -- withSystemTempDirectory "cabal-helper.ghc-session.test" $ \dir -> do + let dir = "/tmp/xxx" + do setCurrentDirectory $ topdir </> srcdir run "cabal" [ "sdist", "--output-dir", dir ] @@ -76,7 +80,9 @@ 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] @@ -85,7 +91,9 @@ 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 @@ -95,6 +103,8 @@ 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 diff --git a/tests/exeintlib/exelib.cabal b/tests/exeintlib/exeintlib.cabal index 807aac5..807aac5 100644 --- a/tests/exeintlib/exelib.cabal +++ b/tests/exeintlib/exeintlib.cabal |