test command does not return failure code #891
Comments
Also I think the new behaviour is in contradiction of the documentation:
|
But the point of #850 was that if a command doesn't fail, it should allow other commands to continue. Reverting that revision would lose that goal. Probably what should happen is a failure should terminate the command processing, but a success should allow additional commands to proceed. This also relates to #869 where it seems reasonable that a failed upload should have similar characteristics - short-circuit and exit with a non-zero status code on failure, but continue on success. |
I welcome someone to put together a pull request. |
About #850 with the current behaviour running
will still build the packages with the test failing. The previous behaviour the packages where not build as they first step failed. For me the previous behaviour is better as it will avoid the build of broken packages. Don't know if the right solution is to return the exit code correctly for the test command and keep the current behaviour for others. But that's one idea. |
OK, I will work on a PR that will stop only on failure. |
When test fails, it should not continue to run other commands. Fixes pypa#891
Since version 30.2.1, when running the command "python setup.py test" if the tests fails, the exit code is always 0.
I tracked the change of behavior to 53b47e1
We found the issue because our CI is no more reporting failure because we run the test with this command.
About #850, I think it is an expected behavior that if a command in a list fails that the following are not executed. So I think the revision should be reverted.
The text was updated successfully, but these errors were encountered: