aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-04-07 21:48:57 +0000
committerDavid Waern <david.waern@gmail.com>2010-04-07 21:48:57 +0000
commit8406b8469533f7a3ca188afd11b8b38987a3133c (patch)
tree8a5f0c1a770b254aeed5be13df64a90e85f533b5
parentae37c71b42a81ad52b96eda5a765b6ade8dfd291 (diff)
Let runtests.hs die when haddock has not been built
-rw-r--r--tests/runtests.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/runtests.hs b/tests/runtests.hs
index 9ec3e2c5..72492307 100644
--- a/tests/runtests.hs
+++ b/tests/runtests.hs
@@ -59,6 +59,10 @@ check modules strict = do
test = do
+
+ x <- doesFileExist (".." </> "dist" </> "build" </> "haddock" </> "haddock")
+ when (not x) $ die "you need to run 'cabal build' successfully first"
+
contents <- getDirectoryContents "tests"
args <- getArgs
let (opts, spec) = span ("-" `isPrefixOf`) args