[PATCH] gnu: curl: Rework tests.

  • Open
  • quality assurance status badge
Details
2 participants
  • Simon Tournier
  • Tomas Volf
Owner
unassigned
Submitted by
Tomas Volf
Severity
normal

Debbugs page

T
T
Tomas Volf wrote on 21 Jun 15:45 -0700
(address . guix-patches@gnu.org)(name . Tomas Volf)(address . ~@wolfsden.cz)
9da01ca7c05dfde59aa9625cffd2811211bce262.1750545902.git.~@wolfsden.cz
* gnu/packages/curl.scm (curl)[arguments]<#:phases>{'check}: Do not replace.
{'patch-runtests}: New phase.
{'skip-tests}: Always add, do work conditionally based on the system.

Change-Id: I78e2bf40cbb29f45568b62c5e63bc7ceea5e13ef
---
Simplify the tests, there is no need to replace the 'check phase. This should
go to core-updates due to number of packages that depend on curl.

gnu/packages/curl.scm | 65 +++++++++++++++----------------------------
1 file changed, 22 insertions(+), 43 deletions(-)

Toggle diff (77 lines)
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 3e9cd517a2..d9d6bde891 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -106,50 +106,29 @@ (define-public curl
(mkdir-p (string-append #$output:doc "/share/man"))
(rename-file (string-append #$output "/share/man/man3")
(string-append #$output:doc "/share/man/man3"))))
- (replace 'check
- (lambda* (#:key tests? parallel-tests? make-flags #:allow-other-keys)
+ (add-after 'unpack 'patch-runtests
+ (lambda _
(substitute* "tests/runtests.pl"
- (("/bin/sh") (which "sh")))
- (when tests?
- (let* ((job-count (string-append
- "-j"
- (if parallel-tests?
- (number->string (parallel-job-count))
- "1")))
- ;; Ignore test 1477 due to a missing file in the 8.5.0
- ;; release. See
- ;; <https://github.com/curl/curl/issues/12462>.
- (arguments `("-C" "tests" "test"
- ,@make-flags
- ,(if #$(or (system-hurd?)
- (target-arm32?)
- (target-aarch64?))
- ;; protocol FAIL
- (string-append "TFLAGS=~1474 "
- "!1477 "
- job-count)
- (string-append "TFLAGS=\"~1477 "
- job-count "\"")))))
- ;; The top-level "make check" does "make -C tests quiet-test", which
- ;; is too quiet. Use the "test" target instead, which is more
- ;; verbose.
- (apply invoke "make" arguments)))))
- #$@(if (system-hurd?)
- #~((add-after 'unpack 'skip-tests
- (lambda _
- (let ((port (open-file "tests/data/DISABLED" "a")))
- (display "526\n" port)
- (display "527\n" port)
- (display "532\n" port)
- (display "533\n" port)
- (display "537\n" port)
- (display "546\n" port)
- (display "564\n" port)
- (display "575\n" port)
- (display "1021\n" port)
- (display "1501\n" port)
- (close port)))))
- #~()))))
+ (("/bin/sh") (which "sh")))))
+ (add-after 'unpack 'skip-tests
+ (lambda _
+ (let ((port (open-file "tests/data/DISABLED" "a")))
+ (when #$(or (system-hurd?)
+ (target-arm32?)
+ (target-aarch64?))
+ (display "1474\n" port))
+ (when #$(system-hurd?)
+ (display "526\n" port)
+ (display "527\n" port)
+ (display "532\n" port)
+ (display "533\n" port)
+ (display "537\n" port)
+ (display "546\n" port)
+ (display "564\n" port)
+ (display "575\n" port)
+ (display "1021\n" port)
+ (display "1501\n" port))
+ (close port)))))))
(native-inputs
(list nghttp2 perl pkg-config python-minimal-wrapper))
(inputs
--
2.49.0
S
S
Simon Tournier wrote on 22 Aug 05:00 -0700
(name . Tomas Volf)(address . ~@wolfsden.cz)
87plcny3au.fsf@gmail.com
Hi,

This patch target the core-packages team or maybe the core team.

On Sun, 22 Jun 2025 at 00:45, Tomas Volf <~@wolfsden.cz> wrote:
Toggle quote (12 lines)
> * gnu/packages/curl.scm (curl)[arguments]<#:phases>{'check}: Do not replace.
> {'patch-runtests}: New phase.
> {'skip-tests}: Always add, do work conditionally based on the system.
>
> Change-Id: I78e2bf40cbb29f45568b62c5e63bc7ceea5e13ef
> ---
> Simplify the tests, there is no need to replace the 'check phase. This should
> go to core-updates due to number of packages that depend on curl.
>
> gnu/packages/curl.scm | 65 +++++++++++++++----------------------------
> 1 file changed, 22 insertions(+), 43 deletions(-)

A very quick look to this patch, LGTM.

Cheers,
simon
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 78858@patchwise.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 78858
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch