diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/README | 3 | ||||
-rw-r--r-- | tests/runtests.hs | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/README b/tests/README index 51baa82d..567c3b61 100644 --- a/tests/README +++ b/tests/README @@ -16,3 +16,6 @@ to copy all output into reference files You can do runhaskell runtests.hs all to continue despite a failing test + +You can pass extra options to haddock like so + runhaskell runtests.hs --xhtml all diff --git a/tests/runtests.hs b/tests/runtests.hs index 2303e3d0..9ec3e2c5 100644 --- a/tests/runtests.hs +++ b/tests/runtests.hs @@ -61,9 +61,9 @@ check modules strict = do test = do contents <- getDirectoryContents "tests" args <- getArgs - + let (opts, spec) = span ("-" `isPrefixOf`) args let mods = - case args of + case spec of x:_ | x /= "all" -> [x ++ ".hs"] _ -> filter ((==) ".hs" . takeExtension) contents @@ -86,7 +86,7 @@ test = do let process = "-i " ++ processpath ++ "," ++ processpath ++ "process.haddock" putStrLn "Running tests..." - handle <- runProcess "../dist/build/haddock/haddock" (["-w", "-o", outdir, "-h", "--optghc=-fglasgow-exts", "--optghc=-w", base, process] ++ mods') Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing + handle <- runProcess "../dist/build/haddock/haddock" (["-w", "-o", outdir, "-h", "--optghc=-fglasgow-exts", "--optghc=-w", base, process] ++ opts ++ mods') Nothing (Just [("haddock_datadir", "../.")]) Nothing Nothing Nothing code <- waitForProcess handle when (code /= ExitSuccess) $ error "Haddock run failed! Exiting." check mods (if not (null args) && args !! 0 == "all" then False else True) |