guix_mirror_bot pushed a commit to branch misc-world-rebuild in repository guix.
commit 6446d66110a00964d45a244604c5ecd87e17b7b6 Author: Tomas Volf <[email protected]> AuthorDate: Sun Jun 22 00:45:02 2025 +0200 gnu: curl: Rework tests. * gnu/packages/curl.scm (curl)[arguments]<#:phases> {'check}: Do not replace. {'patch-runtests}: New phase. {'skip-tests}: Add phase for arm targets. {'skip-tests/hurd}: Add phase for hurd targets. Change-Id: I78e2bf40cbb29f45568b62c5e63bc7ceea5e13ef Co-authored-by: Yelninei <[email protected]> Signed-off-by: Nguyễn Gia Phong <[email protected]> --- gnu/packages/curl.scm | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm index 543df26de8..9d93530508 100644 --- a/gnu/packages/curl.scm +++ b/gnu/packages/curl.scm @@ -106,36 +106,20 @@ (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?) + (("/bin/sh") (which "sh"))))) + #$@(if (or (target-arm32?) + (target-aarch64?)) #~((add-after 'unpack 'skip-tests + (lambda _ + (let ((port (open-file "tests/data/DISABLED" "a"))) + (display "1474\n" port) + (close port))))) + #~()) + #$@(if (system-hurd?) + #~((add-after 'unpack 'skip-tests/hurd (lambda _ (let ((port (open-file "tests/data/DISABLED" "a"))) (display "526\n" port) @@ -147,6 +131,7 @@ (display "564\n" port) (display "575\n" port) (display "1021\n" port) + (display "1474\n" port) (display "1501\n" port) (close port))))) #~()))))
