@@ -21,12 +21,12 @@ defmodule Mix.Compilers.Test do
21
21
It expects all of the test patterns, the test files that were matched for the
22
22
test patterns, the test paths, and the opts from the test task.
23
23
"""
24
- def require_and_run ( test_patterns , matched_test_files , test_paths , compile_path , opts ) do
24
+ def require_and_run ( test_patterns , matched_test_files , test_paths , opts ) do
25
25
stale = opts [ :stale ]
26
26
27
27
{ test_files_to_run , stale_manifest_pid , parallel_require_callbacks } =
28
28
if stale do
29
- set_up_stale ( matched_test_files , test_paths , compile_path , opts )
29
+ set_up_stale ( matched_test_files , test_paths , opts )
30
30
else
31
31
{ matched_test_files , nil , [ ] }
32
32
end
@@ -58,7 +58,7 @@ defmodule Mix.Compilers.Test do
58
58
end
59
59
end
60
60
61
- defp set_up_stale ( matched_test_files , test_paths , compile_path , opts ) do
61
+ defp set_up_stale ( matched_test_files , test_paths , opts ) do
62
62
manifest = manifest ( )
63
63
modified = Mix.Utils . last_modified ( manifest )
64
64
all_sources = read_manifest ( )
@@ -95,20 +95,17 @@ defmodule Mix.Compilers.Test do
95
95
96
96
test_files_to_run =
97
97
sources
98
- |> tests_with_changed_references ( compile_path )
98
+ |> tests_with_changed_references ( )
99
99
|> MapSet . union ( stale )
100
100
|> MapSet . to_list ( )
101
101
102
102
if test_files_to_run == [ ] do
103
103
write_manifest ( sources )
104
-
105
104
{ [ ] , nil , nil }
106
105
else
107
106
{ :ok , pid } = Agent . start_link ( fn -> sources end )
108
-
109
107
cwd = File . cwd! ( )
110
108
parallel_require_callbacks = [ each_module: & each_module ( pid , cwd , & 1 , & 2 , & 3 ) ]
111
-
112
109
{ test_files_to_run , pid , parallel_require_callbacks }
113
110
end
114
111
end
@@ -191,13 +188,13 @@ defmodule Mix.Compilers.Test do
191
188
192
189
## Test changed dependency resolution
193
190
194
- defp tests_with_changed_references ( test_sources , compile_path ) do
191
+ defp tests_with_changed_references ( test_sources ) do
195
192
test_manifest = manifest ( )
196
193
[ elixir_manifest ] = Mix.Tasks.Compile.Elixir . manifests ( )
197
194
198
195
if Mix.Utils . stale? ( [ elixir_manifest ] , [ test_manifest ] ) do
199
196
elixir_manifest_entries =
200
- CE . read_manifest ( elixir_manifest , compile_path )
197
+ CE . read_manifest ( elixir_manifest , Mix.Project . compile_path ( ) )
201
198
|> Enum . group_by ( & elem ( & 1 , 0 ) )
202
199
203
200
stale_modules =
0 commit comments