aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/html-tests/runtests.hs8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/html-tests/runtests.hs b/tests/html-tests/runtests.hs
index 28bf2f7e..759f7495 100644
--- a/tests/html-tests/runtests.hs
+++ b/tests/html-tests/runtests.hs
@@ -1,5 +1,6 @@
import Prelude hiding (mod)
import Control.Monad
+import Control.Applicative
import Data.List
import Data.Maybe
import Distribution.InstalledPackageInfo
@@ -19,8 +20,9 @@ import System.FilePath
import System.Process (ProcessHandle, runProcess, waitForProcess)
-packageRoot, haddockPath, testSuiteRoot, testDir, outDir :: FilePath
+packageRoot, dataDir, haddockPath, testSuiteRoot, testDir, outDir :: FilePath
packageRoot = "."
+dataDir = packageRoot </> "resources"
haddockPath = packageRoot </> "dist" </> "build" </> "haddock" </> "haddock"
testSuiteRoot = packageRoot </> "tests" </> "html-tests"
testDir = testSuiteRoot </> "tests"
@@ -48,8 +50,8 @@ test = do
let mods' = map (testDir </>) mods
- env_ <- getEnvironment
- let env = Just (("haddock_datadir", packageRoot) : env_)
+ -- add haddock_datadir to environment for subprocesses
+ env <- Just . (:) ("haddock_datadir", dataDir) <$> getEnvironment
putStrLn ""
putStrLn "Haddock version: "