diff options
author | Daniel Isaksen <d@duniel.no> | 2019-06-07 23:08:50 +0000 |
---|---|---|
committer | Kevin Daudt <kdaudt@alpinelinux.org> | 2019-06-14 19:39:20 +0000 |
commit | 0c6039f2d70f25483713035cb02797d4d6ab1882 (patch) | |
tree | 0f3096a2bc5c2647da8678295ea80184224ce7f7 | |
parent | 49f9fa8fd4f0078d4499515d11043d6d40abb40c (diff) | |
download | aports-0c6039f2d70f25483713035cb02797d4d6ab1882.tar.bz2 aports-0c6039f2d70f25483713035cb02797d4d6ab1882.tar.xz |
community/elixir: bump to 1.8.2 and rebuild against OTP R22
Signed-off-by: Daniel Isaksen <d@duniel.no>
Closes GH-8629
-rw-r--r-- | community/elixir/APKBUILD | 8 | ||||
-rw-r--r-- | community/elixir/fix-flaky-mix-test-leak.patch | 217 |
2 files changed, 222 insertions, 3 deletions
diff --git a/community/elixir/APKBUILD b/community/elixir/APKBUILD index 0ce5052c62..97989a1aca 100644 --- a/community/elixir/APKBUILD +++ b/community/elixir/APKBUILD @@ -1,6 +1,6 @@ # Maintainer: Marlus Saraiva <marlus.saraiva@gmail.com> pkgname=elixir -pkgver=1.8.1 +pkgver=1.8.2 pkgrel=0 pkgdesc="Elixir is a dynamic, functional language designed for building scalable and maintainable applications" url="http://elixir-lang.org" @@ -10,7 +10,8 @@ depends="erlang erlang-inets erlang-ssl erlang-public-key erlang-asn1 erlang-sasl erlang-erl-interface erlang-dev erlang-dialyzer erlang-erts erlang-hipe" makedepends="erlang-crypto erlang-syntax-tools erlang-parsetools erlang-eunit erlang-tools" subpackages="$pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/elixir-lang/elixir/archive/v$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/elixir-lang/elixir/archive/v$pkgver.tar.gz + fix-flaky-mix-test-leak.patch" builddir="$srcdir/$pkgname-$pkgver" case "$CARCH" in @@ -33,4 +34,5 @@ package() { make DESTDIR="$pkgdir" PREFIX=/usr install } -sha512sums="114970707505cbf89f8fa55d5c54989dded7feb39cb3674e88f64e19f1a0680086ae49c856fb76fb7eaf0142fa0a0b81b1d5b9570825e05f083a9c580b0ca017 elixir-1.8.1.tar.gz" +sha512sums="0b30fec1cdc85884c1076e10c6e594b1855a325ae8c070bb3bd9af11998b21b273d7185b59954183b1fd525a2852a61be9c2eec54d9adb8ec1fdeb0200714857 elixir-1.8.2.tar.gz +b3936c0cc88eaf3b754d751f859353fb54cfb970f13b647b90938fd449e588cca5610c14e99171d702d4755b894dd1701fffd246d8c28a03cf9128fe270aa72e fix-flaky-mix-test-leak.patch" diff --git a/community/elixir/fix-flaky-mix-test-leak.patch b/community/elixir/fix-flaky-mix-test-leak.patch new file mode 100644 index 0000000000..bf667dd5ae --- /dev/null +++ b/community/elixir/fix-flaky-mix-test-leak.patch @@ -0,0 +1,217 @@ +From 2548965a1ee3cb92a10fbd77fb0e951e455f3249 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@plataformatec.com.br> +Date: Thu, 13 Jun 2019 13:49:47 +0200 +Subject: [PATCH] Ensure started/loaded apps do not leak between Mix tests, + closes #9137 + +--- + lib/mix/test/mix/tasks/app.start_test.exs | 10 --------- + lib/mix/test/mix/tasks/profile.cprof_test.exs | 2 -- + lib/mix/test/mix/tasks/profile.eprof_test.exs | 2 -- + lib/mix/test/mix/tasks/profile.fprof_test.exs | 2 -- + lib/mix/test/mix/tasks/run_test.exs | 2 -- + lib/mix/test/mix/umbrella_test.exs | 2 -- + lib/mix/test/test_helper.exs | 21 +++++++------------ + 7 files changed, 8 insertions(+), 33 deletions(-) + +diff --git a/lib/mix/test/mix/tasks/app.start_test.exs b/lib/mix/test/mix/tasks/app.start_test.exs +index a7565733f4..7ae3b89e2a 100644 +--- a/lib/mix/test/mix/tasks/app.start_test.exs ++++ b/lib/mix/test/mix/tasks/app.start_test.exs +@@ -19,7 +19,6 @@ defmodule Mix.Tasks.App.StartTest do + end + end + +- @tag apps: [:app_start_sample] + test "compiles and starts the project" do + Mix.Project.push(AppStartSample) + +@@ -50,7 +49,6 @@ defmodule Mix.Tasks.App.StartTest do + end) + end + +- @tag apps: [:app_start_sample, :app_loaded_sample] + test "start checks for invalid configuration", context do + Mix.Project.push(AppStartSample) + +@@ -77,7 +75,6 @@ defmodule Mix.Tasks.App.StartTest do + end) + end + +- @tag apps: [:error] + test "validates Elixir version requirement", context do + Mix.ProjectStack.post_config(elixir: "~> ~> 0.8.1") + Mix.Project.push(WrongElixirProject) +@@ -89,7 +86,6 @@ defmodule Mix.Tasks.App.StartTest do + end) + end + +- @tag apps: [:error] + test "validates the Elixir version with requirement", context do + Mix.Project.push(WrongElixirProject) + +@@ -100,7 +96,6 @@ defmodule Mix.Tasks.App.StartTest do + end) + end + +- @tag apps: [:error] + test "does not validate the Elixir version with requirement when disabled", context do + Mix.Project.push(WrongElixirProject) + +@@ -136,7 +131,6 @@ defmodule Mix.Tasks.App.StartTest do + def start(_type, return), do: return + end + +- @tag apps: [:return_sample] + test "start points to report on error", context do + Mix.Project.push(ReturnSample) + +@@ -155,7 +149,6 @@ defmodule Mix.Tasks.App.StartTest do + end) + end + +- @tag apps: [:return_sample] + test "start points to report on exception error", context do + Mix.Project.push(ReturnSample) + +@@ -177,7 +170,6 @@ defmodule Mix.Tasks.App.StartTest do + end) + end + +- @tag apps: [:return_sample] + test "start points to report on bad return", context do + Mix.Project.push(ReturnSample) + +@@ -212,7 +204,6 @@ defmodule Mix.Tasks.App.StartTest do + def start(_type, reason), do: exit(reason) + end + +- @tag apps: [:exit_sample] + test "start points to report on exit", context do + Mix.Project.push(ExitSample) + +@@ -230,7 +221,6 @@ defmodule Mix.Tasks.App.StartTest do + end) + end + +- @tag apps: [:exit_sample] + test "start points to report on normal exit", context do + Mix.Project.push(ExitSample) + +diff --git a/lib/mix/test/mix/tasks/profile.cprof_test.exs b/lib/mix/test/mix/tasks/profile.cprof_test.exs +index 30e432f63e..084b3a8d0e 100644 +--- a/lib/mix/test/mix/tasks/profile.cprof_test.exs ++++ b/lib/mix/test/mix/tasks/profile.cprof_test.exs +@@ -4,10 +4,8 @@ defmodule Mix.Tasks.Profile.CprofTest do + use MixTest.Case + + import ExUnit.CaptureIO +- + alias Mix.Tasks.Profile.Cprof + +- @moduletag apps: [:sample] + @expr "Enum.each(1..5, &String.Chars.Integer.to_string/1)" + + test "profiles evaluated expression", context do +diff --git a/lib/mix/test/mix/tasks/profile.eprof_test.exs b/lib/mix/test/mix/tasks/profile.eprof_test.exs +index adc86b5a62..19e46856e3 100644 +--- a/lib/mix/test/mix/tasks/profile.eprof_test.exs ++++ b/lib/mix/test/mix/tasks/profile.eprof_test.exs +@@ -4,10 +4,8 @@ defmodule Mix.Tasks.Profile.EprofTest do + use MixTest.Case + + import ExUnit.CaptureIO +- + alias Mix.Tasks.Profile.Eprof + +- @moduletag apps: [:sample] + @expr "Enum.each(1..5, &String.Chars.Integer.to_string/1)" + + test "profiles evaluated expression", context do +diff --git a/lib/mix/test/mix/tasks/profile.fprof_test.exs b/lib/mix/test/mix/tasks/profile.fprof_test.exs +index 8f84077e7b..d40717a256 100644 +--- a/lib/mix/test/mix/tasks/profile.fprof_test.exs ++++ b/lib/mix/test/mix/tasks/profile.fprof_test.exs +@@ -4,9 +4,7 @@ defmodule Mix.Tasks.Profile.FprofTest do + use MixTest.Case + + import ExUnit.CaptureIO +- + alias Mix.Tasks.Profile.Fprof +- @moduletag apps: [:sample] + + test "profiles evaluated expression", context do + in_tmp(context.test, fn -> +diff --git a/lib/mix/test/mix/tasks/run_test.exs b/lib/mix/test/mix/tasks/run_test.exs +index 6748130000..7d2ffe9888 100644 +--- a/lib/mix/test/mix/tasks/run_test.exs ++++ b/lib/mix/test/mix/tasks/run_test.exs +@@ -5,8 +5,6 @@ defmodule Mix.Tasks.RunTest do + + import ExUnit.CaptureIO + +- @moduletag apps: [:sample] +- + setup do + Mix.Project.push(MixTest.Case.Sample) + end +diff --git a/lib/mix/test/mix/umbrella_test.exs b/lib/mix/test/mix/umbrella_test.exs +index 914da5aa6d..d6f8f1a4f5 100644 +--- a/lib/mix/test/mix/umbrella_test.exs ++++ b/lib/mix/test/mix/umbrella_test.exs +@@ -3,8 +3,6 @@ Code.require_file("../test_helper.exs", __DIR__) + defmodule Mix.UmbrellaTest do + use MixTest.Case + +- @moduletag apps: [:foo, :bar] +- + test "apps_paths" do + in_fixture("umbrella_dep/deps/umbrella", fn -> + assert Mix.Project.apps_paths() == nil +diff --git a/lib/mix/test/test_helper.exs b/lib/mix/test/test_helper.exs +index 0204c7fecc..bce247b2f5 100644 +--- a/lib/mix/test/test_helper.exs ++++ b/lib/mix/test/test_helper.exs +@@ -2,6 +2,9 @@ Mix.start() + Mix.shell(Mix.Shell.Process) + Application.put_env(:mix, :colors, enabled: false) + ++Logger.remove_backend(:console) ++Application.put_env(:logger, :backends, []) ++ + exclude = if match?({:win32, _}, :os.type()), do: [unix: true], else: [windows: true] + ExUnit.start(trace: "--trace" in System.argv(), exclude: exclude) + +@@ -32,12 +35,9 @@ defmodule MixTest.Case do + end + end + +- setup config do +- if apps = config[:apps] do +- Logger.remove_backend(:console) +- Application.put_env(:logger, :backends, []) +- end ++ @apps Enum.map(Application.loaded_applications(), &elem(&1, 0)) + ++ setup do + on_exit(fn -> + Application.start(:logger) + Mix.env(:dev) +@@ -48,14 +48,9 @@ defmodule MixTest.Case do + Mix.ProjectStack.clear_stack() + delete_tmp_paths() + +- if apps do +- for app <- apps do +- Application.stop(app) +- Application.unload(app) +- end +- +- Logger.add_backend(:console, flush: true) +- Application.put_env(:logger, :backends, [:console]) ++ for {app, _, _} <- Application.loaded_applications(), app not in @apps do ++ Application.stop(app) ++ Application.unload(app) + end + end) + |