From d4bd96337f0fefad170edd71db90eea5d76a928e Mon Sep 17 00:00:00 2001 From: David Waern Date: Mon, 30 Jun 2008 18:50:30 +0000 Subject: Run haddock in-place during testing --- tests/runtests.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3