gnu: offlineimap: Update to 7.0.12.
[jackhill/guix/guix.git] / gnu / packages / patches / elixir-disable-failing-tests.patch
1 Most of these tests fail for unknown reasons when run in the chroot
2 environment of a Guix build process.
3
4 Common failures are:
5
6 * Mix.Shell.cmd() fails with error 130
7 * The git_repo fixture cannot be found
8 * Communication with spawned processes fails with EPIPE
9 * Failure to copy files
10
11
12 diff --git a/lib/elixir/test/elixir/kernel/cli_test.exs b/lib/elixir/test/elixir/kernel/cli_test.exs
13 index 3ffd56c..1232d19 100644
14 --- a/lib/elixir/test/elixir/kernel/cli_test.exs
15 +++ b/lib/elixir/test/elixir/kernel/cli_test.exs
16 @@ -39,6 +39,7 @@ end
17 defmodule Kernel.CLI.OptionParsingTest do
18 use ExUnit.Case, async: true
19
20 + @tag :skip
21 test "properly parses paths" do
22 root = fixture_path("../../..") |> to_charlist
23 list = elixir('-pa "#{root}/*" -pz "#{root}/lib/*" -e "IO.inspect(:code.get_path, limit: :infinity)"')
24 @@ -57,6 +58,7 @@ end
25 defmodule Kernel.CLI.AtExitTest do
26 use ExUnit.Case, async: true
27
28 + @tag :skip
29 test "invokes at_exit callbacks" do
30 assert elixir(fixture_path("at_exit.exs") |> to_charlist) ==
31 'goodbye cruel world with status 1\n'
32 @@ -66,6 +68,7 @@ end
33 defmodule Kernel.CLI.ErrorTest do
34 use ExUnit.Case, async: true
35
36 + @tag :skip
37 test "properly format errors" do
38 assert :string.str('** (throw) 1', elixir('-e "throw 1"')) == 0
39 assert :string.str('** (ErlangError) erlang error: 1', elixir('-e "error 1"')) == 0
40 @@ -86,6 +89,7 @@ defmodule Kernel.CLI.CompileTest do
41 {:ok, [tmp_dir_path: tmp_dir_path, beam_file_path: beam_file_path, fixture: fixture]}
42 end
43
44 + @tag :skip
45 test "compiles code", context do
46 assert elixirc('#{context[:fixture]} -o #{context[:tmp_dir_path]}') == ''
47 assert File.regular?(context[:beam_file_path])
48 @@ -96,6 +100,7 @@ defmodule Kernel.CLI.CompileTest do
49 Code.delete_path context[:tmp_dir_path]
50 end
51
52 + @tag :skip
53 test "fails on missing patterns", context do
54 output = elixirc('#{context[:fixture]} non_existing.ex -o #{context[:tmp_dir_path]}')
55 assert :string.str(output, 'non_existing.ex') > 0, "expected non_existing.ex to be mentioned"
56 @@ -103,6 +108,7 @@ defmodule Kernel.CLI.CompileTest do
57 refute File.exists?(context[:beam_file_path]), "expected the sample to not be compiled"
58 end
59
60 + @tag :skip
61 test "fails on missing write access to .beam file", context do
62 compilation_args = '#{context[:fixture]} -o #{context[:tmp_dir_path]}'
63
64 diff --git a/lib/elixir/test/elixir/kernel/dialyzer_test.exs b/lib/elixir/test/elixir/kernel/dialyzer_test.exs
65 index 801d852..40fc5bc 100644
66 --- a/lib/elixir/test/elixir/kernel/dialyzer_test.exs
67 +++ b/lib/elixir/test/elixir/kernel/dialyzer_test.exs
68 @@ -60,16 +60,19 @@ defmodule Kernel.DialyzerTest do
69 assert_dialyze_no_warnings! context
70 end
71
72 + @tag :skip
73 test "no warnings on rewrites", context do
74 copy_beam! context, Dialyzer.Rewrite
75 assert_dialyze_no_warnings! context
76 end
77
78 + @tag :skip
79 test "no warnings on raise", context do
80 copy_beam! context, Dialyzer.Raise
81 assert_dialyze_no_warnings! context
82 end
83
84 + @tag :skip
85 test "no warnings on macrocallback", context do
86 copy_beam! context, Dialyzer.Macrocallback
87 copy_beam! context, Dialyzer.Macrocallback.Impl
88 diff --git a/lib/elixir/test/elixir/system_test.exs b/lib/elixir/test/elixir/system_test.exs
89 index aafa559..0f9c178 100644
90 --- a/lib/elixir/test/elixir/system_test.exs
91 +++ b/lib/elixir/test/elixir/system_test.exs
92 @@ -53,7 +53,8 @@ defmodule SystemTest do
93 assert System.endianness in [:little, :big]
94 assert System.endianness == System.compiled_endianness
95 end
96 -
97 +
98 + @tag :skip
99 test "argv/0" do
100 list = elixir('-e "IO.inspect System.argv" -- -o opt arg1 arg2 --long-opt 10')
101 {args, _} = Code.eval_string list, []
102 diff --git a/lib/mix/test/mix/dep_test.exs b/lib/mix/test/mix/dep_test.exs
103 index fff3351..d6ed1b3 100644
104 --- a/lib/mix/test/mix/dep_test.exs
105 +++ b/lib/mix/test/mix/dep_test.exs
106 @@ -244,6 +244,7 @@ defmodule Mix.DepTest do
107 end
108 end
109
110 + @tag :skip
111 test "remote converger" do
112 deps = [{:deps_repo, "0.1.0", path: "custom/deps_repo"},
113 {:git_repo, "0.2.0", git: MixTest.Case.fixture_path("git_repo")}]
114 @@ -301,6 +302,7 @@ defmodule Mix.DepTest do
115 end
116 end
117
118 + @tag :skip
119 test "remote converger is not invoked if deps diverge" do
120 deps = [{:deps_repo, "0.1.0", path: "custom/deps_repo"},
121 {:git_repo, "0.2.0", git: MixTest.Case.fixture_path("git_repo"), only: :test}]
122 diff --git a/lib/mix/test/mix/rebar_test.exs b/lib/mix/test/mix/rebar_test.exs
123 index d2dd098..12cef15 100644
124 --- a/lib/mix/test/mix/rebar_test.exs
125 +++ b/lib/mix/test/mix/rebar_test.exs
126 @@ -120,6 +120,7 @@ defmodule Mix.RebarTest do
127 assert Enum.all?(deps, &(&1.manager == :rebar3))
128 end
129
130 + @tag :skip
131 test "Rebar overrides" do
132 Mix.Project.push(RebarOverrideAsDep)
133
134 @@ -150,6 +151,7 @@ defmodule Mix.RebarTest do
135 end
136 end
137
138 + @tag :skip
139 test "get and compile dependencies for Rebar" do
140 Mix.Project.push(RebarAsDep)
141
142 @@ -180,6 +182,7 @@ defmodule Mix.RebarTest do
143 end
144 end
145
146 + @tag :skip
147 test "get and compile dependencies for rebar3" do
148 Mix.Project.push(Rebar3AsDep)
149
150 diff --git a/lib/mix/test/mix/shell/io_test.exs b/lib/mix/test/mix/shell/io_test.exs
151 index 9bfb6b4..d982ef3 100644
152 --- a/lib/mix/test/mix/shell/io_test.exs
153 +++ b/lib/mix/test/mix/shell/io_test.exs
154 @@ -29,6 +29,7 @@ defmodule Mix.Shell.IOTest do
155 assert capture_io("", fn -> refute yes?("Ok?") end)
156 end
157
158 + @tag :skip
159 test "runs a given command" do
160 assert capture_io("", fn -> assert cmd("echo hello") == 0 end) == "hello\n"
161
162 diff --git a/lib/mix/test/mix/shell/quiet_test.exs b/lib/mix/test/mix/shell/quiet_test.exs
163 index 626429b..99fab35 100644
164 --- a/lib/mix/test/mix/shell/quiet_test.exs
165 +++ b/lib/mix/test/mix/shell/quiet_test.exs
166 @@ -29,6 +29,7 @@ defmodule Mix.Shell.QuietTest do
167 assert capture_io("", fn -> refute yes?("Ok?") end)
168 end
169
170 + @tag :skip
171 test "runs a given command" do
172 assert capture_io("", fn -> assert cmd("echo hello") == 0 end) == ""
173
174 diff --git a/lib/mix/test/mix/tasks/cmd_test.exs b/lib/mix/test/mix/tasks/cmd_test.exs
175 index db4bf06..4d441f7 100644
176 --- a/lib/mix/test/mix/tasks/cmd_test.exs
177 +++ b/lib/mix/test/mix/tasks/cmd_test.exs
178 @@ -3,6 +3,7 @@ Code.require_file "../../test_helper.exs", __DIR__
179 defmodule Mix.Tasks.CmdTest do
180 use MixTest.Case
181
182 + @tag :skip
183 test "runs the command for each app" do
184 in_fixture "umbrella_dep/deps/umbrella", fn ->
185 Mix.Project.in_project(:umbrella, ".", fn _ ->
186 diff --git a/lib/mix/test/mix/tasks/deps.tree_test.exs b/lib/mix/test/mix/tasks/deps.tree_test.exs
187 index 4f09ff3..c371997 100644
188 --- a/lib/mix/test/mix/tasks/deps.tree_test.exs
189 +++ b/lib/mix/test/mix/tasks/deps.tree_test.exs
190 @@ -29,6 +29,7 @@ defmodule Mix.Tasks.Deps.TreeTest do
191 end
192 end
193
194 + @tag :skip
195 test "shows the dependency tree", context do
196 Mix.Project.push ConvergedDepsApp
197
198 @@ -109,6 +110,7 @@ defmodule Mix.Tasks.Deps.TreeTest do
199 end
200 end
201
202 + @tag :skip
203 test "shows the dependency tree in DOT graph format", context do
204 Mix.Project.push ConvergedDepsApp
205
206 diff --git a/lib/mix/test/mix/tasks/deps_test.exs b/lib/mix/test/mix/tasks/deps_test.exs
207 index b061777..cc45cf8 100644
208 --- a/lib/mix/test/mix/tasks/deps_test.exs
209 +++ b/lib/mix/test/mix/tasks/deps_test.exs
210 @@ -96,6 +96,7 @@
211 end
212 end
213
214 + @tag :skip
215 test "prints list of dependencies and their lock status" do
216 Mix.Project.push DepsApp
217
218 @@ -409,6 +409,7 @@ defmodule Mix.Tasks.DepsTest do
219 end
220 end
221
222 + @tag :skip
223 test "fails on diverged dependencies by requirement" do
224 Mix.Project.push ConvergedDepsApp
225
226 @@ -440,6 +441,7 @@ defmodule Mix.Tasks.DepsTest do
227 end
228 end
229
230 + @tag :skip
231 test "fails on diverged dependencies even when optional" do
232 Mix.Project.push ConvergedDepsApp
233
234 @@ -469,6 +471,7 @@ defmodule Mix.Tasks.DepsTest do
235 end
236 end
237
238 + @tag :skip
239 test "works with converged dependencies" do
240 Mix.Project.push ConvergedDepsApp
241
242 @@ -491,6 +494,7 @@ defmodule Mix.Tasks.DepsTest do
243 purge [GitRepo, GitRepo.Mixfile]
244 end
245
246 + @tag :skip
247 test "works with overridden dependencies" do
248 Mix.Project.push OverriddenDepsApp
249
250 diff --git a/lib/mix/test/mix/umbrella_test.exs b/lib/mix/test/mix/umbrella_test.exs
251 index 69f9428..406668a 100644
252 --- a/lib/mix/test/mix/umbrella_test.exs
253 +++ b/lib/mix/test/mix/umbrella_test.exs
254 @@ -98,6 +98,7 @@ defmodule Mix.UmbrellaTest do
255 end
256 end
257
258 + @tag :skip
259 test "loads umbrella child dependencies in all environments" do
260 in_fixture "umbrella_dep/deps/umbrella", fn ->
261 Mix.Project.in_project :umbrella, ".", fn _ ->