Hi Evgeny,

As elixir-lang is going to be AUTORM if nobody takes care of it, I
already added a bit of code in debian/rules to make it retry unit tests
if they fail. It will retry 3 times, meaning that if it used to fail 10%
of the time, making it retry 3 times makes the unit tests fail 0.01% of
the times, which is IMO acceptable. The recent failures on some arch
shows that my debian/rules hack works well! :)

Now, I noticed that the build reliably fails on arm64 and mips64el:

https://buildd.debian.org/status/fetch.php?pkg=elixir-lang&arch=arm64&ver=1.9.1.dfsg-1.2&stamp=1572476904&raw=0

https://buildd.debian.org/status/fetch.php?pkg=elixir-lang&arch=mips64el&ver=1.9.1.dfsg-1.2&stamp=1572491696&raw=0

Therefore, I've removed the failing test.

Attached to this email, you'll find the debdiff for the change between
version 1.9.1.dfsg-1.1 and 1.9.1.dfsg-1.3.

Please let me know if you want to revert these upload. I can always do
that. The reason why I've done a non-delayed NMU is because otherwise,
it would be AUTORM, but of course, everything can be reverted if you
feel like it. Anyways, I'm always available for anything related to
these uploads, so just let me know.

Cheers,

Thomas Goirand (zigo)
diff -Nru elixir-lang-1.9.1.dfsg/debian/changelog 
elixir-lang-1.9.1.dfsg/debian/changelog
--- elixir-lang-1.9.1.dfsg/debian/changelog     2019-10-13 08:39:24.000000000 
+0200
+++ elixir-lang-1.9.1.dfsg/debian/changelog     2019-11-04 11:27:07.000000000 
+0100
@@ -1,3 +1,18 @@
+elixir-lang (1.9.1.dfsg-1.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add remove-test-executes-rpc-instructions.patch, as this test reliably
+    fails on arm64 and mips64el.
+
+ -- Thomas Goirand <z...@debian.org>  Mon, 04 Nov 2019 11:27:07 +0100
+
+elixir-lang (1.9.1.dfsg-1.2) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Re-attempt unit testing (up to 3 times) if failed (Closes: #942688).
+
+ -- Thomas Goirand <z...@debian.org>  Wed, 30 Oct 2019 12:23:33 +0100
+
 elixir-lang (1.9.1.dfsg-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru 
elixir-lang-1.9.1.dfsg/debian/patches/remove-test-executes-rpc-instructions.patch
 
elixir-lang-1.9.1.dfsg/debian/patches/remove-test-executes-rpc-instructions.patch
--- 
elixir-lang-1.9.1.dfsg/debian/patches/remove-test-executes-rpc-instructions.patch
   1970-01-01 01:00:00.000000000 +0100
+++ 
elixir-lang-1.9.1.dfsg/debian/patches/remove-test-executes-rpc-instructions.patch
   2019-11-04 11:26:42.000000000 +0100
@@ -0,0 +1,36 @@
+Description: Removes test "executes rpc instructions"
+ This test fails reliably on arm64 and misp64el.
+Author: Thomas Goirand <z...@debian.org>
+Forwarded: no
+Last-Update: 2019-11-04
+
+--- elixir-lang-1.9.1.dfsg.orig/lib/mix/test/mix/tasks/release_test.exs
++++ elixir-lang-1.9.1.dfsg/lib/mix/test/mix/tasks/release_test.exs
+@@ -268,27 +268,6 @@ defmodule Mix.Tasks.ReleaseTest do
+     end)
+   end
+ 
+-  @tag :epmd
+-  test "executes rpc instructions" do
+-    in_fixture("release_test", fn ->
+-      config = [releases: [permanent1: [include_erts: false]]]
+-
+-      Mix.Project.in_project(:release_test, ".", config, fn _ ->
+-        root = Path.absname("_build/dev/rel/permanent1")
+-        Mix.Task.run("release")
+-        script = Path.join(root, "bin/permanent1")
+-
+-        open_port(script, ['start'])
+-        wait_until_decoded(Path.join(root, "RELEASE_BOOTED"))
+-        assert System.cmd(script, ["rpc", "ReleaseTest.hello_world"]) == 
{"hello world\n", 0}
+-        assert System.cmd(script, ["stop"]) == {"", 0}
+-
+-        assert {pid, 0} = System.cmd(script, ["pid"])
+-        assert pid != "\n"
+-      end)
+-    end)
+-  end
+-
+   test "runs eval and version commands" do
+     # In some Windows setups (mostly with Docker), `System.cmd/3` fails 
because
+     # the path to the command/executable and one or more arguments contain 
spaces.
diff -Nru elixir-lang-1.9.1.dfsg/debian/patches/series 
elixir-lang-1.9.1.dfsg/debian/patches/series
--- elixir-lang-1.9.1.dfsg/debian/patches/series        2019-10-13 
08:39:24.000000000 +0200
+++ elixir-lang-1.9.1.dfsg/debian/patches/series        2019-11-04 
11:25:44.000000000 +0100
@@ -1,3 +1,4 @@
 remove-utf8-warning.patch
 remove_rebar3_related_tests.patch
 use_rebar_instead_of_rebar3_in_tests.patch
+remove-test-executes-rpc-instructions.patch
diff -Nru elixir-lang-1.9.1.dfsg/debian/rules 
elixir-lang-1.9.1.dfsg/debian/rules
--- elixir-lang-1.9.1.dfsg/debian/rules 2019-10-13 08:39:24.000000000 +0200
+++ elixir-lang-1.9.1.dfsg/debian/rules 2019-10-30 22:22:46.000000000 +0100
@@ -8,8 +8,18 @@
 %:
        dh $@
 
+
 override_dh_auto_test: .home
-       rc=0; HOME=$(CURDIR)/.home dh_auto_test || rc=$$?; epmd -kill; exit $$rc
+       CNT=3 ; rc=1 ; while [ $$CNT != 0 ] && [ $$rc != 0 ] ; do \
+               if HOME=$(CURDIR)/.home dh_auto_test ; then \
+                       rc=0 ; \
+               else \
+                       rc=1 ; \
+                       epmd -kill ; \
+               fi ; \
+               CNT=$$(( $$CNT - 1)) ; \
+       done ; \
+       if [ $${rc} != 0 ] ; then exit $$rc ; else epmd -kill ; fi
 
 override_dh_auto_clean:
        $(RM) -r .home

Reply via email to