Skip to content

Commit e3cd399

Browse files
authored
Fix preloading modules in mix test --slowest-modules=N (#14811)
1 parent 96fe37e commit e3cd399

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,14 @@ defmodule Mix.Tasks.Test do
614614
# before requiring test_helper.exs so that the configuration is
615615
# available in test_helper.exs
616616
Mix.shell().print_app()
617-
app_start_args = if opts[:slowest], do: ["--preload-modules" | args], else: args
617+
618+
app_start_args =
619+
if opts[:slowest] || opts[:slowest_modules] do
620+
["--preload-modules" | args]
621+
else
622+
args
623+
end
624+
618625
Mix.Task.run("app.start", app_start_args)
619626

620627
# The test helper may change the Mix.shell(), so revert it whenever we raise and after suite

0 commit comments

Comments
 (0)