-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Skip --cover
when --max-failures
is reached
#14402
Comments
Just edited the issue to add a few more details. Not sure if this behavior makes sense but I'd be happy to provide more information if needed or to attempt to enable it if accepted. |
I am afraid this won't be trivial. From the point of view of coverage, the failure due to |
I see. This command is used in a CI check, which is required to pass before merges. The coverage report is generated after each partition run and then compiled using The rationale behind adding the However, this is a minor issue for this specific scenario and not a blocker whatsoever. If it's not trivial and would add unnecessary coupling between two levels of the system, I’m certain there are other ways to achieve what I’m aiming for. Thanks for the response! |
Thank you. I will go ahead and close this then, as it is indeed non-straight-forward. |
Elixir and Erlang/OTP versions
Erlang/OTP 25 [erts-13.2.2.12] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit:ns]
Elixir 1.18.1 (compiled with Erlang/OTP 25)
Operating system
Ubuntu 22.04.5 LTS
Current behavior
I've recently added
--max-failures 1
to the following command:MIX_TEST_PARTITION=1 mix test --cover --warnings-as-errors --raise --partitions 3 --max-failures 1
The current behavior when the test fails is to stop the suite (as intended), but the coverage report still runs after the abortion. This makes the coverage report incomplete (only showing 0.9% coverage when ~44% was expected for this partition).
Stacktrace:
Expected behavior
The expected behavior was for the coverage analysis report to only run when the test suite/partition is not aborted, since I'm trying to stop the test suite at the first sign of failure.
When running the coverage report on an aborted test partition, coverage metrics would be incomplete, possibly making them irrelevant at that stage. Also, with long coverage report (2k~ lines), I'm trying to avoid printing this report in the console if possible.
The text was updated successfully, but these errors were encountered: