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

Different exit codes to indicate particular failures #412

Merged
merged 4 commits into from
Jun 30, 2019

Conversation

sasivishnu
Copy link
Contributor

@sasivishnu sasivishnu commented May 15, 2019

Closes #388

Exit Codes:

  • 0 : Success

  • 1 : Test failed (based on dotnet test)

  • 2 : Coverage percentage is below any threshold type

  • 3 : Test failed and Coverage percentage is below any threshold type

  • 101: General exception during coverlet process

  • 102: Missing options or invalid arguments for coverlet process

Attached the output screenshot for all the above scenarios.
ExitCodes.zip

For any exception related code, we can use values starting from 101. We can use 1-100 for any of custom failures from the process. I didn't wanted to go negative for exceptions since if someone is currently using exitcode > 0 to determine error cases in their script, then we will be breaking them.

@MarcoRossignoli
Copy link
Collaborator

Thanks I'm OOF at the moment I'll take a look ASAP

@sasivishnu
Copy link
Contributor Author

Committed changes to PR as per code review changes.

@MarcoRossignoli
Copy link
Collaborator

I'll take a look this evening after dinner, thank's!

@MarcoRossignoli
Copy link
Collaborator

@sasivishnu have you retested with flags?Is it ok?

@MarcoRossignoli
Copy link
Collaborator

PS. We have to remember after this PR and #422 merge we'll need to update console docs, this lead to increase minor ver as new feature.

@sasivishnu
Copy link
Contributor Author

@sasivishnu have you retested with flags?Is it ok?

Yes, everything is working fine.

… initial assignment.

Co-Authored-By: Marco Rossignoli <marco.rossignoli@gmail.com>
@MarcoRossignoli
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MarcoRossignoli MarcoRossignoli added the enhancement General enhancement request label Jun 11, 2019
@MarcoRossignoli
Copy link
Collaborator

MarcoRossignoli commented Jun 12, 2019

@sasivishnu until @tonerdo has got some time to review could you also update .net tool guide with this new feature? https://github.com/tonerdo/coverlet/blob/master/Documentation/GlobalTool.md

@sasivishnu
Copy link
Contributor Author

@sasivishnu until @tonerdo has got some time to review could you also update .net tool guide with this new feature? https://github.com/tonerdo/coverlet/blob/master/Documentation/GlobalTool.md

Yeah, sure... I was just waiting for @tonerdo comments on exit codes for Exceptions. Once its confirmed, then I thought to update the doc.

Anyway, I will update the doc and commit it with exit codes as of now. If any changes, then I will update the doc also.

@sasivishnu
Copy link
Contributor Author

@sasivishnu until @tonerdo has got some time to review could you also update .net tool guide with this new feature? https://github.com/tonerdo/coverlet/blob/master/Documentation/GlobalTool.md

Yeah, sure... I was just waiting for @tonerdo comments on exit codes for Exceptions. Once its confirmed, then I thought to update the doc.

Anyway, I will update the doc and commit it with exit codes as of now. If any changes, then I will update the doc also.

@MarcoRossignoli Seems like this pull request branch was created before the commit of https://github.com/tonerdo/coverlet/blob/master/Documentation/GlobalTool.md

I will create separate pull request for updating doc.

@MarcoRossignoli
Copy link
Collaborator

Ok no worries

@MarcoRossignoli
Copy link
Collaborator

@tonerdo can we merge?

@sasivishnu
Copy link
Contributor Author

@MarcoRossignoli updated doc for this change #478

@tonerdo tonerdo merged commit 8cb31cb into coverlet-coverage:master Jun 30, 2019
@sasivishnu sasivishnu deleted the ExitCode-Failures branch June 30, 2019 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement General enhancement request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exit code for coverlet should communicate different failures
3 participants