From abb3fb16337d30e4710d5b9658f9d67c831637e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Wed, 26 Aug 2026 19:32:40 -0300 Subject: [PATCH] test(build): cover the RISC-V Genesis recommendation --- xCAT-test/unit/genesis_openembedded_activation.t | 11 +++++++++++ xCAT-test/unit/riscv64_packaging.t | 2 ++ 2 files changed, 13 insertions(+) diff --git a/xCAT-test/unit/genesis_openembedded_activation.t b/xCAT-test/unit/genesis_openembedded_activation.t index 8294c57df..7aeef2c5c 100644 --- a/xCAT-test/unit/genesis_openembedded_activation.t +++ b/xCAT-test/unit/genesis_openembedded_activation.t @@ -13,6 +13,7 @@ my $rpm_weak_dependencies = join( '%if 0%{?fedora} || 0%{?rhel} >= 8 || 0%{?suse_version} >= 1500', 'Recommends: xCAT-genesis-openembedded-x86_64', 'Recommends: xCAT-genesis-openembedded-ppc64le', + 'Recommends: xCAT-genesis-openembedded-riscv64', '%endif', ); @@ -39,6 +40,11 @@ like( qr/^Recommends:.*\bxcat-genesis-openembedded-ppc64le\b/m, 'DEB installations recommend the first-class ppc64le image', ); +like( + $deb_control, + qr/^Recommends:.*\bxcat-genesis-openembedded-riscv64\b/m, + 'DEB installations recommend the first-class riscv64 image', +); unlike( $deb_control, qr/^Depends:.*\bxcat-genesis-openembedded-/m, @@ -63,6 +69,11 @@ like( qr/^Recommends:.*\bxcat-genesis-openembedded-ppc64le\b/m, 'DEB service nodes recommend the first-class ppc64le image', ); +like( + $sn_deb_control, + qr/^Recommends:.*\bxcat-genesis-openembedded-riscv64\b/m, + 'DEB service nodes recommend the first-class riscv64 image', +); my $go_xcat = slurp_repo_file('xCAT-server/share/xcat/tools/go-xcat'); unlike( diff --git a/xCAT-test/unit/riscv64_packaging.t b/xCAT-test/unit/riscv64_packaging.t index af6b40838..f4f456481 100644 --- a/xCAT-test/unit/riscv64_packaging.t +++ b/xCAT-test/unit/riscv64_packaging.t @@ -23,6 +23,7 @@ unlike( $xcat_rv || '', qr/xnba-undi|syslinux-xcat|elilo-xcat/, 'xCAT.spec does # riscv64 has no legacy Genesis package: the requirement must disappear rather than # resolve to an unsatisfiable name, and the OpenEmbedded image is recommended instead. like( $xcat, qr/^%\{\?genesistarch:Requires: xCAT-genesis-scripts-%\{genesistarch\} = 1:%\{version\}-%\{release\}\}$/m, 'xCAT.spec asks for the legacy Genesis package only where the architecture has one' ); +like( $xcat, qr/^Recommends: xCAT-genesis-openembedded-riscv64$/m, 'xCAT.spec recommends the RISC-V OpenEmbedded Genesis image' ); SKIP: { my $rpmspec = qx(command -v rpmspec 2>/dev/null); @@ -43,6 +44,7 @@ SKIP: { my $xcatsn = slurp_repo_file('xCATsn/xCATsn.spec'); like( $xcatsn, qr/^%ifarch riscv64\nRequires: ipmitool-xcat >= 1\.8\.17-1\n%endif$/m, 'xCATsn.spec requires ipmitool-xcat on riscv64' ); +like( $xcatsn, qr/^Recommends: xCAT-genesis-openembedded-riscv64$/m, 'xCATsn.spec recommends the RISC-V OpenEmbedded Genesis image' ); my $server = slurp_repo_file('xCAT-server/xCAT-server.spec'); like( $server, qr/^Recommends: perl-DB_File$/m, 'xCAT-server.spec recommends perl-DB_File on EL10 (riscv64 has no EPEL to provide it)' );