From 5c03cdd37f12b76ca2074f38959417e4b9e702b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20Neusch=C3=A4fer?= Date: Tue, 20 May 2025 11:39:33 +0200 Subject: [PATCH] pmb.arch: Add support for s390x This commit adds s390x to the list of supported architectures, to allow users/developers to experiment with it. Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2536 --- pmb/core/arch.py | 1 + test/core/test_arch.py | 1 + test/core/test_chroot.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/pmb/core/arch.py b/pmb/core/arch.py index 6242a784..195c488b 100644 --- a/pmb/core/arch.py +++ b/pmb/core/arch.py @@ -87,6 +87,7 @@ class Arch(enum.Enum): Arch.x86_64, Arch.x86, Arch.riscv64, + Arch.s390x, Arch.ppc64le, Arch.native(), } diff --git a/test/core/test_arch.py b/test/core/test_arch.py index f97e6868..4a48b30b 100644 --- a/test/core/test_arch.py +++ b/test/core/test_arch.py @@ -32,6 +32,7 @@ def test_valid_arches(): assert Arch.armv7 in Arch.supported() assert Arch.riscv64 in Arch.supported() assert Arch.ppc64le in Arch.supported() + assert Arch.s390x in Arch.supported() # kernel arch assert Arch.x86.kernel() == "x86" diff --git a/test/core/test_chroot.py b/test/core/test_chroot.py index 93d66c8e..db9cd02d 100644 --- a/test/core/test_chroot.py +++ b/test/core/test_chroot.py @@ -47,7 +47,7 @@ def test_invalid_chroots(pmb_args): Chroot(ChrootType.BUILDROOT, "BAD_ARCH") assert ( str(excinfo.value) - == "Invalid architecture: 'BAD_ARCH', expected something like: aarch64, armhf, armv7, ppc64le, riscv64, x86, x86_64" + == "Invalid architecture: 'BAD_ARCH', expected something like: aarch64, armhf, armv7, ppc64le, riscv64, s390x, x86, x86_64" ) with pytest.raises(ValueError) as excinfo: