diff options
author | David Waern <david.waern@gmail.com> | 2010-04-08 00:57:33 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-04-08 00:57:33 +0000 |
commit | f895ccedfdcd6d154ce4880955987fffcd7bad9b (patch) | |
tree | 85a1bdedba92caa2f059e9274821235896f335c6 /tests/runtests.hs | |
parent | 4afbfaee71fd6529c627325843aaebe3ec7ff938 (diff) |
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.
Diffstat (limited to 'tests/runtests.hs')
-rw-r--r-- | tests/runtests.hs | 13 |
1 files changed, 9 insertions, 4 deletions
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 |