diff options
author | Joey Hess <joey@kitenet.net> | 2013-02-27 23:35:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-02-27 23:46:53 -0400 |
commit | df7db87526635dfbc605fb985fd60a7a2c584e74 (patch) | |
tree | f4c551563df5f27c5dd53ae2356d2e34f4373b43 /Test.hs | |
parent | d1c741eedca7eb0976f7faa0bef6f991501c8d12 (diff) |
improve test output
Diffstat (limited to 'Test.hs')
-rw-r--r-- | Test.hs | 35 |
1 files changed, 27 insertions, 8 deletions
@@ -56,17 +56,36 @@ import qualified Utility.InodeCache main :: IO () main = do - unlessM (all isSuccess <$> sequence quickcheck) $ - error "A quickcheck test failed!" + divider + putStrLn "First, some automated quick checks of properties ..." + divider + qcok <- all isSuccess <$> sequence quickcheck + divider + putStrLn "Now, some broader checks ..." + putStrLn " (Do not be alarmed by odd output here; it's normal." + putStrLn " wait for the last line to see how it went.)" + divider prepare r <- runTestTT blackbox cleanup tmpdir - propigate r - -propigate :: Counts -> IO () -propigate Counts { errors = e , failures = f } - | e+f > 0 = error "failed" - | otherwise = return () + divider + propigate r qcok + where + divider = putStrLn $ take 70 $ repeat '-' + +propigate :: Counts -> Bool -> IO () +propigate Counts { errors = e , failures = f } qcok + | blackboxok && qcok = putStrLn "All tests ok." + | otherwise = do + unless qcok $ + putStrLn "Quick check tests failed! This is a bug in git-annex." + unless blackboxok $ do + putStrLn "Some tests failed!" + putStrLn " (This could be due to a bug in git-annex, or an incompatability" + putStrLn " with utilities, such as git, installed on this system.)" + exitFailure + where + blackboxok = e+f == 0 quickcheck :: [IO Result] quickcheck = |