The check-tests-true lint check is incorrect for Emacs packages

  • Done
  • quality assurance status badge
Details
3 participants
  • Maxim Cournoyer
  • Maxime Devos
  • zimoun
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
M
M
Maxim Cournoyer wrote on 31 Aug 2021 17:25
(name . bug-guix)(address . bug-guix@gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
87mtoxiqkw.fsf@gmail.com
Hi,

The emacs-build-system has its #:tests? argument set to #f by default,
which means users must explicitly specify its value as #t to enable test
suites.

The check-tests-true lint check seems to ignore this and goes on to
recommend, for example:

Toggle snippet (3 lines)
gnu/packages/emacs-xyz.scm:15998:7: emacs-groovy-modes@2.0-0.99eaf70: #:tests? must not be explicitly set to #t

which is wrong.

Thanks,

Maxim
M
M
Maxime Devos wrote on 7 Sep 2021 14:34
lint: check-tests-true: Allow #:tests? #t for emacs-build-system.
(address . 50299@debbugs.gnu.org)
31f8389794c709cf91334d283513d1bf42382308.camel@telenet.be
Hi

The attached patch should fix this.

Greetings,
Maxime.
From c8efd59560509381920cbfe915279bd16077552d Mon Sep 17 00:00:00 2001
From: Maxime Devos <maximedevos@telenet.be>
Date: Tue, 7 Sep 2021 14:25:43 +0200
Subject: [PATCH] lint: check-tests-true: Allow #:tests? #t for
emacs-build-system.

emacs-build-system sets #:tests? #f by default, so the linter
shouldn't warn if #:tests? #t is set for packages using
emacs-build-system.

* guix/lint.scm (check-tests-true): Do not warn if the build system
is emacs-build-system.

Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
guix/lint.scm | 5 +++++
tests/lint.scm | 10 ++++++++++
2 files changed, 15 insertions(+)

Toggle diff (53 lines)
diff --git a/guix/lint.scm b/guix/lint.scm
index 8e80aae938..f708465ed8 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -34,6 +34,7 @@
#:use-module (guix store)
#:autoload (guix base16) (bytevector->base16-string)
#:use-module (guix base32)
+ #:use-module (guix build-system emacs)
#:use-module (guix diagnostics)
#:use-module (guix download)
#:use-module (guix ftp-client)
@@ -279,6 +280,10 @@ superfluous when building natively and incorrect when cross-compiling."
(eq? tests? #t))
(package-arguments package)))
(if (and (tests-explicitly-enabled?)
+ ;; emacs-build-system sets #:tests? #f by default, therefore
+ ;; writing #:tests? #t in package definitions using
+ ;; emacs-build-system is reasonable.
+ (not (eq? emacs-build-system (package-build-system package)))
;; Some packages, e.g. gnutls, set #:tests?
;; differently depending on whether it is being
;; cross-compiled.
diff --git a/tests/lint.scm b/tests/lint.scm
index 0f51b9ef79..6aa2ac00c1 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -35,6 +35,7 @@
#:use-module (guix tests http)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system emacs)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (guix lint)
@@ -324,6 +325,15 @@
`(#:tests? ,(not (%current-target-system)))))))
(check-tests-true pkg)))
+;; The emacs-build-system sets #:tests? #f by default.
+(test-equal "tests-true: #:tests? #t acceptable for emacs packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
(test-equal "inputs: pkg-config is probably a native input"
"'pkg-config' should probably be a native input"
(single-lint-warning-message
--
2.33.0
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYTdcTRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7v7uAQChXjx9Nb/aT2SEXPYG6MweFPox
Bf9d34lHz3xAQ2WjLAEAjTz0KJ2Vy7psnM7SgNsCigr89IzBNSHjeGLwzQPSfg8=
=J6HS
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 23 Sep 2021 05:41
Re: bug#50299: The check-tests-true lint check is incorrect for Emacs packages
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 50299@debbugs.gnu.org)
87lf3oklgh.fsf_-_@gmail.com
Hello Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (51 lines)
> Hi
>
> The attached patch should fix this.
>
> Greetings,
> Maxime.
>
> From c8efd59560509381920cbfe915279bd16077552d Mon Sep 17 00:00:00 2001
> From: Maxime Devos <maximedevos@telenet.be>
> Date: Tue, 7 Sep 2021 14:25:43 +0200
> Subject: [PATCH] lint: check-tests-true: Allow #:tests? #t for
> emacs-build-system.
>
> emacs-build-system sets #:tests? #f by default, so the linter
> shouldn't warn if #:tests? #t is set for packages using
> emacs-build-system.
>
> * guix/lint.scm (check-tests-true): Do not warn if the build system
> is emacs-build-system.
>
> Fixes: <https://issues.guix.gnu.org/50299>
> Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
> ---
> guix/lint.scm | 5 +++++
> tests/lint.scm | 10 ++++++++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/guix/lint.scm b/guix/lint.scm
> index 8e80aae938..f708465ed8 100644
> --- a/guix/lint.scm
> +++ b/guix/lint.scm
> @@ -34,6 +34,7 @@
> #:use-module (guix store)
> #:autoload (guix base16) (bytevector->base16-string)
> #:use-module (guix base32)
> + #:use-module (guix build-system emacs)
> #:use-module (guix diagnostics)
> #:use-module (guix download)
> #:use-module (guix ftp-client)
> @@ -279,6 +280,10 @@ superfluous when building natively and incorrect when cross-compiling."
> (eq? tests? #t))
> (package-arguments package)))
> (if (and (tests-explicitly-enabled?)
> + ;; emacs-build-system sets #:tests? #f by default, therefore
> + ;; writing #:tests? #t in package definitions using
> + ;; emacs-build-system is reasonable.
> + (not (eq? emacs-build-system (package-build-system package)))
> ;; Some packages, e.g. gnutls, set #:tests?
> ;; differently depending on whether it is being
> ;; cross-compiled.

Grepping for (tests? #f), I found texlive-build also defaults to #f, so
should be treated the same.

OK to push with such a change.

Thank you!

Maxim
M
M
Maxime Devos wrote on 27 Sep 2021 17:44
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 50299@debbugs.gnu.org)
a61c3ea09bf100cc89d77cc720c3dd29a6970210.camel@telenet.be
Maxim Cournoyer schreef op wo 22-09-2021 om 23:41 [-0400]:
Toggle quote (5 lines)
> Grepping for (tests? #f), I found texlive-build also defaults to #f, so
> should be treated the same.
>
> OK to push with such a change.

I'll send a patch series with that change, that also resolves every other
check-tests-true lint warning (except for 'fennel').

Toggle quote (3 lines)
> Thank you!
>
> Maxim
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVHm7hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7o3EAP9JtN7nMKXEEJaxT5SJ2aqsmpsL
pNVIQbGFmaNBm4nEvAEAlKivsA6Vj+E57KEYGMaFwKKpWHbQv+KYNP+0eCTUyAE=
=2NQo
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 01/27] lint: check-tests-true: Allow #:tests? #t for some build systems.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-1-maximedevos@telenet.be
emacs-build-system sets #:tests? #f by default, so the linter
shouldn't warn if #:tests? #t is set for packages using
emacs-build-system. Likewise for texlive-build-system

* guix/lint.scm (check-tests-true): Do not warn if the build system
is emacs-build-system or texlive-build-system.
* tests/lint.scm
("tests-true: #:tests? #t acceptable for emacs packages")
("tests-true: #:tests? #t acceptable for texlive packages"): New tests.

Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
guix/lint.scm | 11 +++++++++++
tests/lint.scm | 20 ++++++++++++++++++++
2 files changed, 31 insertions(+)

Toggle diff (76 lines)
diff --git a/guix/lint.scm b/guix/lint.scm
index 527fda165a..534da85b96 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -34,6 +34,7 @@
#:use-module (guix store)
#:autoload (guix base16) (bytevector->base16-string)
#:use-module (guix base32)
+ #:use-module (guix build-system)
#:use-module (guix diagnostics)
#:use-module (guix download)
#:use-module (guix ftp-client)
@@ -278,6 +279,16 @@ superfluous when building natively and incorrect when cross-compiling."
(eq? tests? #t))
(package-arguments package)))
(if (and (tests-explicitly-enabled?)
+ ;; emacs-build-system sets #:tests? #f by default, therefore
+ ;; writing #:tests? #t in package definitions using
+ ;; emacs-build-system is reasonable. Likewise for
+ ;; texlive-build-system.
+ ;;
+ ;; Compare the name of the build system instead of the build system
+ ;; itself to avoid loading unnecessary modules when only a few
+ ;; modules are linted.
+ (not (memq (build-system-name (package-build-system package))
+ '(emacs texlive)))
;; Some packages, e.g. gnutls, set #:tests?
;; differently depending on whether it is being
;; cross-compiled.
diff --git a/tests/lint.scm b/tests/lint.scm
index 0f51b9ef79..7b04dc98d4 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -35,6 +35,7 @@
#:use-module (guix tests http)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system emacs)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (guix lint)
@@ -324,6 +325,25 @@
`(#:tests? ,(not (%current-target-system)))))))
(check-tests-true pkg)))
+;; The emacs-build-system sets #:tests? #f by default.
+(test-equal "tests-true: #:tests? #t acceptable for emacs packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
+;; Likewise, though the 'check' phase is deleted by default,
+;; so #:tests? #t won't be useful by itself.
+(test-equal "tests-true: #:tests? #t acceptable for texlive packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
(test-equal "inputs: pkg-config is probably a native input"
"'pkg-config' should probably be a native input"
(single-lint-warning-message

base-commit: 808f9ffbd3106da4c92d2367b118b98196c9e81e
prerequisite-patch-id: 7fdac44e8681baaf419cbf8da78cdebb8b9f9757
prerequisite-patch-id: 1f7f1597b9c85b2b1f9db1044d193bcf6ec8650e
prerequisite-patch-id: 588ca94b9c4603424094a9cc2854c4f9bc83c7e4
prerequisite-patch-id: 82b4951463e8979d1c4cd15e1ca6a36308b21b51
prerequisite-patch-id: 75cdb9eb6b038adfb605253163b94efd51e0276c
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 02/27] gnu: lean: Set #:tests? appropriately when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-2-maximedevos@telenet.be
It still fails to cross-compile though.

* gnu/packages/lean.scm (lean)[arguments]<#:tests?>: Set to #false
when cross-compiling.
---
gnu/packages/lean.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index cc593291fd..1099732181 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -46,10 +46,10 @@
;; XXX: Test phases currently fail on 32-bit sytems.
;; Tests for those architectures have been temporarily
;; disabled, pending further investigation.
- #:tests? ,(let ((arch (or (%current-target-system)
- (%current-system))))
- (not (or (string-prefix? "i686" arch)
- (string-prefix? "armhf" arch))))
+ #:tests? ,(and (not (%current-target-system))
+ (let ((arch (%current-system)))
+ (not (or (string-prefix? "i686" arch)
+ (string-prefix? "armhf" arch)))))
#:phases
(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'patch-tests-shebangs
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 03/27] gnu: lean: Add bash-minimal.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-3-maximedevos@telenet.be
Explicitely adding this input is required for cross-compilation.

* gnu/packages/lean.scm (lean)[inputs]: Add 'bash-minimal'.
---
gnu/packages/lean.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index 1099732181..e2a0d3196a 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -19,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages lean)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages multiprecision)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
@@ -40,7 +41,8 @@
"09mklc1p6ms1jayg2f89hqfmhca3h5744lli936l38ypn1d00sxx"))))
(build-system cmake-build-system)
(inputs
- `(("gmp" ,gmp)))
+ `(("bash-minimal" ,bash-minimal) ; for bin/leanpkg
+ ("gmp" ,gmp)))
(arguments
`(#:build-type "Release" ; default upstream build type
;; XXX: Test phases currently fail on 32-bit sytems.
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 04/27] gnu: swi-prolog: Move native-inputs to inputs where appropriate.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-4-maximedevos@telenet.be
* gnu/package/prolog.scm (swi-prolog)
[native-inputs]: Keep 'texinfo', 'perl' and 'pkg-config' and move the rest
to ...
[inputs]: ... here.
---
gnu/packages/prolog.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 4eb0f4d3b6..7857fdff68 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -116,17 +116,18 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
+ `(("texinfo" ,texinfo)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)))
+ (inputs
`(("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
- ("texinfo" ,texinfo)
("libarchive" ,libarchive)
("libunwind" ,libunwind)
("libjpeg" ,libjpeg-turbo)
("libxft" ,libxft)
("fontconfig" ,fontconfig)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
("openssl" ,openssl)))
(home-page "https://www.swi-prolog.org/")
(synopsis "ISO/Edinburgh-style Prolog interpreter")
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 05/27] gnu: swi-prolog: Don't explicitely enable tests.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-5-maximedevos@telenet.be
Tests are enabled by default (except when cross-compiling).
Running tests when cross-compiling is rarely possible.

* gnu/packages/prolog.scm (swi-prolog)[arguments]<#:tests>: Remove it.
---
gnu/packages/prolog.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 7857fdff68..be5a3c5bf8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -97,7 +97,6 @@ manner. It also features an interactive interpreter.")
(build-system cmake-build-system)
(arguments
`(#:parallel-build? #t
- #:tests? #t
#:configure-flags
(list "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 06/27] gnu: swi-prolog: Make configuration wok when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-6-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set BSD_SIGNALS and QSORT_R_GNU
when cross-compiling.
---
gnu/packages/prolog.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index be5a3c5bf8..8d940530d8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,7 +99,13 @@ manner. It also features an interactive interpreter.")
(arguments
`(#:parallel-build? #t
#:configure-flags
- (list "-DINSTALL_DOCUMENTATION=ON"
+ (list ,@(if (%current-target-system)
+ ;; Set this manually, otherwise CMake would need to
+ ;; run a cross-compiled binary, which it can't do.
+ ;; These values were found on a Linux system.
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '())
+ "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
(modify-phases %standard-phases
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 07/27] gnu: swi-prolog: Don't use 'cc'.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-7-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set CMAKE_HOST_CC to gcc when
cross-compiling.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 8d940530d8..fc3956b17b 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -103,7 +103,9 @@ manner. It also features an interactive interpreter.")
;; Set this manually, otherwise CMake would need to
;; run a cross-compiled binary, which it can't do.
;; These values were found on a Linux system.
- '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
+ ;; If absent, the non-existent 'cc' is used.
+ "-DCMAKE_HOST_CC=gcc"
'())
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 11/27] gnu: ruby-byebug-11: Don't enable tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-11-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-byebug-11)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 0f7806e81b..f2932cc26e 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -6735,8 +6735,7 @@ other things and it comes with a command line interface.")
(("require \"bundler/setup\".*") "")))
#t))))
(arguments
- `(#:tests? #t
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-tmp-path-sensitive-test
(lambda _
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 08/27] gnu: swi-prolog: Use cross-compiled bash in shebangs.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-8-maximedevos@telenet.be
* gnu/packages/prolog.scm (swi-prolog)[inputs]: Add 'bash-minimal'.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index fc3956b17b..3eaec533d7 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -28,6 +28,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages backup)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages image)
@@ -128,7 +129,8 @@ manner. It also features an interactive interpreter.")
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
- `(("zlib" ,zlib)
+ `(("bash-minimal" ,bash-minimal) ; for some scripts in 'lib'
+ ("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
("libarchive" ,libarchive)
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 10/27] gnu: ruby-yard-with-tests: Don't enable tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-10-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-yard-with-tests)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 8db5bd9158..0f7806e81b 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -8519,8 +8519,8 @@ definitions.")
(inherit ruby-yard)
(name "ruby-yard-with-tests")
(arguments
- (substitute-keyword-arguments (package-arguments ruby-yard)
- ((#:tests? _ #t) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard))
((#:test-target _ "default") "default")
((#:phases phases '%standard-phases)
`(modify-phases ,phases
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 12/27] gnu: ruby-ffi-rzmq: Don't enable tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-12-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index f2932cc26e..e361c699ef 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7588,8 +7588,7 @@ library.")
(base32
"14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
(build-system ruby-build-system)
- (arguments '(#:tests? #t
- #:phases (modify-phases %standard-phases
+ (arguments '(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "rspec"))))))
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 17/27] gnu: libicns: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-17-maximedevos@telenet.be
The #:tests? #t is actually harmless here, because there are no
tests (though there is a trivial 'check' target). The ‘; No tests.’
comment might be confusing though.

* gnu/packages/image.scm (libicns)[arguments]: Remove.
---
gnu/packages/image.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 6e67c56d78..48bf546cf3 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -565,8 +565,6 @@ maximum quality factor.")
(inputs
`(("libpng" ,libpng)
("jasper" ,jasper)))
- (arguments
- `(#:tests? #t)) ; No tests.
(home-page "http://icns.sourceforge.net/")
(synopsis "Library for handling Mac OS icns resource files")
(description
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 14/27] gnu: go-1.16: Don't enable tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-14-maximedevos@telenet.be
* gnu/packages/golang.scm (go-1.16)[arguments]:
Remove #:tests? instead of unconditionally setting it to #t.
---
gnu/packages/golang.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f02d0aa9df..6da4c09f44 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -465,8 +465,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(base32
"00zv65v09kr2cljxxqypk980r4b4aqjijhbw4ikppn8km68h831n"))))
(arguments
- (substitute-keyword-arguments (package-arguments go-1.14)
- ((#:tests? _) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments go-1.14))
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'remove-unused-sourcecode-generators
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 13/27] gnu: ruby-ffi-rzmq: Respect #:tests?.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-13-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]<#:phases>:
Only invoke "rspec" if #:tests? is true.
---
gnu/packages/ruby.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e361c699ef..7817025cb4 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7590,8 +7590,9 @@ library.")
(build-system ruby-build-system)
(arguments '(#:phases (modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "rspec"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec")))))))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)))
(propagated-inputs
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 09/27] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-9-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set PROG_SWIPL and
SWIPL_NATIVE_FRIEND when cross-compiling.
(swi-prolog)[native-inputs]: Add 'this-package' when cross-compiling.
---
gnu/packages/prolog.scm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 3eaec533d7..7a5ac04a0c 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -27,6 +27,7 @@
#:use-module (guix packages)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix utils)
#:use-module (gnu packages backup)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
@@ -107,6 +108,12 @@ manner. It also features an interactive interpreter.")
'("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
;; If absent, the non-existent 'cc' is used.
"-DCMAKE_HOST_CC=gcc"
+ ;; swi-prolog needs a native copy of itself for
+ ;; cross-compilation.
+ "-DSWIPL_NATIVE_FRIEND=/nowhere"
+ (string-append "-DPROG_SWIPL="
+ (assoc-ref %build-host-inputs "swi-prolog")
+ "/bin/swipl"))
'())
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
@@ -125,7 +132,15 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
- `(("texinfo" ,texinfo)
+ `(,@(if (%current-target-system)
+ (begin
+ (unless (equal? (target-64bit?)
+ (target-64bit? (%current-system)))
+ (error "swi-prolog requires --system and --target to have \
+the same word size"))
+ `(("swi-prolog" ,this-package)))
+ '())
+ ("texinfo" ,texinfo)
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 18/27] gnu: python2-empy: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-18-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-empy)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4e2e719afc..c221aaa682 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2643,8 +2643,8 @@ commands.")
(define-public python2-empy
(let ((base (package-with-python2 (strip-python2-variant python-empy))))
(package/inherit base
- (arguments `(,@(package-arguments base)
- #:tests? #t)))))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments base))))))
(define-public python2-element-tree
(package
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 19/27] gnu: python2-promise: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-19-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-promise)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c221aaa682..3914c9158a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12501,8 +12501,8 @@ concurrent.futures package from Python 3.2")
(let ((promise (package-with-python2
(strip-python2-variant python-promise))))
(package/inherit promise
- (arguments (substitute-keyword-arguments (package-arguments promise)
- ((#:tests? _) #t)))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments promise)))
(native-inputs
`(("python2-futures" ,python2-futures)
("python2-pytest" ,python2-pytest)
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 20/27] gnu: ocaml4.07-fftw3: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-20-maximedevos@telenet.be
* gnu/packages/ocaml.scm (ocaml4.07-fftw3)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/ocaml.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index db1d973238..9adf9cca24 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6683,8 +6683,7 @@ language understood by ocamldoc.")
"0l66yagjkwdcib6q55wd8wiap50vi23qiahkghlvm28z7nvbclfk"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #t
- #:test-target "tests"
+ `(#:test-target "tests"
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 21/27] gnu: lablgtk: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-21-maximedevos@telenet.be
* gnu/packages/ocaml.scm (lablgtk)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/ocaml.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9adf9cca24..5d0927dee4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6920,8 +6920,7 @@ support for Mparser.")))
"11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #t
- #:test-target "."
+ `(#:test-target "."
#:phases
(modify-phases %standard-phases
(add-before 'build 'make-writable
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 22/27] gnu: belcard: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-22-maximedevos@telenet.be
* gnu/packages/linphone.scm (belcard)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/linphone.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
index 1c60e767b0..5a4bf3d735 100644
--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -260,8 +260,7 @@ IETF.")
(build-system cmake-build-system)
(outputs '("out" "debug" "tester"))
(arguments
- `(#:tests? #t
- #:configure-flags '("-DENABLE_STATIC=OFF")
+ `(#:configure-flags '("-DENABLE_STATIC=OFF")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-vcard-grammar-location
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 23/27] gnu: pjproject: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-23-maximedevos@telenet.be
* gnu/packages/telephony.scm (pjproject)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/telephony.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index f75a168948..3075b56fa9 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -746,8 +746,7 @@ your calls and messages.")
(build-system gnu-build-system)
(outputs '("out" "debug" "static"))
(arguments
- `(#:tests? #t
- #:test-target "selftest"
+ `(#:test-target "selftest"
#:configure-flags
(list "--enable-shared"
"--with-external-speex"
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 24/27] gnu: tdlib: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-24-maximedevos@telenet.be
* gnu/packages/messaging.scm (tdlib)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/messaging.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index a7fed957a3..5f90a524d7 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2551,8 +2551,7 @@ replacement.")
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:configure-flags
+ `(#:configure-flags
(list "-DCMAKE_BUILD_TYPE=Release"
"-DTD_ENABLE_LTO=OFF") ; FIXME: Get LTO to work.
#:phases
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 25/27] gnu: extra-cmake-modules: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-25-maximedevos@telenet.be
* gnu/packages/kde-frameworks.scm
(extra-cmake-modules)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/kde-frameworks.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 00d5eb049d..91ad834bf2 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -105,7 +105,8 @@
'()
`(("qtbase" ,qtbase-5)))) ;for tests (needs qmake)
(arguments
- `(#:tests? ,(not (null? (package-native-inputs this-package)))
+ `(#:tests? ,(and (not (%current-target-system))
+ (not (null? (package-native-inputs this-package))))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-lib-path
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 15/27] gnu: ecl: Don't pretend to enable tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-15-maximedevos@telenet.be
* gnu/packages/lisp.scm
(ecl)[arguments]<#:tests?>: Move comment about failing tests to ...
(ecl)[arguments]<#:phases>{check}: ... this deleted phase.
(ecl)[arguments]: Remove #:tests? instead of unconditionally setting it to
#t.
---
gnu/packages/lisp.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 7eb8f54d49..2330d6ba42 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -253,12 +253,11 @@ interface to the Tk widget system.")
("libffi" ,libffi)))
(arguments
`(#:configure-flags '("--without-rt")
- ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
- ;; 2-3 tests may be due to FHS assumptions.
- #:tests? #t
#:parallel-tests? #f
#:phases
(modify-phases %standard-phases
+ ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
+ ;; 2-3 tests may be due to FHS assumptions.
(delete 'check)
(add-after 'unpack 'replace-asdf
;; Use system ASDF instead of bundled one.
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 26/27] gnu: inkscape-1.1: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-26-maximedevos@telenet.be
* gnu/packages/inkscape.scm (inkscape-1.1)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/inkscape.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 46c8c4cc34..f49909057a 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -215,8 +215,7 @@ endif()~%~%"
#t))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:test-target "check" ;otherwise some test binaries are missing
+ `(#:test-target "check" ;otherwise some test binaries are missing
#:imported-modules (,@%cmake-build-system-modules
(guix build glib-or-gtk-build-system))
#:modules ((guix build cmake-build-system)
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 27/27] gnu: ghc-bsb-http-chunked: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-27-maximedevos@telenet.be
* gnu/packages/haskell-web.scm
(ghc-bsb-http-chunked)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/haskell-web.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index a250bb4262..de3a8ec208 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -619,8 +619,9 @@ Haskell's Web Application Interface (WAI).")
(arguments
`(;; XXX: As of 0.0.4, one property test ("Identical output as Blaze")
;; fails on i686-linux.
- #:tests? ,(not (string-prefix? "i686" (or (%current-target-system)
- (%current-system))))))
+ #:tests? ,(and (not (%current-target-system))
+ (not (string-prefix? "i686" (or (%current-target-system)
+ (%current-system)))))))
(native-inputs
`(("ghc-attoparsec" ,ghc-attoparsec)
("ghc-blaze-builder" ,ghc-blaze-builder)
--
2.33.0
M
M
Maxime Devos wrote on 27 Sep 2021 17:45
[PATCH v2 16/27] gnu: perl-unicode-utf8: Don't run tests when cross-compiling.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
20210927154537.28227-16-maximedevos@telenet.be
* gnu/packages/perl.scm (perl-unicode-utf8)[arguments]<#:tests?>:
Set to #false when cross-compiling.
---
gnu/packages/perl.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 5d4843d39a..255cace07c 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -11119,7 +11119,8 @@ defined by Annex #11 is used to determine breaking positions.")
(build-system perl-build-system)
;; FIXME: Tests fail on 32-bit architectures:
;; <https://rt.cpan.org/Public/Bug/Display.html?id=127007>.
- (arguments `(#:tests? ,(target-64bit?)))
+ (arguments `(#:tests? ,(and (not (%current-target-system))
+ (target-64bit?))))
(native-inputs
`(("perl-test-fatal" ,perl-test-fatal)
("perl-test-leaktrace" ,perl-test-leaktrace)
--
2.33.0
M
M
Maxim Cournoyer wrote on 28 Sep 2021 03:14
Re: [PATCH v2 01/27] lint: check-tests-true: Allow #:tests? #t for some build systems.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 50299@debbugs.gnu.org)
87ilylijqm.fsf@gmail.com
Hello!

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (10 lines)
> emacs-build-system sets #:tests? #f by default, so the linter
> shouldn't warn if #:tests? #t is set for packages using
> emacs-build-system. Likewise for texlive-build-system
>
> * guix/lint.scm (check-tests-true): Do not warn if the build system
> is emacs-build-system or texlive-build-system.
> * tests/lint.scm
> ("tests-true: #:tests? #t acceptable for emacs packages")
> ("tests-true: #:tests? #t acceptable for texlive packages"): New tests.

[...]

Toggle quote (31 lines)
> diff --git a/tests/lint.scm b/tests/lint.scm
> index 0f51b9ef79..7b04dc98d4 100644
> --- a/tests/lint.scm
> +++ b/tests/lint.scm
> @@ -35,6 +35,7 @@
> #:use-module (guix tests http)
> #:use-module (guix download)
> #:use-module (guix git-download)
> + #:use-module (guix build-system emacs)
> #:use-module (guix build-system gnu)
> #:use-module (guix packages)
> #:use-module (guix lint)
> @@ -324,6 +325,25 @@
> `(#:tests? ,(not (%current-target-system)))))))
> (check-tests-true pkg)))
>
> +;; The emacs-build-system sets #:tests? #f by default.
> +(test-equal "tests-true: #:tests? #t acceptable for emacs packages"
> + '()
> + (let ((pkg (dummy-package "x"
> + (build-system emacs-build-system)
> + (arguments
> + `(#:tests? #t)))))
> + (check-tests-true pkg)))
> +
> +;; Likewise, though the 'check' phase is deleted by default,
> +;; so #:tests? #t won't be useful by itself.
> +(test-equal "tests-true: #:tests? #t acceptable for texlive packages"
> + '()
> + (let ((pkg (dummy-package "x"
> + (build-system emacs-build-system)
^ texlive-build-system ? :-)

Thanks!

Maxim
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 01/27] lint: check-tests-true: Allow #:tests? #t for some build systems.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-1-maximedevos@telenet.be
emacs-build-system sets #:tests? #f by default, so the linter
shouldn't warn if #:tests? #t is set for packages using
emacs-build-system. Likewise for texlive-build-system

* guix/lint.scm (check-tests-true): Do not warn if the build system
is emacs-build-system or texlive-build-system.
* tests/lint.scm
("tests-true: #:tests? #t acceptable for emacs packages")
("tests-true: #:tests? #t acceptable for texlive packages"): New tests.

Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
guix/lint.scm | 11 +++++++++++
tests/lint.scm | 21 +++++++++++++++++++++
2 files changed, 32 insertions(+)

Toggle diff (77 lines)
diff --git a/guix/lint.scm b/guix/lint.scm
index 527fda165a..534da85b96 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -34,6 +34,7 @@
#:use-module (guix store)
#:autoload (guix base16) (bytevector->base16-string)
#:use-module (guix base32)
+ #:use-module (guix build-system)
#:use-module (guix diagnostics)
#:use-module (guix download)
#:use-module (guix ftp-client)
@@ -278,6 +279,16 @@ superfluous when building natively and incorrect when cross-compiling."
(eq? tests? #t))
(package-arguments package)))
(if (and (tests-explicitly-enabled?)
+ ;; emacs-build-system sets #:tests? #f by default, therefore
+ ;; writing #:tests? #t in package definitions using
+ ;; emacs-build-system is reasonable. Likewise for
+ ;; texlive-build-system.
+ ;;
+ ;; Compare the name of the build system instead of the build system
+ ;; itself to avoid loading unnecessary modules when only a few
+ ;; modules are linted.
+ (not (memq (build-system-name (package-build-system package))
+ '(emacs texlive)))
;; Some packages, e.g. gnutls, set #:tests?
;; differently depending on whether it is being
;; cross-compiled.
diff --git a/tests/lint.scm b/tests/lint.scm
index 0f51b9ef79..391ebadfc4 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -35,6 +35,8 @@
#:use-module (guix tests http)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system texlive)
+ #:use-module (guix build-system emacs)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (guix lint)
@@ -324,6 +326,25 @@
`(#:tests? ,(not (%current-target-system)))))))
(check-tests-true pkg)))
+;; The emacs-build-system sets #:tests? #f by default.
+(test-equal "tests-true: #:tests? #t acceptable for emacs packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
+;; Likewise, though the 'check' phase is deleted by default,
+;; so #:tests? #t won't be useful by itself.
+(test-equal "tests-true: #:tests? #t acceptable for texlive packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system texlive-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
(test-equal "inputs: pkg-config is probably a native input"
"'pkg-config' should probably be a native input"
(single-lint-warning-message

base-commit: 808f9ffbd3106da4c92d2367b118b98196c9e81e
prerequisite-patch-id: 7fdac44e8681baaf419cbf8da78cdebb8b9f9757
prerequisite-patch-id: 1f7f1597b9c85b2b1f9db1044d193bcf6ec8650e
prerequisite-patch-id: 588ca94b9c4603424094a9cc2854c4f9bc83c7e4
prerequisite-patch-id: 82b4951463e8979d1c4cd15e1ca6a36308b21b51
prerequisite-patch-id: 75cdb9eb6b038adfb605253163b94efd51e0276c
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 03/27] gnu: lean: Add bash-minimal.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-3-maximedevos@telenet.be
Explicitely adding this input is required for cross-compilation.

* gnu/packages/lean.scm (lean)[inputs]: Add 'bash-minimal'.
---
gnu/packages/lean.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index 1099732181..e2a0d3196a 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -19,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages lean)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages multiprecision)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
@@ -40,7 +41,8 @@
"09mklc1p6ms1jayg2f89hqfmhca3h5744lli936l38ypn1d00sxx"))))
(build-system cmake-build-system)
(inputs
- `(("gmp" ,gmp)))
+ `(("bash-minimal" ,bash-minimal) ; for bin/leanpkg
+ ("gmp" ,gmp)))
(arguments
`(#:build-type "Release" ; default upstream build type
;; XXX: Test phases currently fail on 32-bit sytems.
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 04/27] gnu: swi-prolog: Move native-inputs to inputs where appropriate.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-4-maximedevos@telenet.be
* gnu/package/prolog.scm (swi-prolog)
[native-inputs]: Keep 'texinfo', 'perl' and 'pkg-config' and move the rest
to ...
[inputs]: ... here.
---
gnu/packages/prolog.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 4eb0f4d3b6..7857fdff68 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -116,17 +116,18 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
+ `(("texinfo" ,texinfo)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)))
+ (inputs
`(("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
- ("texinfo" ,texinfo)
("libarchive" ,libarchive)
("libunwind" ,libunwind)
("libjpeg" ,libjpeg-turbo)
("libxft" ,libxft)
("fontconfig" ,fontconfig)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
("openssl" ,openssl)))
(home-page "https://www.swi-prolog.org/")
(synopsis "ISO/Edinburgh-style Prolog interpreter")
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 05/27] gnu: swi-prolog: Don't explicitely enable tests.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-5-maximedevos@telenet.be
Tests are enabled by default (except when cross-compiling).
Running tests when cross-compiling is rarely possible.

* gnu/packages/prolog.scm (swi-prolog)[arguments]<#:tests>: Remove it.
---
gnu/packages/prolog.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 7857fdff68..be5a3c5bf8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -97,7 +97,6 @@ manner. It also features an interactive interpreter.")
(build-system cmake-build-system)
(arguments
`(#:parallel-build? #t
- #:tests? #t
#:configure-flags
(list "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 06/27] gnu: swi-prolog: Make configuration wok when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-6-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set BSD_SIGNALS and QSORT_R_GNU
when cross-compiling.
---
gnu/packages/prolog.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index be5a3c5bf8..8d940530d8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,7 +99,13 @@ manner. It also features an interactive interpreter.")
(arguments
`(#:parallel-build? #t
#:configure-flags
- (list "-DINSTALL_DOCUMENTATION=ON"
+ (list ,@(if (%current-target-system)
+ ;; Set this manually, otherwise CMake would need to
+ ;; run a cross-compiled binary, which it can't do.
+ ;; These values were found on a Linux system.
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '())
+ "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
(modify-phases %standard-phases
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 07/27] gnu: swi-prolog: Don't use 'cc'.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-7-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set CMAKE_HOST_CC to gcc when
cross-compiling.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 8d940530d8..fc3956b17b 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -103,7 +103,9 @@ manner. It also features an interactive interpreter.")
;; Set this manually, otherwise CMake would need to
;; run a cross-compiled binary, which it can't do.
;; These values were found on a Linux system.
- '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
+ ;; If absent, the non-existent 'cc' is used.
+ "-DCMAKE_HOST_CC=gcc"
'())
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 08/27] gnu: swi-prolog: Use cross-compiled bash in shebangs.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-8-maximedevos@telenet.be
* gnu/packages/prolog.scm (swi-prolog)[inputs]: Add 'bash-minimal'.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index fc3956b17b..3eaec533d7 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -28,6 +28,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages backup)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages image)
@@ -128,7 +129,8 @@ manner. It also features an interactive interpreter.")
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
- `(("zlib" ,zlib)
+ `(("bash-minimal" ,bash-minimal) ; for some scripts in 'lib'
+ ("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
("libarchive" ,libarchive)
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 09/27] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-9-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set PROG_SWIPL and
SWIPL_NATIVE_FRIEND when cross-compiling.
(swi-prolog)[native-inputs]: Add 'this-package' when cross-compiling.
---
gnu/packages/prolog.scm | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 3eaec533d7..7a5ac04a0c 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -27,6 +27,7 @@
#:use-module (guix packages)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix utils)
#:use-module (gnu packages backup)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
@@ -107,6 +108,12 @@ manner. It also features an interactive interpreter.")
'("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
;; If absent, the non-existent 'cc' is used.
"-DCMAKE_HOST_CC=gcc"
+ ;; swi-prolog needs a native copy of itself for
+ ;; cross-compilation.
+ "-DSWIPL_NATIVE_FRIEND=/nowhere"
+ (string-append "-DPROG_SWIPL="
+ (assoc-ref %build-host-inputs "swi-prolog")
+ "/bin/swipl"))
'())
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
@@ -125,7 +132,15 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
- `(("texinfo" ,texinfo)
+ `(,@(if (%current-target-system)
+ (begin
+ (unless (equal? (target-64bit?)
+ (target-64bit? (%current-system)))
+ (error "swi-prolog requires --system and --target to have \
+the same word size"))
+ `(("swi-prolog" ,this-package)))
+ '())
+ ("texinfo" ,texinfo)
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 10/27] gnu: ruby-yard-with-tests: Don't enable tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-10-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-yard-with-tests)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 8db5bd9158..0f7806e81b 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -8519,8 +8519,8 @@ definitions.")
(inherit ruby-yard)
(name "ruby-yard-with-tests")
(arguments
- (substitute-keyword-arguments (package-arguments ruby-yard)
- ((#:tests? _ #t) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard))
((#:test-target _ "default") "default")
((#:phases phases '%standard-phases)
`(modify-phases ,phases
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 11/27] gnu: ruby-byebug-11: Don't enable tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-11-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-byebug-11)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 0f7806e81b..f2932cc26e 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -6735,8 +6735,7 @@ other things and it comes with a command line interface.")
(("require \"bundler/setup\".*") "")))
#t))))
(arguments
- `(#:tests? #t
- #:phases
+ `(#:phases
(modify-phases %standard-phases
(add-after 'unpack 'skip-tmp-path-sensitive-test
(lambda _
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 13/27] gnu: ruby-ffi-rzmq: Respect #:tests?.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-13-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]<#:phases>:
Only invoke "rspec" if #:tests? is true.
---
gnu/packages/ruby.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e361c699ef..7817025cb4 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7590,8 +7590,9 @@ library.")
(build-system ruby-build-system)
(arguments '(#:phases (modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "rspec"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec")))))))
(native-inputs
`(("ruby-rspec" ,ruby-rspec)))
(propagated-inputs
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 12/27] gnu: ruby-ffi-rzmq: Don't enable tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-12-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index f2932cc26e..e361c699ef 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7588,8 +7588,7 @@ library.")
(base32
"14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
(build-system ruby-build-system)
- (arguments '(#:tests? #t
- #:phases (modify-phases %standard-phases
+ (arguments '(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "rspec"))))))
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 14/27] gnu: go-1.16: Don't enable tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-14-maximedevos@telenet.be
* gnu/packages/golang.scm (go-1.16)[arguments]:
Remove #:tests? instead of unconditionally setting it to #t.
---
gnu/packages/golang.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f02d0aa9df..6da4c09f44 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -465,8 +465,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(base32
"00zv65v09kr2cljxxqypk980r4b4aqjijhbw4ikppn8km68h831n"))))
(arguments
- (substitute-keyword-arguments (package-arguments go-1.14)
- ((#:tests? _) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments go-1.14))
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'remove-unused-sourcecode-generators
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 15/27] gnu: ecl: Don't pretend to enable tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-15-maximedevos@telenet.be
* gnu/packages/lisp.scm
(ecl)[arguments]<#:tests?>: Move comment about failing tests to ...
(ecl)[arguments]<#:phases>{check}: ... this deleted phase.
(ecl)[arguments]: Remove #:tests? instead of unconditionally setting it to
#t.
---
gnu/packages/lisp.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 7eb8f54d49..2330d6ba42 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -253,12 +253,11 @@ interface to the Tk widget system.")
("libffi" ,libffi)))
(arguments
`(#:configure-flags '("--without-rt")
- ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
- ;; 2-3 tests may be due to FHS assumptions.
- #:tests? #t
#:parallel-tests? #f
#:phases
(modify-phases %standard-phases
+ ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
+ ;; 2-3 tests may be due to FHS assumptions.
(delete 'check)
(add-after 'unpack 'replace-asdf
;; Use system ASDF instead of bundled one.
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 16/27] gnu: perl-unicode-utf8: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-16-maximedevos@telenet.be
* gnu/packages/perl.scm (perl-unicode-utf8)[arguments]<#:tests?>:
Set to #false when cross-compiling.
---
gnu/packages/perl.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index 5d4843d39a..255cace07c 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -11119,7 +11119,8 @@ defined by Annex #11 is used to determine breaking positions.")
(build-system perl-build-system)
;; FIXME: Tests fail on 32-bit architectures:
;; <https://rt.cpan.org/Public/Bug/Display.html?id=127007>.
- (arguments `(#:tests? ,(target-64bit?)))
+ (arguments `(#:tests? ,(and (not (%current-target-system))
+ (target-64bit?))))
(native-inputs
`(("perl-test-fatal" ,perl-test-fatal)
("perl-test-leaktrace" ,perl-test-leaktrace)
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 17/27] gnu: libicns: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-17-maximedevos@telenet.be
The #:tests? #t is actually harmless here, because there are no
tests (though there is a trivial 'check' target). The ‘; No tests.’
comment might be confusing though.

* gnu/packages/image.scm (libicns)[arguments]: Remove.
---
gnu/packages/image.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 6e67c56d78..48bf546cf3 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -565,8 +565,6 @@ maximum quality factor.")
(inputs
`(("libpng" ,libpng)
("jasper" ,jasper)))
- (arguments
- `(#:tests? #t)) ; No tests.
(home-page "http://icns.sourceforge.net/")
(synopsis "Library for handling Mac OS icns resource files")
(description
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 18/27] gnu: python2-empy: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-18-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-empy)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4e2e719afc..c221aaa682 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2643,8 +2643,8 @@ commands.")
(define-public python2-empy
(let ((base (package-with-python2 (strip-python2-variant python-empy))))
(package/inherit base
- (arguments `(,@(package-arguments base)
- #:tests? #t)))))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments base))))))
(define-public python2-element-tree
(package
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 19/27] gnu: python2-promise: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-19-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-promise)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c221aaa682..3914c9158a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12501,8 +12501,8 @@ concurrent.futures package from Python 3.2")
(let ((promise (package-with-python2
(strip-python2-variant python-promise))))
(package/inherit promise
- (arguments (substitute-keyword-arguments (package-arguments promise)
- ((#:tests? _) #t)))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments promise)))
(native-inputs
`(("python2-futures" ,python2-futures)
("python2-pytest" ,python2-pytest)
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 20/27] gnu: ocaml4.07-fftw3: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-20-maximedevos@telenet.be
* gnu/packages/ocaml.scm (ocaml4.07-fftw3)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/ocaml.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index db1d973238..9adf9cca24 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6683,8 +6683,7 @@ language understood by ocamldoc.")
"0l66yagjkwdcib6q55wd8wiap50vi23qiahkghlvm28z7nvbclfk"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #t
- #:test-target "tests"
+ `(#:test-target "tests"
#:ocaml ,ocaml-4.07
#:findlib ,ocaml4.07-findlib
#:dune ,ocaml4.07-dune))
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 21/27] gnu: lablgtk: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-21-maximedevos@telenet.be
* gnu/packages/ocaml.scm (lablgtk)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/ocaml.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 9adf9cca24..5d0927dee4 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -6920,8 +6920,7 @@ support for Mparser.")))
"11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #t
- #:test-target "."
+ `(#:test-target "."
#:phases
(modify-phases %standard-phases
(add-before 'build 'make-writable
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 22/27] gnu: belcard: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-22-maximedevos@telenet.be
* gnu/packages/linphone.scm (belcard)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/linphone.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
index 1c60e767b0..5a4bf3d735 100644
--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -260,8 +260,7 @@ IETF.")
(build-system cmake-build-system)
(outputs '("out" "debug" "tester"))
(arguments
- `(#:tests? #t
- #:configure-flags '("-DENABLE_STATIC=OFF")
+ `(#:configure-flags '("-DENABLE_STATIC=OFF")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-vcard-grammar-location
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 23/27] gnu: pjproject: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-23-maximedevos@telenet.be
* gnu/packages/telephony.scm (pjproject)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/telephony.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index f75a168948..3075b56fa9 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -746,8 +746,7 @@ your calls and messages.")
(build-system gnu-build-system)
(outputs '("out" "debug" "static"))
(arguments
- `(#:tests? #t
- #:test-target "selftest"
+ `(#:test-target "selftest"
#:configure-flags
(list "--enable-shared"
"--with-external-speex"
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 24/27] gnu: tdlib: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-24-maximedevos@telenet.be
* gnu/packages/messaging.scm (tdlib)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/messaging.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index a7fed957a3..5f90a524d7 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2551,8 +2551,7 @@ replacement.")
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:configure-flags
+ `(#:configure-flags
(list "-DCMAKE_BUILD_TYPE=Release"
"-DTD_ENABLE_LTO=OFF") ; FIXME: Get LTO to work.
#:phases
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 25/27] gnu: extra-cmake-modules: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-25-maximedevos@telenet.be
* gnu/packages/kde-frameworks.scm
(extra-cmake-modules)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/kde-frameworks.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 00d5eb049d..91ad834bf2 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -105,7 +105,8 @@
'()
`(("qtbase" ,qtbase-5)))) ;for tests (needs qmake)
(arguments
- `(#:tests? ,(not (null? (package-native-inputs this-package)))
+ `(#:tests? ,(and (not (%current-target-system))
+ (not (null? (package-native-inputs this-package))))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-lib-path
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 02/27] gnu: lean: Set #:tests? appropriately when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-2-maximedevos@telenet.be
It still fails to cross-compile though.

* gnu/packages/lean.scm (lean)[arguments]<#:tests?>: Set to #false
when cross-compiling.
---
gnu/packages/lean.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index cc593291fd..1099732181 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -46,10 +46,10 @@
;; XXX: Test phases currently fail on 32-bit sytems.
;; Tests for those architectures have been temporarily
;; disabled, pending further investigation.
- #:tests? ,(let ((arch (or (%current-target-system)
- (%current-system))))
- (not (or (string-prefix? "i686" arch)
- (string-prefix? "armhf" arch))))
+ #:tests? ,(and (not (%current-target-system))
+ (let ((arch (%current-system)))
+ (not (or (string-prefix? "i686" arch)
+ (string-prefix? "armhf" arch)))))
#:phases
(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'patch-tests-shebangs
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 26/27] gnu: inkscape-1.1: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-26-maximedevos@telenet.be
* gnu/packages/inkscape.scm (inkscape-1.1)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/inkscape.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm
index 46c8c4cc34..f49909057a 100644
--- a/gnu/packages/inkscape.scm
+++ b/gnu/packages/inkscape.scm
@@ -215,8 +215,7 @@ endif()~%~%"
#t))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:test-target "check" ;otherwise some test binaries are missing
+ `(#:test-target "check" ;otherwise some test binaries are missing
#:imported-modules (,@%cmake-build-system-modules
(guix build glib-or-gtk-build-system))
#:modules ((guix build cmake-build-system)
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:47
[PATCH v3 27/27] gnu: ghc-bsb-http-chunked: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20210929224759.21803-27-maximedevos@telenet.be
* gnu/packages/haskell-web.scm
(ghc-bsb-http-chunked)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/haskell-web.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index a250bb4262..de3a8ec208 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -619,8 +619,9 @@ Haskell's Web Application Interface (WAI).")
(arguments
`(;; XXX: As of 0.0.4, one property test ("Identical output as Blaze")
;; fails on i686-linux.
- #:tests? ,(not (string-prefix? "i686" (or (%current-target-system)
- (%current-system))))))
+ #:tests? ,(and (not (%current-target-system))
+ (not (string-prefix? "i686" (or (%current-target-system)
+ (%current-system)))))))
(native-inputs
`(("ghc-attoparsec" ,ghc-attoparsec)
("ghc-blaze-builder" ,ghc-blaze-builder)
--
2.33.0
M
M
Maxime Devos wrote on 30 Sep 2021 00:48
Re: [PATCH v2 01/27] lint: check-tests-true: Allow #:tests? #t for some build systems.
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 50299@debbugs.gnu.org)
4433c6de3d5463b519e763463acf8cfc15c0cc7b.camel@telenet.be
Maxim Cournoyer schreef op ma 27-09-2021 om 21:14 [-0400]:
Toggle quote (8 lines)
> > +;; Likewise, though the 'check' phase is deleted by default,
> > +;; so #:tests? #t won't be useful by itself.
> > +(test-equal "tests-true: #:tests? #t acceptable for texlive packages"
> > + '()
> > + (let ((pkg (dummy-package "x"
> > + (build-system emacs-build-system)
> ^ texlive-build-system ? :-)

I sent a v3 fixing this.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVTtWhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jpbAQCxiw+RjsnlRKY74uBMQiF4Sxsi
ka36rpLGE1d6kCxVxwEA5qavxwJ62a5nYFi7bigumpW1dL4ht5cziOuM/pV8Fws=
=K05p
-----END PGP SIGNATURE-----


Z
Z
zimoun wrote on 11 Oct 2021 14:13
Re: bug#50299: [PATCH v3 15/27] gnu: ecl: Don't pretend to enable tests when cross-compiling.
(name . Maxime Devos)(address . maximedevos@telenet.be)
CAJ3okZ0DJ8aQvWQgHtzX9Cn04smNBzoFaQQPruXjkNp1xnBiAw@mail.gmail.com
Hi Maxime,

I was roaming on this series and the message:

Don't pretend to enable tests when cross-compiling.

or elsewhere

Don't run tests when cross-compiling.

appears to me misleading. I would write:

Remove unconditional tests.

or something along these lines which is what these commits are doing, IIUC.

On Thu, 30 Sept 2021 at 00:50, Maxime Devos <maximedevos@telenet.be> wrote:

Toggle quote (6 lines)
> * gnu/packages/lisp.scm
> (ecl)[arguments]<#:tests?>: Move comment about failing tests to ...
> (ecl)[arguments]<#:phases>{check}: ... this deleted phase.
> (ecl)[arguments]: Remove #:tests? instead of unconditionally setting it to
> #t.

Thanks for working on that.

Cheers,
simon
M
M
Maxime Devos wrote on 15 Oct 2021 22:45
(name . zimoun)(address . zimon.toutoune@gmail.com)
6c9e469cf527a8060620ddde252cdc07b590fd91.camel@telenet.be
zimoun schreef op ma 11-10-2021 om 14:13 [+0200]:
Toggle quote (2 lines)
> Hi Maxime, [...]

Thanks for taking a look at the patch series!
However, I won't be hacking on Guix for a while,
so I won't be posting a revised patch series.

Greetings,
Maxime.
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 04/25] gnu: swi-prolog: Move native-inputs to inputs where appropriate.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-5-maximedevos@telenet.be
* gnu/package/prolog.scm (swi-prolog)
[native-inputs]: Keep 'texinfo', 'perl' and 'pkg-config' and move the rest
to ...
[inputs]: ... here.
---
gnu/packages/prolog.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 4eb0f4d3b6..7857fdff68 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -116,17 +116,18 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
+ `(("texinfo" ,texinfo)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)))
+ (inputs
`(("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
- ("texinfo" ,texinfo)
("libarchive" ,libarchive)
("libunwind" ,libunwind)
("libjpeg" ,libjpeg-turbo)
("libxft" ,libxft)
("fontconfig" ,fontconfig)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
("openssl" ,openssl)))
(home-page "https://www.swi-prolog.org/")
(synopsis "ISO/Edinburgh-style Prolog interpreter")
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 05/25] gnu: swi-prolog: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-6-maximedevos@telenet.be
Tests are enabled by default (except when cross-compiling).
Running tests when cross-compiling is rarely possible.

* gnu/packages/prolog.scm (swi-prolog)[arguments]<#:tests>: Remove it.
---
gnu/packages/prolog.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 7857fdff68..be5a3c5bf8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -97,7 +97,6 @@ manner. It also features an interactive interpreter.")
(build-system cmake-build-system)
(arguments
`(#:parallel-build? #t
- #:tests? #t
#:configure-flags
(list "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 03/25] gnu: lean: Add bash-minimal.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-4-maximedevos@telenet.be
Explicitely adding this input is required for cross-compilation.

* gnu/packages/lean.scm (lean)[inputs]: Add 'bash-minimal'.
---
gnu/packages/lean.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index fa36d282d7..7f4cd507f8 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -19,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages lean)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages multiprecision)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
@@ -40,7 +41,7 @@
"09mklc1p6ms1jayg2f89hqfmhca3h5744lli936l38ypn1d00sxx"))))
(build-system cmake-build-system)
(inputs
- (list gmp))
+ (list bash-minimal gmp))
(arguments
`(#:build-type "Release" ; default upstream build type
;; XXX: Test phases currently fail on 32-bit sytems.
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 00/25] Fix 'check-tests-true' linter and some packages
(address . 50299@debbugs.gnu.org)
20211231121507.70323-1-maximedevos@telenet.be
Hi,

The following changes from v3 were made:

* rebased on latest master
* in the swi-prolog patch, a use of %build-host-inputs
has been replaced by #$(this-package-native-input ...)
* The patch 'gnu: swi-prolog: Correct reference to 'bin/swi-prolog' is new.
* Commit messages are made more consistent.
E.g., patches removing ‘#:tests? #t’ are now named
‘gnu: ...: Run tests conditionally’
and ‘Don't run tests when cross-compiling.’ is reserved for patches that
actually look at %current-target-system.

Maxime Devos (25):
lint: check-tests-true: Allow #:tests? #t for some build systems.
gnu: lean: Don't run tests when cross-compiling.
gnu: lean: Add bash-minimal.
gnu: swi-prolog: Move native-inputs to inputs where appropriate.
gnu: swi-prolog: Run tests conditionally.
gnu: swi-prolog: Make configuration wok when cross-compiling.
gnu: swi-prolog: Don't use 'cc'.
gnu: swi-prolog: Use cross-compiled bash in shebangs.
gnu: swi-prolog: Set PROG_SWIPL when cross-compiling.
gnu: swi-prolog: Correct reference to 'bin/swi-prolog'.
gnu: ruby-yard-with-tests: Run tests conditionally.
gnu: ruby-ffi-rzmq: Run tests conditionally.
gnu: ruby-ffi-rzmq: Respect #:tests?.
gnu: go-1.16: Don't run tests when cross-compiling.
gnu: ecl: Run tests conditionally.
gnu: perl-unicode-utf8: Run tests conditionally.
gnu: libicns: Run tests conditionally.
gnu: python2-empy: Run tests conditionally.
gnu: python2-promise: Run tests conditionally.
gnu: lablgtk: Run tests conditionally.
gnu: belcard: Run tests conditionally.
gnu: pjproject: Run tests conditionally.
gnu: tdlib: Run tests conditionally.
gnu: extra-cmake-modules: Don't run tests when cross-compiling.
gnu: ghc-bsb-http-chunked: Don't run tests when cross-compiling.

gnu/packages/golang.scm | 4 +-
gnu/packages/haskell-web.scm | 5 ++-
gnu/packages/image.scm | 2 -
gnu/packages/kde-frameworks.scm | 3 +-
gnu/packages/lean.scm | 11 ++---
gnu/packages/linphone.scm | 3 +-
gnu/packages/lisp.scm | 5 +--
gnu/packages/messaging.scm | 3 +-
gnu/packages/ocaml.scm | 3 +-
gnu/packages/perl.scm | 3 +-
gnu/packages/prolog.scm | 79 ++++++++++++++++++++++++---------
gnu/packages/python-xyz.scm | 8 ++--
gnu/packages/ruby.scm | 12 ++---
gnu/packages/telephony.scm | 3 +-
guix/lint.scm | 11 +++++
tests/lint.scm | 21 +++++++++
16 files changed, 122 insertions(+), 54 deletions(-)


base-commit: a4eb287e5e978719b0a736a587ceafb3686882ec
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 08/25] gnu: swi-prolog: Use cross-compiled bash in shebangs.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-9-maximedevos@telenet.be
* gnu/packages/prolog.scm (swi-prolog)[inputs]: Add 'bash-minimal'.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index fc3956b17b..3eaec533d7 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -28,6 +28,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages backup)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages image)
@@ -128,7 +129,8 @@ manner. It also features an interactive interpreter.")
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
- `(("zlib" ,zlib)
+ `(("bash-minimal" ,bash-minimal) ; for some scripts in 'lib'
+ ("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
("libarchive" ,libarchive)
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 01/25] lint: check-tests-true: Allow #:tests? #t for some build systems.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-2-maximedevos@telenet.be
emacs-build-system sets #:tests? #f by default, so the linter
shouldn't warn if #:tests? #t is set for packages using
emacs-build-system. Likewise for texlive-build-system

* guix/lint.scm (check-tests-true): Do not warn if the build system
is emacs-build-system or texlive-build-system.
* tests/lint.scm
("tests-true: #:tests? #t acceptable for emacs packages")
("tests-true: #:tests? #t acceptable for texlive packages"): New tests.

Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
guix/lint.scm | 11 +++++++++++
tests/lint.scm | 21 +++++++++++++++++++++
2 files changed, 32 insertions(+)

Toggle diff (70 lines)
diff --git a/guix/lint.scm b/guix/lint.scm
index 379bd0e80b..8655f3aea7 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -34,6 +34,7 @@
#:use-module (guix store)
#:autoload (guix base16) (bytevector->base16-string)
#:use-module (guix base32)
+ #:use-module (guix build-system)
#:use-module (guix diagnostics)
#:use-module (guix download)
#:use-module (guix ftp-client)
@@ -279,6 +280,16 @@ superfluous when building natively and incorrect when cross-compiling."
(eq? tests? #t))
(package-arguments package)))
(if (and (tests-explicitly-enabled?)
+ ;; emacs-build-system sets #:tests? #f by default, therefore
+ ;; writing #:tests? #t in package definitions using
+ ;; emacs-build-system is reasonable. Likewise for
+ ;; texlive-build-system.
+ ;;
+ ;; Compare the name of the build system instead of the build system
+ ;; itself to avoid loading unnecessary modules when only a few
+ ;; modules are linted.
+ (not (memq (build-system-name (package-build-system package))
+ '(emacs texlive)))
;; Some packages, e.g. gnutls, set #:tests?
;; differently depending on whether it is being
;; cross-compiled.
diff --git a/tests/lint.scm b/tests/lint.scm
index 76c2a70b3a..6bb24370da 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -35,6 +35,8 @@
#:use-module (guix tests http)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system texlive)
+ #:use-module (guix build-system emacs)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (guix lint)
@@ -338,6 +340,25 @@
`(#:tests? ,(not (%current-target-system)))))))
(check-tests-true pkg)))
+;; The emacs-build-system sets #:tests? #f by default.
+(test-equal "tests-true: #:tests? #t acceptable for emacs packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
+;; Likewise, though the 'check' phase is deleted by default,
+;; so #:tests? #t won't be useful by itself.
+(test-equal "tests-true: #:tests? #t acceptable for texlive packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system texlive-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
(test-equal "inputs: pkg-config is probably a native input"
"'pkg-config' should probably be a native input"
(single-lint-warning-message
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 09/25] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-10-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set PROG_SWIPL and
SWIPL_NATIVE_FRIEND when cross-compiling and make this a G-expression.
(swi-prolog)[native-inputs]: Add 'this-package' when cross-compiling.
---
gnu/packages/prolog.scm | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)

Toggle diff (69 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 3eaec533d7..00f09b49cc 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -22,11 +22,13 @@
(define-module (gnu packages prolog)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix utils)
#:use-module (gnu packages backup)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
@@ -100,16 +102,23 @@ manner. It also features an interactive interpreter.")
(arguments
`(#:parallel-build? #t
#:configure-flags
- (list ,@(if (%current-target-system)
- ;; Set this manually, otherwise CMake would need to
- ;; run a cross-compiled binary, which it can't do.
- ;; These values were found on a Linux system.
- '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
+ ,#~(list
+ #$@(if (%current-target-system)
+ ;; Set this manually, otherwise CMake would need to
+ ;; run a cross-compiled binary, which it can't do.
+ ;; These values were found on a Linux system.
+ #~("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
;; If absent, the non-existent 'cc' is used.
"-DCMAKE_HOST_CC=gcc"
- '())
- "-DINSTALL_DOCUMENTATION=ON"
- "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
+ ;; swi-prolog needs a native copy of itself for
+ ;; cross-compilation.
+ "-DSWIPL_NATIVE_FRIEND=/nowhere"
+ (string-append "-DPROG_SWIPL="
+ #+(this-package-native-input "swi-prolog")
+ "/bin/swipl"))
+ #~())
+ "-DINSTALL_DOCUMENTATION=ON"
+ "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
(modify-phases %standard-phases
;; XXX: Delete the test phase that attempts to write to the
@@ -125,7 +134,15 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
- `(("texinfo" ,texinfo)
+ `(,@(if (%current-target-system)
+ (begin
+ (unless (equal? (target-64bit?)
+ (target-64bit? (%current-system)))
+ (error "swi-prolog requires --system and --target to have \
+the same word size"))
+ `(("swi-prolog" ,this-package)))
+ '())
+ ("texinfo" ,texinfo)
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 11/25] gnu: ruby-yard-with-tests: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-12-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-yard-with-tests)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 9d1a414914..e04302a5e3 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -8252,8 +8252,8 @@ definitions.")
(inherit ruby-yard)
(name "ruby-yard-with-tests")
(arguments
- (substitute-keyword-arguments (package-arguments ruby-yard)
- ((#:tests? _ #t) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard))
((#:test-target _ "default") "default")
((#:phases phases '%standard-phases)
`(modify-phases ,phases
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 15/25] gnu: ecl: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-16-maximedevos@telenet.be
* gnu/packages/lisp.scm
(ecl)[arguments]<#:tests?>: Move comment about failing tests to ...
(ecl)[arguments]<#:phases>{check}: ... this deleted phase.
(ecl)[arguments]: Remove #:tests? instead of unconditionally setting it to
#t.
---
gnu/packages/lisp.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 5b1100a61c..3736e1450f 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -269,12 +269,11 @@ interface to the Tk widget system.")
(list gmp libatomic-ops libgc libffi))
(arguments
`(#:configure-flags '("--without-rt")
- ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
- ;; 2-3 tests may be due to FHS assumptions.
- #:tests? #t
#:parallel-tests? #f
#:phases
(modify-phases %standard-phases
+ ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
+ ;; 2-3 tests may be due to FHS assumptions.
(delete 'check)
(add-after 'unpack 'replace-asdf
;; Use system ASDF instead of bundled one.
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 13/25] gnu: ruby-ffi-rzmq: Respect #:tests?.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-14-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]<#:phases>:
Only invoke "rspec" if #:tests? is true.
---
gnu/packages/ruby.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index be773c7a61..a94270ecfa 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7351,8 +7351,9 @@ library.")
(build-system ruby-build-system)
(arguments '(#:phases (modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "rspec"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec")))))))
(native-inputs
(list ruby-rspec))
(propagated-inputs
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 17/25] gnu: libicns: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-18-maximedevos@telenet.be
The #:tests? #t is actually harmless here, because there are no
tests (though there is a trivial 'check' target). The ‘; No tests.’
comment might be confusing though.

* gnu/packages/image.scm (libicns)[arguments]: Remove.
---
gnu/packages/image.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index 6cf171a410..a8a77f7767 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -563,8 +563,6 @@ maximum quality factor.")
(build-system gnu-build-system)
(inputs
(list libpng jasper))
- (arguments
- `(#:tests? #t)) ; No tests.
(home-page "http://icns.sourceforge.net/")
(synopsis "Library for handling Mac OS icns resource files")
(description
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 16/25] gnu: perl-unicode-utf8: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-17-maximedevos@telenet.be
* gnu/packages/perl.scm (perl-unicode-utf8)[arguments]<#:tests?>:
Set to #false when cross-compiling.
---
gnu/packages/perl.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index c6d63ce041..2b33d2dce4 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -10861,7 +10861,8 @@ defined by Annex #11 is used to determine breaking positions.")
(build-system perl-build-system)
;; FIXME: Tests fail on 32-bit architectures:
;; <https://rt.cpan.org/Public/Bug/Display.html?id=127007>.
- (arguments `(#:tests? ,(target-64bit?)))
+ (arguments `(#:tests? ,(and (not (%current-target-system))
+ (target-64bit?))))
(native-inputs
(list perl-test-fatal perl-test-leaktrace perl-variable-magic
perl-test-pod))
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 18/25] gnu: python2-empy: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-19-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-empy)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 02aa58dcf0..be69b563ad 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2742,8 +2742,8 @@ commands.")
(define-public python2-empy
(let ((base (package-with-python2 (strip-python2-variant python-empy))))
(package/inherit base
- (arguments `(,@(package-arguments base)
- #:tests? #t)))))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments base))))))
(define-public python2-element-tree
(package
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 20/25] gnu: lablgtk: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-21-maximedevos@telenet.be
* gnu/packages/ocaml.scm (lablgtk)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/ocaml.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index e6001ca37b..01cf348e54 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7090,8 +7090,7 @@ support for Mparser.")))
"11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #t
- #:test-target "."
+ `(#:test-target "."
#:phases
(modify-phases %standard-phases
(add-before 'build 'make-writable
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 19/25] gnu: python2-promise: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-20-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-promise)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index be69b563ad..cfd1b28384 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13196,8 +13196,8 @@ concurrent.futures package from Python 3.2")
(let ((promise (package-with-python2
(strip-python2-variant python-promise))))
(package/inherit promise
- (arguments (substitute-keyword-arguments (package-arguments promise)
- ((#:tests? _) #t)))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments promise)))
(native-inputs
`(("python2-futures" ,python2-futures)
("python2-pytest" ,python2-pytest)
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 22/25] gnu: pjproject: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-23-maximedevos@telenet.be
* gnu/packages/telephony.scm (pjproject)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/telephony.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/telephony.scm b/gnu/packages/telephony.scm
index 426ccad723..0dc86fd02d 100644
--- a/gnu/packages/telephony.scm
+++ b/gnu/packages/telephony.scm
@@ -764,8 +764,7 @@ your calls and messages.")
(build-system gnu-build-system)
(outputs '("out" "debug" "static"))
(arguments
- `(#:tests? #t
- #:test-target "selftest"
+ `(#:test-target "selftest"
#:configure-flags
(list "--enable-shared"
"--with-external-speex"
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 21/25] gnu: belcard: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-22-maximedevos@telenet.be
* gnu/packages/linphone.scm (belcard)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/linphone.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
index 285ecb58fd..1536597f1d 100644
--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -260,8 +260,7 @@ IETF.")
(build-system cmake-build-system)
(outputs '("out" "debug" "tester"))
(arguments
- `(#:tests? #t
- #:configure-flags '("-DENABLE_STATIC=OFF")
+ `(#:configure-flags '("-DENABLE_STATIC=OFF")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-vcard-grammar-location
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 23/25] gnu: tdlib: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-24-maximedevos@telenet.be
* gnu/packages/messaging.scm (tdlib)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/messaging.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 52b01c8f87..365dfe4090 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2608,8 +2608,7 @@ replacement.")
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:configure-flags
+ `(#:configure-flags
(list "-DCMAKE_BUILD_TYPE=Release"
"-DTD_ENABLE_LTO=OFF") ; FIXME: Get LTO to work.
#:phases
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 24/25] gnu: extra-cmake-modules: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-25-maximedevos@telenet.be
* gnu/packages/kde-frameworks.scm
(extra-cmake-modules)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/kde-frameworks.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 65937f8970..aa88d140f5 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -106,7 +106,8 @@
'()
`(("qtbase" ,qtbase-5)))) ;for tests (needs qmake)
(arguments
- `(#:tests? ,(not (null? (package-native-inputs this-package)))
+ `(#:tests? ,(and (not (%current-target-system))
+ (not (null? (package-native-inputs this-package))))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-lib-path
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:15
[PATCH v4 25/25] gnu: ghc-bsb-http-chunked: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-26-maximedevos@telenet.be
* gnu/packages/haskell-web.scm
(ghc-bsb-http-chunked)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/haskell-web.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 34dd2556be..70a4eccce6 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -603,8 +603,9 @@ Haskell's Web Application Interface (WAI).")
(arguments
`(;; XXX: As of 0.0.4, one property test ("Identical output as Blaze")
;; fails on i686-linux.
- #:tests? ,(not (string-prefix? "i686" (or (%current-target-system)
- (%current-system))))
+ #:tests? ,(and (not (%current-target-system))
+ (not (string-prefix? "i686" (or (%current-target-system)
+ (%current-system)))))
#:cabal-revision
("3" "15hg352id2f4x0dnvv47bdiz6gv5hp5a2mki9yzmhc7ajpk31mdd")))
(native-inputs
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 14/25] gnu: go-1.16: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-15-maximedevos@telenet.be
* gnu/packages/golang.scm (go-1.16)[arguments]:
Remove #:tests? instead of unconditionally setting it to #t.
---
gnu/packages/golang.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index de0f5a695e..e139ba6f36 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -473,8 +473,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(base32
"06c8dcmni38za638ma069izd9kbxr6ii6ccflbibgc6k54lpc3fb"))))
(arguments
- (substitute-keyword-arguments (package-arguments go-1.14)
- ((#:tests? _) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments go-1.14))
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'remove-unused-sourcecode-generators
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 10/25] gnu: swi-prolog: Correct reference to 'bin/swi-prolog'.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-11-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:phases>{fix-cross-references}: New phase.
---
gnu/packages/prolog.scm | 37 ++++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)

Toggle diff (50 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 00f09b49cc..86ac2c2bb1 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -120,19 +120,30 @@ manner. It also features an interactive interpreter.")
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
- (modify-phases %standard-phases
- ;; XXX: Delete the test phase that attempts to write to the
- ;; immutable store.
- (add-after 'unpack 'delete-failing-tests
- (lambda _
- (substitute* "src/CMakeLists.txt"
- ((" save") ""))
- (substitute* "src/test.pl"
- (("testdir\\('Tests/save'\\).") ""))
- (with-directory-excursion "src/Tests"
- (for-each delete-file-recursively
- '("save")))
- #t)))))
+ ,#~(modify-phases %standard-phases
+ ;; XXX: Delete the test phase that attempts to write to the
+ ;; immutable store.
+ (add-after 'unpack 'delete-failing-tests
+ (lambda _
+ (substitute* "src/CMakeLists.txt"
+ ((" save") ""))
+ (substitute* "src/test.pl"
+ (("testdir\\('Tests/save'\\).") ""))
+ (with-directory-excursion "src/Tests"
+ (for-each delete-file-recursively
+ '("save")))
+ #t))
+ #$@(if (%current-target-system)
+ ;; Prevent man_server.pl and swipl-lfr.pl from keeping a
+ ;; reference to the native swi-prolog.
+ ;; FIXME: libswipl.so and swipl-ld keep a reference to the
+ ;; cross-compiler.
+ #~((add-after 'install 'fix-cross-references
+ (lambda _
+ (define bin `(,(string-append #$output "/bin")))
+ (for-each (lambda (file) (patch-shebang file bin))
+ (find-files #$output ".pl$")))))
+ #~()))))
(native-inputs
`(,@(if (%current-target-system)
(begin
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 12/25] gnu: ruby-ffi-rzmq: Run tests conditionally.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-13-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e04302a5e3..be773c7a61 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7349,8 +7349,7 @@ library.")
(base32
"14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
(build-system ruby-build-system)
- (arguments '(#:tests? #t
- #:phases (modify-phases %standard-phases
+ (arguments '(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "rspec"))))))
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 06/25] gnu: swi-prolog: Make configuration wok when cross-compiling.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-7-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set BSD_SIGNALS and QSORT_R_GNU
when cross-compiling.
---
gnu/packages/prolog.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index be5a3c5bf8..8d940530d8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,7 +99,13 @@ manner. It also features an interactive interpreter.")
(arguments
`(#:parallel-build? #t
#:configure-flags
- (list "-DINSTALL_DOCUMENTATION=ON"
+ (list ,@(if (%current-target-system)
+ ;; Set this manually, otherwise CMake would need to
+ ;; run a cross-compiled binary, which it can't do.
+ ;; These values were found on a Linux system.
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '())
+ "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
(modify-phases %standard-phases
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 02/25] gnu: lean: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-3-maximedevos@telenet.be
It still fails to cross-compile though.

* gnu/packages/lean.scm (lean)[arguments]<#:tests?>: Set to #false
when cross-compiling.
---
gnu/packages/lean.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index 6ac7f1668a..fa36d282d7 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -46,10 +46,10 @@
;; XXX: Test phases currently fail on 32-bit sytems.
;; Tests for those architectures have been temporarily
;; disabled, pending further investigation.
- #:tests? ,(let ((arch (or (%current-target-system)
- (%current-system))))
- (not (or (string-prefix? "i686" arch)
- (string-prefix? "armhf" arch))))
+ #:tests? ,(and (not (%current-target-system))
+ (let ((arch (%current-system)))
+ (not (or (string-prefix? "i686" arch)
+ (string-prefix? "armhf" arch)))))
#:phases
(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'patch-tests-shebangs
--
2.30.2
M
M
Maxime Devos wrote on 31 Dec 2021 13:14
[PATCH v4 07/25] gnu: swi-prolog: Don't use 'cc'.
(address . 50299@debbugs.gnu.org)
20211231121507.70323-8-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set CMAKE_HOST_CC to gcc when
cross-compiling.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 8d940530d8..fc3956b17b 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -103,7 +103,9 @@ manner. It also features an interactive interpreter.")
;; Set this manually, otherwise CMake would need to
;; run a cross-compiled binary, which it can't do.
;; These values were found on a Linux system.
- '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
+ ;; If absent, the non-existent 'cc' is used.
+ "-DCMAKE_HOST_CC=gcc"
'())
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 23/24] gnu: extra-cmake-modules: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-24-maximedevos@telenet.be
* gnu/packages/kde-frameworks.scm
(extra-cmake-modules)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/kde-frameworks.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/kde-frameworks.scm b/gnu/packages/kde-frameworks.scm
index 65937f8970..aa88d140f5 100644
--- a/gnu/packages/kde-frameworks.scm
+++ b/gnu/packages/kde-frameworks.scm
@@ -106,7 +106,8 @@
'()
`(("qtbase" ,qtbase-5)))) ;for tests (needs qmake)
(arguments
- `(#:tests? ,(not (null? (package-native-inputs this-package)))
+ `(#:tests? ,(and (not (%current-target-system))
+ (not (null? (package-native-inputs this-package))))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-lib-path
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 22/24] gnu: tdlib: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-23-maximedevos@telenet.be
* gnu/packages/messaging.scm (tdlib)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/messaging.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 779d37fdd7..14657facd1 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -2625,8 +2625,7 @@ replacement.")
(file-name (git-file-name name version))))
(build-system cmake-build-system)
(arguments
- `(#:tests? #t
- #:configure-flags
+ `(#:configure-flags
(list "-DCMAKE_BUILD_TYPE=Release"
"-DTD_ENABLE_LTO=OFF") ; FIXME: Get LTO to work.
#:phases
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:00
[PATCH v5 02/24] gnu: lean: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-3-maximedevos@telenet.be
It still fails to cross-compile though.

* gnu/packages/lean.scm (lean)[arguments]<#:tests?>: Set to #false
when cross-compiling.
---
gnu/packages/lean.scm | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index 6ac7f1668a..fa36d282d7 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -46,10 +46,10 @@
;; XXX: Test phases currently fail on 32-bit sytems.
;; Tests for those architectures have been temporarily
;; disabled, pending further investigation.
- #:tests? ,(let ((arch (or (%current-target-system)
- (%current-system))))
- (not (or (string-prefix? "i686" arch)
- (string-prefix? "armhf" arch))))
+ #:tests? ,(and (not (%current-target-system))
+ (let ((arch (%current-system)))
+ (not (or (string-prefix? "i686" arch)
+ (string-prefix? "armhf" arch)))))
#:phases
(modify-phases %standard-phases
(add-after 'patch-source-shebangs 'patch-tests-shebangs
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:00
[PATCH v5 00/24] Fix 'check-tests-true' linter and some packages
(address . 50299@debbugs.gnu.org)
20220304130119.14858-1-maximedevos@telenet.be
This is the v4 patch, rebased. No other changes.
M
M
Maxime Devos wrote on 4 Mar 2022 14:00
[PATCH v5 03/24] gnu: lean: Add bash-minimal.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-4-maximedevos@telenet.be
Explicitely adding this input is required for cross-compilation.

* gnu/packages/lean.scm (lean)[inputs]: Add 'bash-minimal'.
---
gnu/packages/lean.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/lean.scm b/gnu/packages/lean.scm
index fa36d282d7..7f4cd507f8 100644
--- a/gnu/packages/lean.scm
+++ b/gnu/packages/lean.scm
@@ -19,6 +19,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages lean)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages multiprecision)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
@@ -40,7 +41,7 @@
"09mklc1p6ms1jayg2f89hqfmhca3h5744lli936l38ypn1d00sxx"))))
(build-system cmake-build-system)
(inputs
- (list gmp))
+ (list bash-minimal gmp))
(arguments
`(#:build-type "Release" ; default upstream build type
;; XXX: Test phases currently fail on 32-bit sytems.
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 06/24] gnu: swi-prolog: Make configuration wok when cross-compiling.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-7-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set BSD_SIGNALS and QSORT_R_GNU
when cross-compiling.
---
gnu/packages/prolog.scm | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index be5a3c5bf8..8d940530d8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2013 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -98,7 +99,13 @@ manner. It also features an interactive interpreter.")
(arguments
`(#:parallel-build? #t
#:configure-flags
- (list "-DINSTALL_DOCUMENTATION=ON"
+ (list ,@(if (%current-target-system)
+ ;; Set this manually, otherwise CMake would need to
+ ;; run a cross-compiled binary, which it can't do.
+ ;; These values were found on a Linux system.
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '())
+ "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
(modify-phases %standard-phases
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 05/24] gnu: swi-prolog: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-6-maximedevos@telenet.be
Tests are enabled by default (except when cross-compiling).
Running tests when cross-compiling is rarely possible.

* gnu/packages/prolog.scm (swi-prolog)[arguments]<#:tests>: Remove it.
---
gnu/packages/prolog.scm | 1 -
1 file changed, 1 deletion(-)

Toggle diff (14 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 7857fdff68..be5a3c5bf8 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -97,7 +97,6 @@ manner. It also features an interactive interpreter.")
(build-system cmake-build-system)
(arguments
`(#:parallel-build? #t
- #:tests? #t
#:configure-flags
(list "-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:00
[PATCH v5 04/24] gnu: swi-prolog: Move native-inputs to inputs where appropriate.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-5-maximedevos@telenet.be
* gnu/package/prolog.scm (swi-prolog)
[native-inputs]: Keep 'texinfo', 'perl' and 'pkg-config' and move the rest
to ...
[inputs]: ... here.
---
gnu/packages/prolog.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 4eb0f4d3b6..7857fdff68 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -116,17 +116,18 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
+ `(("texinfo" ,texinfo)
+ ("perl" ,perl)
+ ("pkg-config" ,pkg-config)))
+ (inputs
`(("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
- ("texinfo" ,texinfo)
("libarchive" ,libarchive)
("libunwind" ,libunwind)
("libjpeg" ,libjpeg-turbo)
("libxft" ,libxft)
("fontconfig" ,fontconfig)
- ("perl" ,perl)
- ("pkg-config" ,pkg-config)
("openssl" ,openssl)))
(home-page "https://www.swi-prolog.org/")
(synopsis "ISO/Edinburgh-style Prolog interpreter")
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 07/24] gnu: swi-prolog: Don't use 'cc'.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-8-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set CMAKE_HOST_CC to gcc when
cross-compiling.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 8d940530d8..fc3956b17b 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -103,7 +103,9 @@ manner. It also features an interactive interpreter.")
;; Set this manually, otherwise CMake would need to
;; run a cross-compiled binary, which it can't do.
;; These values were found on a Linux system.
- '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1")
+ '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
+ ;; If absent, the non-existent 'cc' is used.
+ "-DCMAKE_HOST_CC=gcc"
'())
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:00
[PATCH v5 01/24] lint: check-tests-true: Allow #:tests? #t for some build systems.
(address . 50299@debbugs.gnu.org)
20220304130119.14858-2-maximedevos@telenet.be
emacs-build-system sets #:tests? #f by default, so the linter
shouldn't warn if #:tests? #t is set for packages using
emacs-build-system. Likewise for texlive-build-system

* guix/lint.scm (check-tests-true): Do not warn if the build system
is emacs-build-system or texlive-build-system.
* tests/lint.scm
("tests-true: #:tests? #t acceptable for emacs packages")
("tests-true: #:tests? #t acceptable for texlive packages"): New tests.

Reported-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
---
guix/lint.scm | 11 +++++++++++
tests/lint.scm | 21 +++++++++++++++++++++
2 files changed, 32 insertions(+)

Toggle diff (72 lines)
diff --git a/guix/lint.scm b/guix/lint.scm
index 3ca7a0b608..e535eb8158 100644
--- a/guix/lint.scm
+++ b/guix/lint.scm
@@ -34,6 +34,7 @@
#:use-module (guix store)
#:autoload (guix base16) (bytevector->base16-string)
#:use-module (guix base32)
+ #:use-module (guix build-system)
#:use-module (guix diagnostics)
#:use-module (guix download)
#:use-module (guix ftp-client)
@@ -279,6 +280,16 @@ superfluous when building natively and incorrect when cross-compiling."
(eq? tests? #t))
(package-arguments package)))
(if (and (tests-explicitly-enabled?)
+ ;; emacs-build-system sets #:tests? #f by default, therefore
+ ;; writing #:tests? #t in package definitions using
+ ;; emacs-build-system is reasonable. Likewise for
+ ;; texlive-build-system.
+ ;;
+ ;; Compare the name of the build system instead of the build system
+ ;; itself to avoid loading unnecessary modules when only a few
+ ;; modules are linted.
+ (not (memq (build-system-name (package-build-system package))
+ '(emacs texlive)))
;; Some packages, e.g. gnutls, set #:tests?
;; differently depending on whether it is being
;; cross-compiled.
diff --git a/tests/lint.scm b/tests/lint.scm
index 76c2a70b3a..6bb24370da 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -35,6 +35,8 @@
#:use-module (guix tests http)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system texlive)
+ #:use-module (guix build-system emacs)
#:use-module (guix build-system gnu)
#:use-module (guix packages)
#:use-module (guix lint)
@@ -338,6 +340,25 @@
`(#:tests? ,(not (%current-target-system)))))))
(check-tests-true pkg)))
+;; The emacs-build-system sets #:tests? #f by default.
+(test-equal "tests-true: #:tests? #t acceptable for emacs packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system emacs-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
+;; Likewise, though the 'check' phase is deleted by default,
+;; so #:tests? #t won't be useful by itself.
+(test-equal "tests-true: #:tests? #t acceptable for texlive packages"
+ '()
+ (let ((pkg (dummy-package "x"
+ (build-system texlive-build-system)
+ (arguments
+ `(#:tests? #t)))))
+ (check-tests-true pkg)))
+
(test-equal "inputs: pkg-config is probably a native input"
"'pkg-config' should probably be a native input"
(single-lint-warning-message

base-commit: 29091731a0c6cb649cdfd72297575fe2bb2a9591
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 08/24] gnu: swi-prolog: Use cross-compiled bash in shebangs.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-9-maximedevos@telenet.be
* gnu/packages/prolog.scm (swi-prolog)[inputs]: Add 'bash-minimal'.
---
gnu/packages/prolog.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index fc3956b17b..3eaec533d7 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -28,6 +28,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (gnu packages backup)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages image)
@@ -128,7 +129,8 @@ manner. It also features an interactive interpreter.")
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
- `(("zlib" ,zlib)
+ `(("bash-minimal" ,bash-minimal) ; for some scripts in 'lib'
+ ("zlib" ,zlib)
("gmp" ,gmp)
("readline" ,readline)
("libarchive" ,libarchive)
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 12/24] gnu: ruby-ffi-rzmq: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-13-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 59912fd795..306b07ea68 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7358,8 +7358,7 @@ library.")
(base32
"14a5kxfnf8l3ngyk8hgmk30z07aj1324ll8i48z67ps6pz2kpsrg"))))
(build-system ruby-build-system)
- (arguments '(#:tests? #t
- #:phases (modify-phases %standard-phases
+ (arguments '(#:phases (modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "rspec"))))))
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 13/24] gnu: ruby-ffi-rzmq: Respect #:tests?.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-14-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-ffi-rzmq)[arguments]<#:phases>:
Only invoke "rspec" if #:tests? is true.
---
gnu/packages/ruby.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 306b07ea68..ec557d1afa 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7360,8 +7360,9 @@ library.")
(build-system ruby-build-system)
(arguments '(#:phases (modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "rspec"))))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec")))))))
(native-inputs
(list ruby-rspec))
(propagated-inputs
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 14/24] gnu: go-1.16: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-15-maximedevos@telenet.be
* gnu/packages/golang.scm (go-1.16)[arguments]:
Remove #:tests? instead of unconditionally setting it to #t.
---
gnu/packages/golang.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 4471fea19d..eed15f4dd8 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -478,8 +478,8 @@ in the style of communicating sequential processes (@dfn{CSP}).")
(base32
"03f37dspn4h5kqf0nqwmnl858wx6hngnlvbnrjl1ll6ihc5j66jz"))))
(arguments
- (substitute-keyword-arguments (package-arguments go-1.14)
- ((#:tests? _) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments go-1.14))
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'remove-unused-sourcecode-generators
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 15/24] gnu: ecl: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-16-maximedevos@telenet.be
* gnu/packages/lisp.scm
(ecl)[arguments]<#:tests?>: Move comment about failing tests to ...
(ecl)[arguments]<#:phases>{check}: ... this deleted phase.
(ecl)[arguments]: Remove #:tests? instead of unconditionally setting it to
#t.
---
gnu/packages/lisp.scm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

Toggle diff (21 lines)
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 82fbd15381..c7b526d550 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -269,12 +269,11 @@ interface to the Tk widget system.")
(list gmp libatomic-ops libgc libffi))
(arguments
`(#:configure-flags '("--without-rt")
- ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
- ;; 2-3 tests may be due to FHS assumptions.
- #:tests? #t
#:parallel-tests? #f
#:phases
(modify-phases %standard-phases
+ ;; FIXME: As of version 20.4.24, we pass 17995 tests and fail 7.
+ ;; 2-3 tests may be due to FHS assumptions.
(delete 'check)
(add-after 'unpack 'replace-asdf
;; Use system ASDF instead of bundled one.
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 16/24] gnu: perl-unicode-utf8: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-17-maximedevos@telenet.be
* gnu/packages/perl.scm (perl-unicode-utf8)[arguments]<#:tests?>:
Set to #false when cross-compiling.
---
gnu/packages/perl.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index d6ca055147..ba65cc6e6d 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -11007,7 +11007,8 @@ defined by Annex #11 is used to determine breaking positions.")
(build-system perl-build-system)
;; FIXME: Tests fail on 32-bit architectures:
;; <https://rt.cpan.org/Public/Bug/Display.html?id=127007>.
- (arguments `(#:tests? ,(target-64bit?)))
+ (arguments `(#:tests? ,(and (not (%current-target-system))
+ (target-64bit?))))
(native-inputs
(list perl-test-fatal perl-test-leaktrace perl-variable-magic
perl-test-pod))
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 17/24] gnu: libicns: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-18-maximedevos@telenet.be
The #:tests? #t is actually harmless here, because there are no
tests (though there is a trivial 'check' target). The ‘; No tests.’
comment might be confusing though.

* gnu/packages/image.scm (libicns)[arguments]: Remove.
---
gnu/packages/image.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm
index b9c780fa69..46b64cc2ed 100644
--- a/gnu/packages/image.scm
+++ b/gnu/packages/image.scm
@@ -564,8 +564,6 @@ maximum quality factor.")
(build-system gnu-build-system)
(inputs
(list libpng jasper))
- (arguments
- `(#:tests? #t)) ; No tests.
(home-page "http://icns.sourceforge.net/")
(synopsis "Library for handling Mac OS icns resource files")
(description
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 18/24] gnu: python2-empy: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-19-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-empy)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 21e6a7755b..29df43c03d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -2768,8 +2768,8 @@ commands.")
(define-public python2-empy
(let ((base (package-with-python2 (strip-python2-variant python-empy))))
(package/inherit base
- (arguments `(,@(package-arguments base)
- #:tests? #t)))))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments base))))))
(define-public python2-element-tree
(package
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 19/24] gnu: python2-promise: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-20-maximedevos@telenet.be
* gnu/packages/python-xyz.scm (python2-promise)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/python-xyz.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 29df43c03d..227f63c65d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13916,8 +13916,8 @@ concurrent.futures package from Python 3.2")
(let ((promise (package-with-python2
(strip-python2-variant python-promise))))
(package/inherit promise
- (arguments (substitute-keyword-arguments (package-arguments promise)
- ((#:tests? _) #t)))
+ (arguments (strip-keyword-arguments '(#:tests?)
+ (package-arguments promise)))
(native-inputs
`(("python2-futures" ,python2-futures)
("python2-pytest" ,python2-pytest)
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 20/24] gnu: lablgtk: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-21-maximedevos@telenet.be
* gnu/packages/ocaml.scm (lablgtk)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/ocaml.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index b34013cc31..bf378be89e 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -7117,8 +7117,7 @@ support for Mparser.")))
"11qfc39cmwfwfpwmjh6wh98zwdv6p73bv8hqwcsss869vs1r7gmn"))))
(build-system dune-build-system)
(arguments
- `(#:tests? #t
- #:test-target "."
+ `(#:test-target "."
#:phases
(modify-phases %standard-phases
(add-before 'build 'make-writable
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 21/24] gnu: belcard: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-22-maximedevos@telenet.be
* gnu/packages/linphone.scm (belcard)[arguments]: Remove #:tests?
instead of unconditionally setting it to #t.
---
gnu/packages/linphone.scm | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/linphone.scm b/gnu/packages/linphone.scm
index 709013f061..504b494563 100644
--- a/gnu/packages/linphone.scm
+++ b/gnu/packages/linphone.scm
@@ -259,8 +259,7 @@ IETF.")
(build-system cmake-build-system)
(outputs '("out" "debug" "tester"))
(arguments
- `(#:tests? #t
- #:configure-flags '("-DENABLE_STATIC=OFF")
+ `(#:configure-flags '("-DENABLE_STATIC=OFF")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'patch-vcard-grammar-location
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 24/24] gnu: ghc-bsb-http-chunked: Don't run tests when cross-compiling.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-25-maximedevos@telenet.be
* gnu/packages/haskell-web.scm
(ghc-bsb-http-chunked)[arguments]<#:tests?>: Set to #false when
cross-compiling.
---
gnu/packages/haskell-web.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (18 lines)
diff --git a/gnu/packages/haskell-web.scm b/gnu/packages/haskell-web.scm
index 34dd2556be..70a4eccce6 100644
--- a/gnu/packages/haskell-web.scm
+++ b/gnu/packages/haskell-web.scm
@@ -603,8 +603,9 @@ Haskell's Web Application Interface (WAI).")
(arguments
`(;; XXX: As of 0.0.4, one property test ("Identical output as Blaze")
;; fails on i686-linux.
- #:tests? ,(not (string-prefix? "i686" (or (%current-target-system)
- (%current-system))))
+ #:tests? ,(and (not (%current-target-system))
+ (not (string-prefix? "i686" (or (%current-target-system)
+ (%current-system)))))
#:cabal-revision
("3" "15hg352id2f4x0dnvv47bdiz6gv5hp5a2mki9yzmhc7ajpk31mdd")))
(native-inputs
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 09/24] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-10-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:configure-flags>: Set PROG_SWIPL and
SWIPL_NATIVE_FRIEND when cross-compiling and make this a G-expression.
(swi-prolog)[native-inputs]: Add 'this-package' when cross-compiling.
---
gnu/packages/prolog.scm | 35 ++++++++++++++++++++++++++---------
1 file changed, 26 insertions(+), 9 deletions(-)

Toggle diff (69 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 3eaec533d7..00f09b49cc 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -22,11 +22,13 @@
(define-module (gnu packages prolog)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
+ #:use-module (guix utils)
#:use-module (gnu packages backup)
#:use-module (gnu packages bash)
#:use-module (gnu packages compression)
@@ -100,16 +102,23 @@ manner. It also features an interactive interpreter.")
(arguments
`(#:parallel-build? #t
#:configure-flags
- (list ,@(if (%current-target-system)
- ;; Set this manually, otherwise CMake would need to
- ;; run a cross-compiled binary, which it can't do.
- ;; These values were found on a Linux system.
- '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
+ ,#~(list
+ #$@(if (%current-target-system)
+ ;; Set this manually, otherwise CMake would need to
+ ;; run a cross-compiled binary, which it can't do.
+ ;; These values were found on a Linux system.
+ #~("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1"
;; If absent, the non-existent 'cc' is used.
"-DCMAKE_HOST_CC=gcc"
- '())
- "-DINSTALL_DOCUMENTATION=ON"
- "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
+ ;; swi-prolog needs a native copy of itself for
+ ;; cross-compilation.
+ "-DSWIPL_NATIVE_FRIEND=/nowhere"
+ (string-append "-DPROG_SWIPL="
+ #+(this-package-native-input "swi-prolog")
+ "/bin/swipl"))
+ #~())
+ "-DINSTALL_DOCUMENTATION=ON"
+ "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
(modify-phases %standard-phases
;; XXX: Delete the test phase that attempts to write to the
@@ -125,7 +134,15 @@ manner. It also features an interactive interpreter.")
'("save")))
#t)))))
(native-inputs
- `(("texinfo" ,texinfo)
+ `(,@(if (%current-target-system)
+ (begin
+ (unless (equal? (target-64bit?)
+ (target-64bit? (%current-system)))
+ (error "swi-prolog requires --system and --target to have \
+the same word size"))
+ `(("swi-prolog" ,this-package)))
+ '())
+ ("texinfo" ,texinfo)
("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 11/24] gnu: ruby-yard-with-tests: Run tests conditionally.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-12-maximedevos@telenet.be
* gnu/packages/ruby.scm (ruby-yard-with-tests)[arguments]:
Remove #:tests? instead of setting unconditionally setting it to #t.
---
gnu/packages/ruby.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 121948b4fc..59912fd795 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -8265,8 +8265,8 @@ definitions.")
(inherit ruby-yard)
(name "ruby-yard-with-tests")
(arguments
- (substitute-keyword-arguments (package-arguments ruby-yard)
- ((#:tests? _ #t) #t)
+ (substitute-keyword-arguments
+ (strip-keyword-arguments '(#:tests?) (package-arguments ruby-yard))
((#:test-target _ "default") "default")
((#:phases phases '%standard-phases)
`(modify-phases ,phases
--
2.30.2
M
M
Maxime Devos wrote on 4 Mar 2022 14:01
[PATCH v5 10/24] gnu: swi-prolog: Correct reference to 'bin/swi-prolog'.
(address . 50299@debbugs.gnu.org)(name . Maxime Devos)(address . maximedevos@telenet.be)
20220304130119.14858-11-maximedevos@telenet.be
* gnu/packages/prolog.scm
(swi-prolog)[arguments]<#:phases>{fix-cross-references}: New phase.
---
gnu/packages/prolog.scm | 37 ++++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)

Toggle diff (50 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 00f09b49cc..86ac2c2bb1 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -120,19 +120,30 @@ manner. It also features an interactive interpreter.")
"-DINSTALL_DOCUMENTATION=ON"
"-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation.
#:phases
- (modify-phases %standard-phases
- ;; XXX: Delete the test phase that attempts to write to the
- ;; immutable store.
- (add-after 'unpack 'delete-failing-tests
- (lambda _
- (substitute* "src/CMakeLists.txt"
- ((" save") ""))
- (substitute* "src/test.pl"
- (("testdir\\('Tests/save'\\).") ""))
- (with-directory-excursion "src/Tests"
- (for-each delete-file-recursively
- '("save")))
- #t)))))
+ ,#~(modify-phases %standard-phases
+ ;; XXX: Delete the test phase that attempts to write to the
+ ;; immutable store.
+ (add-after 'unpack 'delete-failing-tests
+ (lambda _
+ (substitute* "src/CMakeLists.txt"
+ ((" save") ""))
+ (substitute* "src/test.pl"
+ (("testdir\\('Tests/save'\\).") ""))
+ (with-directory-excursion "src/Tests"
+ (for-each delete-file-recursively
+ '("save")))
+ #t))
+ #$@(if (%current-target-system)
+ ;; Prevent man_server.pl and swipl-lfr.pl from keeping a
+ ;; reference to the native swi-prolog.
+ ;; FIXME: libswipl.so and swipl-ld keep a reference to the
+ ;; cross-compiler.
+ #~((add-after 'install 'fix-cross-references
+ (lambda _
+ (define bin `(,(string-append #$output "/bin")))
+ (for-each (lambda (file) (patch-shebang file bin))
+ (find-files #$output ".pl$")))))
+ #~()))))
(native-inputs
`(,@(if (%current-target-system)
(begin
--
2.30.2
M
M
Maxim Cournoyer wrote on 12 Mar 2022 05:43
Re: bug#50299: The check-tests-true lint check is incorrect for Emacs packages
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 50299-done@debbugs.gnu.org)
87k0czsrut.fsf_-_@gmail.com
Hi Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (2 lines)
> This is the v4 patch, rebased. No other changes.

I've tried to getting rid of as many lint warnings I could on each
package touched, got rid of the python2* packages touched, and squashed
many same-package/scope changes together.

Note that the latest available version of swi-prolog builds and test
fine, but fails to be cross-compiled, so I've left it as is; you may
want to investigate the upgrade.

Thank you,

Closing.

Maxim
Closed
?