Skip to content

Commit c758675

Browse files
authored
Document --failed interaction with --partitions in mix test (#15563)
1 parent 77426cc commit c758675

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/mix/lib/mix/tasks/test.ex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,14 @@ defmodule Mix.Tasks.Test do
444444
the results of all partitions inside `cover/`, you can run `mix test.coverage` to
445445
get the unified report.
446446
447+
Avoid passing `--partitions` when retrying failures with `--failed` if each
448+
partition runs in its own workspace or on a separate machine, and therefore only
449+
records its own failures. Because `--partitions` splits the failed files across
450+
partitions, most partitions end up with nothing to run and silently print
451+
"There are no tests to run". Instead, run `mix test --failed` on its own so each
452+
partition re-runs everything it recorded. This does not apply when all partitions
453+
share the same list of failures.
454+
447455
## The --stale option
448456
449457
The `--stale` command line option attempts to run only the test files which

0 commit comments

Comments
 (0)