public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Mikel Olasagasti Uranga <mikel@olasagasti.info>
To: git-commits@fedoraproject.org
Subject: [rpms/glab] epel10: Fix test for s390x and ppc64le
Date: Tue, 17 Nov 2026 13:13:48 GMT [thread overview]
Message-ID: <179492122842.1.9875645167765623924.rpms-glab-68add7b2184f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/glab
Branch : epel10
Commit : 68add7b2184fe253c0ce275084dcc7ed76f0f3e0
Author : Mikel Olasagasti Uranga <mikel@olasagasti.info>
Date : 2026-11-04T23:33:38+01:00
Stats : +65/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/glab/c/68add7b2184fe253c0ce275084dcc7ed76f0f3e0?branch=epel10
Log:
Fix test for s390x and ppc64le
[skip changelog]
---
diff --git a/0001-test-binarymgr-allow-architecture-independent-test-f.patch b/0001-test-binarymgr-allow-architecture-independent-test-f.patch
new file mode 100644
index 0000000..588fae4
--- /dev/null
+++ b/0001-test-binarymgr-allow-architecture-independent-test-f.patch
@@ -0,0 +1,63 @@
+From 213f50468411dc28274bdc16913e272c465a0637 Mon Sep 17 00:00:00 2001
+From: Mikel Olasagasti Uranga <mikel@olasagasti.info>
+Date: Wed, 4 Nov 2026 22:14:00 +0100
+Subject: [PATCH] test(binarymgr): allow architecture-independent test fixtures
+
+Accept other architectures in testSpec while preserving amd64 normalization.
+This lets managed-binary tests run on s390x and ppc64le without skips or
+changes to production platform support.
+
+Add regression coverage for all four Fedora architectures.
+
+Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
+---
+ internal/binarymgr/manager_test.go | 25 ++++++++++++++++++++-----
+ 1 file changed, 20 insertions(+), 5 deletions(-)
+
+diff --git a/internal/binarymgr/manager_test.go b/internal/binarymgr/manager_test.go
+index ad9d942e6..507aa0fdc 100644
+--- a/internal/binarymgr/manager_test.go
++++ b/internal/binarymgr/manager_test.go
+@@ -39,19 +39,34 @@ func testSpec() Spec {
+ MaxCompatibleMajor: 8,
+ SupportedOS: []string{"darwin", "linux", "windows"},
+ NormalizeArch: func(goos, goarch string) (string, error) {
+- switch goarch {
+- case "amd64":
++ if goarch == "amd64" {
+ return "x64", nil
+- case "arm64":
+- return "arm64", nil
+ }
+- return "", ErrUnsupportedPlatform
++ return goarch, nil
+ },
+ AssetName: func(os, arch string) string { return "test-" + os + "-" + arch },
+ InstalledName: func(os string) string { return "test" },
+ }
+ }
+
++func TestTestSpec_NormalizeArch(t *testing.T) {
++ t.Parallel()
++
++ for arch, want := range map[string]string{
++ "amd64": "x64",
++ "arm64": "arm64",
++ "s390x": "s390x",
++ "ppc64le": "ppc64le",
++ } {
++ t.Run(arch, func(t *testing.T) {
++ t.Parallel()
++ got, err := testSpec().NormalizeArch("linux", arch)
++ require.NoError(t, err)
++ assert.Equal(t, want, got)
++ })
++ }
++}
++
+ func TestManager_isBinaryValid(t *testing.T) {
+ t.Parallel()
+
+--
+2.56.0
+
diff --git a/glab.spec b/glab.spec
index e4c4404..5c83901 100644
--- a/glab.spec
+++ b/glab.spec
@@ -21,6 +21,8 @@ Source0: %{gosource}
# Generated by go-vendor-tools
Source1: %{archivename}-vendor.tar.bz2
Source2: go-vendor-tools.toml
+# https://gitlab.com/gitlab-org/cli/-/merge_requests/4325
+Patch0: 0001-test-binarymgr-allow-architecture-independent-test-f.patch
BuildRequires: go-vendor-tools
BuildRequires: git-core
reply other threads:[~2026-11-17 13:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179492122842.1.9875645167765623924.rpms-glab-68add7b2184f@fedoraproject.org \
--to=mikel@olasagasti.info \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox