From cce29e9a0e7063122a116f96746378e564c582ae Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 26 Jun 2008 20:26:49 +0000 Subject: Use ghc-paths to get the lib dir The path can still be overridden using the -B flag. It's not longer required to pass the lib dir to the program that runs the test suite. --- tests/runtests.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/runtests.hs') diff --git a/tests/runtests.hs b/tests/runtests.hs index ac6b293e..74259fbe 100644 --- a/tests/runtests.hs +++ b/tests/runtests.hs @@ -10,11 +10,8 @@ import Text.Regex main = do - args <- getArgs - when (null args) $ error "You must give the path to the GHC lib dir as an argument" putStrLn "Running tests..." - let libdir = head args - test libdir + test putStrLn "All tests passed!" @@ -43,11 +40,11 @@ check modules = do putStrLn $ "Pass: " ++ mod ++ " (no .ref file)" -test libdir = do +test = do contents <- getDirectoryContents "tests" let mods = filter ((==) ".hs" . takeExtension) contents let outdir = "output" let mods' = map ("tests" ) mods - code <- system $ printf "haddock -B %s -w -o %s -h --optghc=-fglasgow-exts --optghc=-w %s" libdir outdir (unwords mods') + 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