-
Notifications
You must be signed in to change notification settings - Fork 22
Proposal: make ament test
return non-zero on test failure
#140
Comments
For any kind of automation it is crucial to distinguish failures to run something vs. some tests returning non-zero return codes. In my opinion this it is a strict requirement for our tools to satisfy this requirement. With the proposal it is not possible anymore to identify if the invocation of On the other hand with the current state your use case is easily possible by invoking two two commands. There is an alternative which continues meeting the requirement stated above as well as your desire to get a non-zero return code for any kind of failure. The |
Ah, that sounds like the perfect compromise! How about this change instead: change the default behavior of |
I am not sure if this is relevant here, but I do remember that we decided to ignore the return code in the first place because all our successful builds with test failures were marked as failed on the buildfarm (e.g. EDIT: duplicate of previous comment |
👍 I don't mind what the default behavior is as long as the mandatory use cases are still possible. |
Fixed by #141. |
Following discussions on other issues (e.g., #139 and ros-infrastructure/ros_buildfarm#367), I'd like to propose a change in the behavior of
ament
: Makeament test
return non-zero if:At present,
ament test
returns non-zero only for the first two conditions, but not the third.Rationale:
ament test
is a step that aggregates underlying steps and as such it should follow the common pattern of ORing together the return codes of those underlying steps to produce its own return code.Pro:
ament test_results
(this command does return non-zero if any of the results include test failures).Con:
(Note that you can still distinguish build failure from test failure by run
ament build
andament test
separately.)My opinion is that the benefits of the pro outweigh the costs of the con. Thoughts?
p.s. I'm proposing this change only for
ament
, which is a new tool that we can fairly freely modify. The same change could in principle be made tocatkin
, but there seems to be risk of disruption in doing that.The text was updated successfully, but these errors were encountered: