Skip to content

Commit cfa3bb7

Browse files
wojtekmachjosevalim
authored andcommitted
Fix preloading modules in mix test --slowest-modules=N (#14811)
1 parent 195a4cf commit cfa3bb7

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
@@ -603,7 +603,14 @@ defmodule Mix.Tasks.Test do
603603
# before requiring test_helper.exs so that the configuration is
604604
# available in test_helper.exs
605605
Mix.shell().print_app()
606-
app_start_args = if opts[:slowest], do: ["--preload-modules" | args], else: args
606+
607+
app_start_args =
608+
if opts[:slowest] || opts[:slowest_modules] do
609+
["--preload-modules" | args]
610+
else
611+
args
612+
end
613+
607614
Mix.Task.run("app.start", app_start_args)
608615

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

0 commit comments

Comments
 (0)