diff options
author | David Waern <david.waern@gmail.com> | 2008-06-30 18:50:30 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2008-06-30 18:50:30 +0000 |
commit | d4bd96337f0fefad170edd71db90eea5d76a928e (patch) | |
tree | b47ef7fe0bb743788bf11e86e93254620e45c7cf /tests/runtests.hs | |
parent | 9b4ba226c4b85b9126be865bae2e5b3558fdaef6 (diff) |
Run haddock in-place during testing
Diffstat (limited to 'tests/runtests.hs')
-rw-r--r-- | tests/runtests.hs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/runtests.hs b/tests/runtests.hs index 74259fbe..83c8e75d 100644 --- a/tests/runtests.hs +++ b/tests/runtests.hs @@ -3,6 +3,7 @@ import System.Environment import System.FilePath import System.Exit import System.Directory +import System.Process import Data.List import Control.Monad import Text.Printf @@ -45,6 +46,9 @@ test = do let mods = filter ((==) ".hs" . takeExtension) contents let outdir = "output" let mods' = map ("tests" </>) mods - code <- system $ printf "haddock -w -o %s -h --optghc=-fglasgow-exts --optghc=-w %s" outdir (unwords mods') + handle <- runProcess "../dist/build/haddock/haddock" (["-w", "-o", outdir, "-h", "--optghc=-fglasgow-exts", "--optghc=-w"] ++ mods') Nothing (Just [("HADDOCK_DATA_DIR", "../.")]) Nothing Nothing Nothing + code <- waitForProcess handle + +-- code <- system $ printf "haddock -w -o %s -h --optghc=-fglasgow-exts --optghc=-w %s" outdir (unwords mods') unless (code == ExitSuccess) $ error "Haddock run failed! Exiting." check mods |