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

Non-zero exit code on missing #15

Closed
TheZoq2 opened this issue Jun 13, 2023 · 1 comment · Fixed by #16
Closed

Non-zero exit code on missing #15

TheZoq2 opened this issue Jun 13, 2023 · 1 comment · Fixed by #16

Comments

@TheZoq2
Copy link
Contributor

TheZoq2 commented Jun 13, 2023

Right now, it seems like only failing tests get a non-zero exit code. However, when running in pre-commit hooks or CI, I would like missing tests to also give a non-zero exit code since it likely means I either forgot to add an expect file, or forgot to check if the missing tests are fine

@rachitnigam
Copy link
Owner

The right way to handle this is probably making the exit code depend on the value of the -o filter. If -o fail is provided, then the exit code is zero if we only have missing files. Otherwise, it is the number of missing tests and the number of failed tests.

This can be done by changing the execute_and_summarize method to return a tuple with the failing tests and missing tests and, selecting the right one based on the value of -o filter. @TheZoq2 let me know if you want to take a shot at this and need help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants