Modify ↓
Opened 14 years ago
Last modified 10 years ago
#623 new enhancement
Add an onerror="ignore" option to the attach command.
Reported by: | Stefan Ruppert <stefan.ruppert@…> | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 0.6.1 |
Component: | General | Version: | 0.6b2 |
Keywords: | Cc: | ||
Operating System: | Linux |
Description
Is it possilbe to extend the attach command with an attribute onerror="ignore"?
I want to attach a tar archive of log files of all failed tests. If no tests failed I don't want to attach an empty tar archive!
Attachments (0)
Note: See
TracTickets for help on using
tickets.
(Copied in my alternative implementation notes from the mailing list:)
The common way of handling such a use case is to add the attach into its own step after running your test step, and then ignore any errors for this step - that way you wrap the command in an "ignore" handler. I'm a bit hesitant about adding such features at command-level, but rather think that if there was limitations at step-level it should be resolved there for the benefit of running any command. As a suggestion it may be that we implement an onerror="strip" type argument for step that just completely ignores the step if errors occur - nothing gets reported.
If you then add your attachment in such a step you can first try to attach and then echo a line like "Failures uploaded".