distro/rhel8: add preliminary support for ppc64le and s390x
This adds placeholder architecture structs, but no image types are hooked up. This will allow osbuild-composer to run on these architectures, and serve the weldr API, but without support for building any images. Image type support will be added in the future. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
a13076a97b
commit
59355c6c91
2 changed files with 26 additions and 2 deletions
|
|
@ -844,7 +844,17 @@ func New() distro.Distro {
|
|||
openstackImgType,
|
||||
)
|
||||
|
||||
r.setArches(x8664, aarch64)
|
||||
ppc64le := architecture{
|
||||
distro: &r,
|
||||
name: "ppc64le",
|
||||
}
|
||||
|
||||
s390x := architecture{
|
||||
distro: &r,
|
||||
name: "s390x",
|
||||
}
|
||||
|
||||
r.setArches(x8664, aarch64, ppc64le, s390x)
|
||||
|
||||
return &r
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,8 @@ func TestImageType_BuildPackages(t *testing.T) {
|
|||
buildPackages := map[string][]string{
|
||||
"x86_64": x8664BuildPackages,
|
||||
"aarch64": aarch64BuildPackages,
|
||||
"ppc64le": nil,
|
||||
"s390x": nil,
|
||||
}
|
||||
d := rhel8.New()
|
||||
for _, archLabel := range d.ListArches() {
|
||||
|
|
@ -144,6 +146,12 @@ func TestImageType_Name(t *testing.T) {
|
|||
"openstack",
|
||||
},
|
||||
},
|
||||
{
|
||||
arch: "ppc64le",
|
||||
},
|
||||
{
|
||||
arch: "s390x",
|
||||
},
|
||||
}
|
||||
for _, mapping := range imgMap {
|
||||
arch, err := distro.GetArch(mapping.arch)
|
||||
|
|
@ -328,7 +336,7 @@ func TestDistro_Manifest(t *testing.T) {
|
|||
func TestRhel8_ListArches(t *testing.T) {
|
||||
distro := rhel8.New()
|
||||
arches := distro.ListArches()
|
||||
assert.Equal(t, []string{"aarch64", "x86_64"}, arches)
|
||||
assert.Equal(t, []string{"aarch64", "ppc64le", "s390x", "x86_64"}, arches)
|
||||
}
|
||||
|
||||
func TestRhel8_GetArch(t *testing.T) {
|
||||
|
|
@ -343,6 +351,12 @@ func TestRhel8_GetArch(t *testing.T) {
|
|||
{
|
||||
name: "aarch64",
|
||||
},
|
||||
{
|
||||
name: "ppc64le",
|
||||
},
|
||||
{
|
||||
name: "s390x",
|
||||
},
|
||||
{
|
||||
name: "foo-arch",
|
||||
errorExpected: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue