bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#50299: The check-tests-true lint check is incorrect for Emacs packag


From: Maxim Cournoyer
Subject: bug#50299: The check-tests-true lint check is incorrect for Emacs packages
Date: Wed, 22 Sep 2021 23:41:18 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Hello Maxime,

Maxime Devos <maximedevos@telenet.be> writes:

> 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]