Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a safety timeout (with a reasonably large time, not infringing on user-specified timeouts under "normal execution") #9

Open
jvoigtlaender opened this issue May 8, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jvoigtlaender
Copy link
Member

Probably somewhere around here (either in this function or at its call site):

runTestText :: ShowS -> Test -> IO (Counts, ShowS)
runTestText = performTest reportStart reportError reportFailure
where
reportStart _ = return
reportError = reportProblem "Error:" "Error in: "
reportFailure = reportProblem "Failure:" "Failure in: "
reportProblem p0 p1 _ msg ss us = return $ \rest -> us (line ++ '\n' : rest)
where
line = "### " ++ kind ++ path' ++ "\n" ++ msg
kind = if null path' then p0 else p1
path' = showPath [x | x@(Label _) <- path ss]

@jvoigtlaender
Copy link
Member Author

Probably in cases where the test suite is of the form [[Test]] (instead of [Test]), this would mean that the timeout applies to each of the inner [Test] lists as a whole, not to each of the "basic" tests therein individually. If one wanted more fine-grained behavior at that point, probably pattern-matching on the Test argument of runTestText would be needed (to unpack TestList cases from this data type: https://hackage.haskell.org/package/HUnit-1.6.2.0/docs/Test-HUnit-Base.html#t:Test).

@marcellussiegburg
Copy link
Member

A test case for this issue is: https://autotool.fmi.uni-due.de/route/einsendung/430/590 (without timeouts for each test case)

@marcellussiegburg marcellussiegburg added the enhancement New feature or request label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants