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

use rc 0 when CTest has failing tests #3

Merged
merged 1 commit into from
Apr 19, 2018
Merged

Conversation

dirk-thomas
Copy link
Member

While I couldn't find any documentation about it CTest returns 8 when tests are failing. Since tests failures should not be considered an "error" in terms of invoking the test verb that case is handled differently. This unifies the return value semantic across other types.

Before the failing bridge test made the build fail: https://ci.ros2.org/view/colcon/job/colcon_ci_packaging_linux-aarch64/5/
After the failing bridge test make the build only unstable: https://ci.ros2.org/view/colcon/job/colcon_ci_packaging_linux-aarch64/7/

@dirk-thomas dirk-thomas added this to the 0.1.2 milestone Apr 18, 2018
@dirk-thomas dirk-thomas self-assigned this Apr 18, 2018
@dirk-thomas dirk-thomas added the review Waiting for review (Kanban column) label Apr 18, 2018
@mikaelarguedas
Copy link
Contributor

For future reference: there is no documentation about ctest return codes anywhere. This is ticketed at https://gitlab.kitware.com/cmake/cmake/issues/16151

@mikaelarguedas
Copy link
Contributor

I remember (couldnt find the discussion so far) user requests in the past to have the option of making builds fail on test failure. Can this override of the return code be made optional so that this can be toggled when invoking colcon test?

@dirk-thomas
Copy link
Member Author

I remember (couldnt find the discussion so far) user requests in the past to have the option of making builds fail on test failure. Can this override of the return code be made optional so that this can be toggled when invoking colcon test?

I guess you are remember this discussion: ros-infrastructure/ros_buildfarm#367 (comment)

At the time we settled on using the test result verb to get an error code for failing tests.

@mikaelarguedas
Copy link
Contributor

Thanks for the pointer, yeah I think that;s the discussion I was thinking of.

In this case "colcon test" isn't able to perform the build or install steps, is that right ?
So having an opt-in option on the "test" verb to return an error code on test failure may make more sense here as there is less ambiguity about what failed

@dirk-thomas
Copy link
Member Author

In this case "colcon test" isn't able to perform the build or install steps, is that right ?

Correct, build builds and installs, test only runs the tests.

So having an opt-in option on the "test" verb to return an error code on test failure may make more sense here as there is less ambiguity about what failed

Sure, such an option can be added as a new feature.

I would keep that separate from this patch though. This patch addresses the problem which currently fails our CI builds and is therefore blocking the deployment of colcon on CI.

@mikaelarguedas
Copy link
Contributor

Feature addition ticketed at colcon/colcon-core#21

Copy link
Contributor

@mikaelarguedas mikaelarguedas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dirk-thomas dirk-thomas merged commit 77ff81b into master Apr 19, 2018
@dirk-thomas dirk-thomas removed the review Waiting for review (Kanban column) label Apr 19, 2018
@dirk-thomas dirk-thomas deleted the rc_failing_tests branch April 19, 2018 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

None yet

2 participants