mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: elixir: Enable more tests and remove patch.
Previously, due to issues in the erlang package, many tests would fail, and the package would also nondeterministically fail to build. This is now fixed (by patching occurrences of /bin/sh in the erlang package), so all the tests can be run. * gnu/packages/elixir.scm (elixir)[source]: Remove patches. [arguments]: Remove the fix-or-disable-tests phase. Add a new set-home phase to set the HOME environment variable prior to running the tests. * gnu/packages/patches/elixir-disable-failing-tests.patch: Delete this file. * gnu/local.mk: Remove now deleted patch.
This commit is contained in:
parent
b5453aa7c3
commit
e7a25d2ae7
3 changed files with 6 additions and 315 deletions
|
@ -40,15 +40,7 @@
|
|||
(file-name (string-append name "-" version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0acnxfwvkx1m1d0h5z051mz95n35zm468hcvc3wpmn17c15h5ihg"))
|
||||
;; FIXME: 27 tests (out of 4K) had to be disabled as
|
||||
;; they fail in the build environment. Common failures
|
||||
;; are:
|
||||
;; - Mix.Shell.cmd() fails with error 130
|
||||
;; - The git_repo fixture cannot be found
|
||||
;; - Communication with spawned processes fails with EPIPE
|
||||
;; - Failure to copy files
|
||||
(patches (search-patches "elixir-disable-failing-tests.patch"))))
|
||||
"0acnxfwvkx1m1d0h5z051mz95n35zm468hcvc3wpmn17c15h5ihg"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:test-target "test"
|
||||
|
@ -70,27 +62,6 @@
|
|||
(("#!/usr/bin/env elixir")
|
||||
(string-append "#!" out "/bin/elixir"))))
|
||||
#t))
|
||||
(add-after 'unpack 'fix-or-disable-tests
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; Some tests require access to a home directory.
|
||||
(setenv "HOME" "/tmp")
|
||||
|
||||
;; FIXME: These tests fail because the "git_repo" fixture does
|
||||
;; not exist or cannot be found.
|
||||
(delete-file "lib/mix/test/mix/tasks/deps.git_test.exs")
|
||||
|
||||
;; FIXME: Mix.Shell.cmd() always fails with error code 130.
|
||||
(delete-file "lib/mix/test/mix/shell_test.exs")
|
||||
|
||||
;; FIXME:
|
||||
;; disabled failing impure tests to make it build again.
|
||||
;; related discussion: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=28034#14
|
||||
(delete-file "lib/elixir/test/elixir/kernel/cli_test.exs")
|
||||
(delete-file "lib/elixir/test/elixir/kernel/dialyzer_test.exs")
|
||||
(delete-file "lib/iex/test/iex/helpers_test.exs")
|
||||
(delete-file "lib/ex_unit/test/ex_unit/capture_io_test.exs")
|
||||
|
||||
#t))
|
||||
(add-before 'build 'make-current
|
||||
;; The Elixir compiler checks whether or not to compile files by
|
||||
;; inspecting their timestamps. When the timestamp is equal to the
|
||||
|
@ -102,6 +73,11 @@
|
|||
(utime file recent recent 0 0)))
|
||||
(find-files "." ".*"))
|
||||
#t))
|
||||
(add-before 'check 'set-home
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; Some tests require access to a home directory.
|
||||
(setenv "HOME" "/tmp")
|
||||
#t))
|
||||
(delete 'configure))))
|
||||
(inputs
|
||||
`(("erlang" ,erlang)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue