diff options
author | David Waern <david.waern@gmail.com> | 2009-07-06 20:24:20 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2009-07-06 20:24:20 +0000 |
commit | 25b78bc0619d55c1662513c412c0193778a885c1 (patch) | |
tree | b2a1052f52322c4fae8df02393fca4ffba2d8899 | |
parent | 8ac2f87d8328554fc66331282d8b1c169e430ac5 (diff) |
Clearer printing of versions by runtests.hs
-rw-r--r-- | tests/runtests.hs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/runtests.hs b/tests/runtests.hs index 27c1506c..9aa27871 100644 --- a/tests/runtests.hs +++ b/tests/runtests.hs @@ -11,7 +11,6 @@ import Text.Regex main = do - putStrLn "Running tests..." test putStrLn "All tests passed!" @@ -48,10 +47,17 @@ test = do let mods = filter ((==) ".hs" . takeExtension) contents let outdir = "output" let mods' = map ("tests" </>) mods - runProcess "../dist/build/haddock/haddock" ["--version"] Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing - runProcess "../dist/build/haddock/haddock" ["--ghc-version"] Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing + putStrLn "" + putStrLn "Haddock version: " + h1 <- runProcess "../dist/build/haddock/haddock" ["--version"] Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing + waitForProcess h1 + putStrLn "" + putStrLn "GHC version: " + h2 <- runProcess "../dist/build/haddock/haddock" ["--ghc-version"] Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing + waitForProcess h2 + putStrLn "" + putStrLn "Running tests..." handle <- runProcess "../dist/build/haddock/haddock" (["-w", "-o", outdir, "-h", "--optghc=-fglasgow-exts", "--optghc=-w"] ++ mods') Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing code <- waitForProcess handle --- code <- system $ printf "haddock -w -o %s -h --optghc=-fglasgow-exts --optghc=-w %s" outdir (unwords mods') when (code /= ExitSuccess) $ error "Haddock run failed! Exiting." check mods (if not (null args) && args !! 0 == "all" then False else True) |