summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Łępicki <michallepicki@users.noreply.github.com>2022-02-17 10:06:26 +0100
committerJosé Valim <jose.valim@dashbit.co>2022-02-17 10:06:54 +0100
commitee6ed7558fc2fb71b6a219bbc7a3609786da6a48 (patch)
tree2b4a9793a908626446d43697c356d5133b529a6c
parentbb17204741a8c9bc30fdab92223a675b5f20a227 (diff)
downloadelixir-ee6ed7558fc2fb71b6a219bbc7a3609786da6a48.tar.gz
Update Mix.TasksTestTest for Erlang/OTP 25 (#11637)
The order in which tests get executed can be different depending on Erlang/OTP version The test failure was: 1) test logs and errors umbrella with file path (Mix.Tasks.TestTest) test/mix/tasks/test_test.exs:432 Assertion with =~ failed code: assert mix(["test", "apps/unknown_app/test"]) =~ "==> bar\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n==> foo\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n" left: "==> foo\nCompiling 1 file (.ex)\nGenerated foo app\n==> bar\nCompiling 1 file (.ex)\nGenerated bar app\n==> foo\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n==> bar\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n" right: "==> bar\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n==> foo\nPaths given to \"mix test\" did not match any directory/file: apps/unknown_app/test\n" stacktrace: test/mix/tasks/test_test.exs:436: anonymous fn/0 in Mix.Tasks.TestTest."test logs and errors umbrella with file path"/1 (elixir 1.14.0-dev) lib/file.ex:1555: File.cd!/2 test/test_helper.exs:127: MixTest.Case.in_fixture/3 test/mix/tasks/test_test.exs:433: (test)
-rw-r--r--lib/mix/test/mix/tasks/test_test.exs7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/mix/test/mix/tasks/test_test.exs b/lib/mix/test/mix/tasks/test_test.exs
index ada8e45ba..3da900a71 100644
--- a/lib/mix/test/mix/tasks/test_test.exs
+++ b/lib/mix/test/mix/tasks/test_test.exs
@@ -433,9 +433,14 @@ defmodule Mix.Tasks.TestTest do
in_fixture("umbrella_test", fn ->
# Run false positive test first so at least the code is compiled
# and we can perform more aggressive assertions later
- assert mix(["test", "apps/unknown_app/test"]) =~ """
+ output = mix(["test", "apps/unknown_app/test"])
+
+ assert output =~ """
==> bar
Paths given to "mix test" did not match any directory/file: apps/unknown_app/test
+ """
+
+ assert output =~ """
==> foo
Paths given to "mix test" did not match any directory/file: apps/unknown_app/test
"""