From f895ccedfdcd6d154ce4880955987fffcd7bad9b Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 8 Apr 2010 00:57:33 +0000 Subject: Make it easier to add new package deps to test suite This is a hack - we should use Cabal to get the package details instead. --- tests/runtests.hs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tests/runtests.hs') diff --git a/tests/runtests.hs b/tests/runtests.hs index eed9cec8..a3925efa 100644 --- a/tests/runtests.hs +++ b/tests/runtests.hs @@ -48,11 +48,16 @@ test = do waitForProcess h2 putStrLn "" + -- TODO: use Distribution.* to get the packages instead libdir <- rawSystemStdout normal haddockPath ["--print-ghc-libdir"] - let basepath = init libdir ++ "/../../share/doc/ghc/html/libraries/base-4.2.0.0/" - let base = "-i " ++ basepath ++ "," ++ basepath ++ "base.haddock" - let processpath = init libdir ++ "/../../share/doc/ghc/html/libraries/process-1.0.1.2/" - let process = "-i " ++ processpath ++ "," ++ processpath ++ "process.haddock" + let librariesPath = "..""..""share""doc""ghc""html""libraries" + + let mkDep name version = + let path = init libdir librariesPath name ++ "-" ++ version + in "-i " ++ path ++ "," ++ path name ++ ".haddock" + + let base = mkDep "base" "4.2.0.0" + process = mkDep "process" "1.0.1.2" putStrLn "Running tests..." handle <- runProcess haddockPath -- cgit v1.2.3