Only warn if no test pattern matches due to umbrella apps

This commit is contained in:
José Valim
2015-09-11 11:48:11 +02:00
parent 6a1c7fa375
commit 21ff94de1f
+7 -8
View File
@@ -189,18 +189,17 @@ defmodule Mix.Tasks.Test do
case Mix.Utils.extract_files(test_files, test_pattern) do
[] ->
Mix.raise "Test pattern did not match any file, " <>
"the files given to compile: " <> Enum.join(files, ", ")
Mix.shell.error "Test patterns did not match any file: " <> Enum.join(files, ", ")
test_files ->
_ = Kernel.ParallelRequire.files(test_files)
end
# Run the test suite, coverage tools and register an exit hook
%{failures: failures} = ExUnit.run
if cover, do: cover.()
# Run the test suite, coverage tools and register an exit hook
%{failures: failures} = ExUnit.run
if cover, do: cover.()
System.at_exit fn _ ->
if failures > 0, do: exit({:shutdown, 1})
System.at_exit fn _ ->
if failures > 0, do: exit({:shutdown, 1})
end
end
end