From dd6209a0a1adf9f2817075173cca99ac2379db2e Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sun, 7 Oct 2012 16:44:06 +0200 Subject: Extend rather than set environment when running HTML tests On some platforms (e.g. ppc64) GHC requires gcc in the path. --- tests/html-tests/runtests.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/html-tests') diff --git a/tests/html-tests/runtests.hs b/tests/html-tests/runtests.hs index 25e53d1a..fc9477ca 100644 --- a/tests/html-tests/runtests.hs +++ b/tests/html-tests/runtests.hs @@ -43,15 +43,19 @@ test = do _ -> filter ((==) ".hs" . takeExtension) contents let mods' = map (testDir ) mods + + env_ <- getEnvironment + let env = Just (("haddock_datadir", packageRoot) : env_) + putStrLn "" putStrLn "Haddock version: " h1 <- runProcess haddockPath ["--version"] Nothing - (Just [("haddock_datadir", packageRoot)]) Nothing Nothing Nothing + env Nothing Nothing Nothing waitForProcess h1 putStrLn "" putStrLn "GHC version: " h2 <- runProcess haddockPath ["--ghc-version"] Nothing - (Just [("haddock_datadir", packageRoot)]) Nothing Nothing Nothing + env Nothing Nothing Nothing waitForProcess h2 putStrLn "" @@ -77,7 +81,7 @@ test = do handle <- runProcess haddockPath (["-w", "-o", outDir, "-h", "--pretty-html", "--optghc=-fglasgow-exts" , "--optghc=-w", base, process, ghcprim] ++ opts ++ mods') - Nothing (Just [("haddock_datadir", packageRoot)]) Nothing + Nothing env Nothing Nothing Nothing code <- waitForProcess handle -- cgit v1.2.3