From 21ff94de1f5df137f8bbb061ab0d6979831daac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 11 Sep 2015 11:48:11 +0200 Subject: [PATCH] Only warn if no test pattern matches due to umbrella apps --- lib/mix/lib/mix/tasks/test.ex | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/mix/lib/mix/tasks/test.ex b/lib/mix/lib/mix/tasks/test.ex index 03d9955d74..9fb33edaaf 100644 --- a/lib/mix/lib/mix/tasks/test.ex +++ b/lib/mix/lib/mix/tasks/test.ex @@ -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