[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/10: gnu: opam: Fix tests.
From: |
guix-commits |
Subject: |
09/10: gnu: opam: Fix tests. |
Date: |
Thu, 30 Jul 2020 12:23:48 -0400 (EDT) |
mbakke pushed a commit to branch master
in repository guix.
commit 05b90a4ab4618495d9ebab55acbf45de353df871
Author: Marius Bakke <marius@gnu.org>
AuthorDate: Thu Jul 30 18:08:55 2020 +0200
gnu: opam: Fix tests.
* gnu/packages/ocaml.scm (opam)[arguments]: Remove #:tests?. Adjust the
pre-check phase to make some files writable, patch a hard-coded file name,
and
disable mostly-redundant git tests.
[native-inputs]: Remove GIT and PYTHON. Add OPENSSL, PYTHON-WRAPPER, RSYNC,
UNZIP, and WHICH.
---
gnu/packages/ocaml.scm | 33 +++++++++++++++++++++++----------
1 file changed, 23 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 1b40063..682bc89 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
+;;; Copyright © 2020 Marius Bakke <marius@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -60,13 +61,13 @@
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages rsync)
#:use-module (gnu packages sdl)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages tex)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages time)
#:use-module (gnu packages tls)
- #:use-module (gnu packages version-control)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages web-browsers)
#:use-module (gnu packages xml)
@@ -461,10 +462,6 @@ the opam file fomat.")
#:test-target "tests"
- ;; FIXME: There's an obscure test failure:
- ;; …/_obuild/opam/opam.asm install P1' failed.
- #:tests? #f
-
#:phases (modify-phases %standard-phases
(add-before 'build 'pre-build
(lambda* (#:key inputs make-flags #:allow-other-keys)
@@ -495,15 +492,31 @@ the opam file fomat.")
#t)))
(add-before 'check 'pre-check
(lambda _
- (setenv "HOME" (getcwd))
- (invoke "git" "config" "--global" "user.email"
"guix@gnu.org")
- (invoke "git" "config" "--global" "user.name" "Guix")
+ ;; The "repo" test attempts to open some of these files
O_WRONLY
+ ;; and fails with a bogus "OpamSystem.File_not_found"
otherwise.
+ (for-each
+ (lambda (f) (chmod f #o644))
+ (find-files "tests/packages" "\\.opam$"))
+
+ (substitute* "tests/Makefile"
+ (("/usr/bin/printf")
+ (which "printf"))
+ ;; By default tests run twice: once with a "local"
repository
+ ;; and once with a git repository: disable the git
tests to
+ ;; avoid the dependency.
+ (("all: local git")
+ "all: local"))
#t)))))
(native-inputs
`(("dune" ,dune)
- ("git" ,git) ;for the tests
("ocaml-cppo" ,ocaml-cppo)
- ("python" ,python))) ;for the tests
+
+ ;; For tests.
+ ("openssl" ,openssl)
+ ("python" ,python-wrapper)
+ ("rsync" ,rsync)
+ ("unzip" ,unzip)
+ ("which" ,which)))
(inputs
`(("ocaml" ,ocaml)
("ncurses" ,ncurses)
- branch master updated (61c40b5 -> c385bd6), guix-commits, 2020/07/30
- 01/10: gnu: vlc: Remove needless input., guix-commits, 2020/07/30
- 02/10: gnu: monero: Remove unused input., guix-commits, 2020/07/30
- 03/10: gnu: elixir: Remove unused input., guix-commits, 2020/07/30
- 04/10: gnu: gnuradio: Remove unused input., guix-commits, 2020/07/30
- 05/10: gnu: gnuradio-osmosdr: Remove unused input., guix-commits, 2020/07/30
- 06/10: gnu: libosmo-dsp: Remove unused input., guix-commits, 2020/07/30
- 07/10: gnu: ruby-hoe-git: Do not propagate git., guix-commits, 2020/07/30
- 08/10: gnu: public-inbox: Make git a regular input., guix-commits, 2020/07/30
- 09/10: gnu: opam: Fix tests.,
guix-commits <=
- 10/10: gnu: git: Update to 2.28.0., guix-commits, 2020/07/30