From 943c5b7880cbfa8c90a0776dd539ae1e89f46d35 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Mon, 15 Oct 2012 11:38:42 +0200 Subject: Move resources to /resources directory --- tests/html-tests/runtests.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') 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: " -- cgit v1.2.3