diff options
| author | Simon Hengel <sol@typeful.net> | 2012-10-07 16:44:06 +0200 | 
|---|---|---|
| committer | Simon Hengel <sol@typeful.net> | 2012-10-07 16:44:06 +0200 | 
| commit | dd6209a0a1adf9f2817075173cca99ac2379db2e (patch) | |
| tree | dc2535e7db52d0642e491f55a60f1cf1c59e330e /tests | |
| parent | 2319833e9d96a78ba041a0041abc9bfffb523702 (diff) | |
Extend rather than set environment when running HTML tests
On some platforms (e.g. ppc64) GHC requires gcc in the path.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/html-tests/runtests.hs | 10 | 
1 files changed, 7 insertions, 3 deletions
| 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 | 
