guix_mirror_bot pushed a commit to branch go-team
in repository guix.

commit f35add1943b740823de98cc3c82173e3e346e48f
Author: Roman Scherer <[email protected]>
AuthorDate: Tue Apr 14 19:07:08 2026 +0200

    gnu: go-golang-org-x-mobile: Skip TestInit on non-x86 Linux.
    
    The archNDK helper in cmd/gomobile/env.go only maps GOARCH "386" and
    "amd64" (plus "arm64" when GOOS is darwin), and panics with
    "unsupported GOARCH" otherwise.  TestInit runs runInit, which calls
    envInit -> ndkToolchain.Path -> archNDK, so the test aborts with a
    panic on aarch64, powerpc64le and riscv64.  x86_64 and i686 builds
    on the GNU build farm pass without this skip.
    
    * gnu/packages/golang-build.scm (go-golang-org-x-mobile)
    [arguments]<#:test-flags>: Skip TestInit when the target is not x86.
    
    Relates-to: guix/guix!8004
    Change-Id: I0e3209aa5f61077352716260698e257078708cdd
    Signed-off-by: Sharlatan Hellseher <[email protected]>
---
 gnu/packages/golang-build.scm | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/golang-build.scm b/gnu/packages/golang-build.scm
index 98caf36bea..d46868b45b 100644
--- a/gnu/packages/golang-build.scm
+++ b/gnu/packages/golang-build.scm
@@ -996,12 +996,20 @@ compile does not support generics.")
       #:skip-build? #t
       #:test-flags
       #~(list "-skip" (string-join
-                       ;; Permission denied to read or write go.mod file.
-                       (list "TestDocs/Modules"
-                             "TestGobind/Modules"
-                             ;; build_test.go:100: cannot set -o when building
-                             ;; non-main package
-                             "TestAndroidBuild")
+                       (append
+                        ;; Permission denied to read or write go.mod file.
+                        (list "TestDocs/Modules"
+                              "TestGobind/Modules"
+                              ;; build_test.go:100: cannot set -o when
+                              ;; building non-main package
+                              "TestAndroidBuild")
+                        ;; archNDK() in cmd/gomobile/env.go only maps
+                        ;; GOARCH 386 and amd64 (plus arm64 on darwin)
+                        ;; and panics otherwise, so TestInit crashes
+                        ;; with "unsupported GOARCH" on non-x86 Linux.
+                        (if #$(target-x86?)
+                            '()
+                            (list "TestInit")))
                        "|"))
       #:import-path "golang.org/x/mobile"
       #:phases

Reply via email to