Repository navigation
Conversation
List recorded failures without loading or running tests. Keep each umbrella app’s failure manifest scoped to its own test run. Assisted-by: Codex:GPT-6
Member
|
We already have something like --dry-run. Could we use it instead? The downside is that it still load test files but it also combines with all existing options. |
Contributor
Author
|
@josevalim yes! A |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Codex GPT-6.2-Sol wrote the code below. I reviewed it and wrote the PR description
Adds a new
mix test.failurescommand that prints out the filepath, test name, and test module for the failed tests thatmix test --failedwould run. Example:Open questions
mix test.failurescould also bemix test.failedormix test --list-failuresor something else. I'm open for suggestions and have no strong preferences.ExUnit.FailuresManifestwhich currently only tracks theExUnit.test_id()in a{module, test_name :: atom} => test_file :: Path.t()map and doesn't contain the line number of the test. This could happen now, in a later iteration, or not at all. I'm happy with any of these options.Rationale
I have wanted such a command for a while (4+ years) because if I have a lot of tests, finding the test paths of the failing tests would require me to either scroll through a lot of test output or run
mix test --failedand hope that they fail again because otherwise only a green dot appears and they are gone which makes debugging flakey tests difficult, which having a dedicated "hey, which tests failed again?" command makes this simpler.Also, now I can tell my LLM "Just run this command and fix the failing tests" instead of having to copy&paste the test output into the terminal.
Small bugfix
The test code also fixes a small bug where umbrella apps would write their failure manifests into the same path and later app tests would use the old manifest of an earlier app. Now, each umbrella app writes the manifests into its own path.