-
-
Notifications
You must be signed in to change notification settings - Fork 20
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 abort-on-error option #63
base: master
Are you sure you want to change the base?
Conversation
Thank you for the PR! Though it seems it doesn't work expectedly, it'd be preferable to have such a "fail fast" option. |
Is this different from the existing |
|
Sorry, what do you mean? Maybe I have to put the option in other place? 💭 |
No, no, there's an unmatched closed paren, for the first place, and it runs all tests anyway since |
Interesting, I'll fix it, running a suite locally was indeed stopping the testing |
Hmm, the proposal is great, but it feels like a rush job (I know I am meddling) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I too hope this feature will be merged.
I commented because I came up with a few improvements.
(let ((quit-on-failure-symbol (intern (string :*rove-quit-on-failure*) :cl-user))) | ||
(and (boundp quit-on-failure-symbol) | ||
(symbol-value quit-on-failure-symbol)))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this be better done outside the rove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a way to configure before loading Rove.
It is already done for *debug-on-error*
, so I suppose @Sasanidas refers to it.
You can set (setf *rove-debug-on-error* t)
in ~/.roswell/init.lisp
without loading Rove whenever you run Lisp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed.
I was thinking about the wildness of using symbols from the cl-user package.
@@ -37,6 +38,11 @@ | |||
:desc "Raise an error while testing.")) | |||
(return nil)))) | |||
(funcall function))))) | |||
(when (and *quit-on-failure* | |||
(not (passedp (stats-context *stats*)))) | |||
(format t "Failed test, with the abort option enabled. ~%") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears that rove uses repoter to abstract the output.
(when (and *quit-on-failure* | ||
(not (passedp (stats-context *stats*)))) | ||
(format t "Failed test, with the abort option enabled. ~%") | ||
(abort)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about sending out some kind of signal and having rove:run / rove:run-test catch it?
I think sometimes there is the possibility that there is a huge testing system and that waiting to all test to finish are not that desirable. So it's easier to stop on an error and focus on that one, instead of waiting for the entire error suite to finish.
I just implemented the bare-bones option, but still think that when aborting the execution, a more detailed explanation maybe more suitable.