diff mbox series

[bug#50664,core-updates-frozen] gnu: curl: Respect #:tests?.

Message ID 8d416ea3a4f64a4a4df52084e5a9e5cce11c3c0b.1631944982.git.iskarian@mgsn.dev
State Accepted
Headers show
Series [bug#50664,core-updates-frozen] gnu: curl: Respect #:tests?. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Sarah Morgensen Sept. 18, 2021, 5:14 p.m. UTC
* gnu/packages/curl.scm (curl)[arguments]<#:phases>{check}: Respect #:tests?.
---
 gnu/packages/curl.scm | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)


base-commit: 8613652f3f80105f35db13d6d9308257bbff8474

Comments

Mathieu Othacehe Sept. 19, 2021, 3:50 p.m. UTC | #1
Hello Sarah,

> +          (lambda* (#:key (tests? (not target)) #:allow-other-keys)

I'm not sure we need the default value here, as it's already part of the
build system.

Otherwise looks nice. We can apply when merging other world rebuilding
changes, or directly on core-updates for the next round.

Thanks,

Mathieu
diff mbox series

Patch

diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 063a919700..17aed51fdd 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -124,16 +124,16 @@ 
              (rename-file (string-append out "/share/man/man3")
                           (string-append doc "/share/man/man3"))
              #t)))
-        (replace
-         'check
-         (lambda _
-           (substitute* "tests/runtests.pl"
-             (("/bin/sh") (which "sh")))
+        (replace 'check
+          (lambda* (#:key (tests? (not target)) #:allow-other-keys)
+            (substitute* "tests/runtests.pl"
+              (("/bin/sh") (which "sh")))
 
-           ;; The top-level "make check" does "make -C tests quiet-test", which
-           ;; is too quiet.  Use the "test" target instead, which is more
-           ;; verbose.
-           (invoke "make" "-C" "tests" "test"))))))
+            (when tests?
+              ;; The top-level "make check" does "make -C tests quiet-test", which
+              ;; is too quiet.  Use the "test" target instead, which is more
+              ;; verbose.
+              (invoke "make" "-C" "tests" "test")))))))
    (synopsis "Command line tool for transferring data with URL syntax")
    (description
     "curl is a command line tool for transferring data with URL syntax,