Setup.hs: Added a 5 second timeout for test cases.

This commit is contained in:
John MacFarlane 2011-02-04 16:53:21 -08:00
parent 70405ef98a
commit 99677ac05d

View file

@ -40,7 +40,7 @@ runTestSuite :: Args -> Bool -> PackageDescription -> LocalBuildInfo -> IO a
runTestSuite args _ pkg lbi = do
let testDir = buildDir lbi </> "test-pandoc"
testDir' <- canonicalizePath testDir
let testArgs = concatMap (\arg -> ["-t",arg]) args
let testArgs = "--timeout=5" : concatMap (\arg -> ["-t",arg]) args
if any id [buildable (buildInfo exe) | exe <- executables pkg, exeName exe == "test-pandoc"]
then inDirectory "tests" $ rawSystem (testDir' </> "test-pandoc") testArgs >>= exitWith
else do