-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Revise exit codes for dotnet test
#47550
Comments
dotnet test
dotnet test
This seems to me like the more logical choice and also the easiest to understand as final user. |
Now, if at least 1 executable returned non-zero exit code, the exit code will be a generic failure.
I also agree with @Evangelink, this seems like the most logical. |
I agree as well! |
Another question here is if we should explicitly print out the exit code in case of failure, with a link to https://learn.microsoft.com/en-us/dotnet/core/testing/microsoft-testing-platform-exit-codes (probably via aka.ms link) |
I like the idea of the aka.ms link to exit code doc page. |
Just throwing ideas here 😄
For the new
dotnet test
experience for MTP, we should revise what final exit code ofdotnet test
should.dotnet test
will be invoking test executables. Each executable may exit with a different exit code.See https://learn.microsoft.com/dotnet/core/testing/microsoft-testing-platform-exit-codes
Should we define some order of importance for exit codes, and return the exit code that's "most" important?
I would love if MTP exit codes were powers of two,
dotnet test
can simply bitwise-OR the values together to be able to more accurately model the exit codes, but that's currently not the case.Another question that arises is, what if MTP in future adds a new exit code that SDK doesn't know about (yet)? What should we do?
Or, should we simply keep using exit code 1, as it's today, to denote "generic failure"?
Another idea is to check, if all executables are exiting with the same exit code,
dotnet test
should use that. Otherwise,dotnet test
can exit with 1 denoting generic failure.Related to #45927
The text was updated successfully, but these errors were encountered: