guix_mirror_bot pushed a commit to branch go-team
in repository guix.
commit 0430d4fa4ff7330813a08940c8734f10a957853c
Author: Efraim Flashner <[email protected]>
AuthorDate: Thu Aug 21 23:59:31 2025 +0300
gnu: go-1.22: Fix build on some architectures.
* gnu/packages/golang.scm (go-1.22)[arguments]: Disable parallel-tests
on riscv64-linux and armhf-linux. Add a phase to disable certain tests
based on the architecture.
(go-1.23)[arguments]: Remove new inherited phase.
Change-Id: If4ed3f195c1af504d6ab4b686829fda8c91138d2
Signed-off-by: Sharlatan Hellseher <[email protected]>
---
gnu/packages/golang.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 2183c31371..8ced9fba8c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -1056,8 +1056,28 @@ in the style of communicating sequential processes
(@dfn{CSP}).")
(base32 "0f0fr92z3l3szmxf3wvh20w1sqayvd927gawdp5d44cc44pd6c0n"))))
(arguments
(substitute-keyword-arguments (package-arguments go-1.21)
+ ((#:parallel-tests? _ #t)
+ (or (not (target-riscv64?))
+ (not (target-arm32?))))
((#:phases phases)
#~(modify-phases #$phases
+ (add-after 'disable-failing-tests 'disable-more-tests
+ (lambda _
+ #$@(cond
+ ((target-aarch64?)
+ ;; https://go-review.googlesource.com/c/go/+/151303
+ ;; This test is known buggy on aarch64 and is enabled and
+ ;; disabled upstream with some regularity.
+ #~((substitute* "src/plugin/plugin_test.go"
+ (("package plugin_test")
+ (string-append "// +build !linux linux,!arm64\n\n"
+ "package plugin_test")))
+ ;; These tests "run too slowly".
+ (substitute* "src/go/printer/printer_test.go"
+ ((".*go2numbers\\.input.*") "")
+ ((".*generics\\.input.*") "")
+ ((".*gobuild1\\.input.*") ""))))
+ (else (list #t)))))
(replace 'unpatch-perl-shebangs
(lambda _
;; Avoid inclusion of perl in closure by rewriting references
@@ -1101,6 +1121,11 @@ in the style of communicating sequential processes
(@dfn{CSP}).")
(file-name (git-file-name name version))
(sha256
(base32 "06c5cjjqk95p16cb6p8fgqqsddc1a1kj3w2m0na5v91gvwxbd0pq"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments go-1.22)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (delete 'disable-more-tests)))))
(properties
`((compiler-cpu-architectures
("aarch64" ,@%go-1.23-arm64-micro-architectures)