tmt: Rename test image to RHEL 10 and check for rhel templates

Resolves: RHEL-31850
This commit is contained in:
Brian C. Lane 2024-04-04 11:16:16 -07:00
parent 44136c9fbd
commit 620f5e2ba2

View File

@ -2,7 +2,7 @@
set -eux
FAILANY=0
BOOTISO=/var/tmp/lorax-fedora-iso/images/boot.iso
BOOTISO=/var/tmp/lorax-rhel10-iso/images/boot.iso
KSNAME=fedora-minimal.ks
KS="/usr/share/doc/lorax/$KSNAME"
OUTISO=/var/tmp/out.iso
@ -239,10 +239,13 @@ function run_as_user {
umount_dirs
}
if [ ! -e /usr/share/lorax/templates.d/80-rhel/ ]; then
echo "Failed to find lorax-templates-rhel templates in /usr/share/lorax/templates.d/"
exit 1
fi
# Gather up the list of system repo files and use them for lorax
REPOS=$(for f in /etc/yum.repos.d/*repo; do echo -n "--repo $f "; done)
REPOS=$(find /etc/yum.repos.d/ -maxdepth 1 -type f -name '*\.repo' -exec echo -n "--repo {} " \;)
if [ -z "$REPOS" ]; then
echo "No system repos found"
exit 1
@ -252,8 +255,8 @@ fi
# Run lorax using the host's repository configuration file
if [ ! -e "$BOOTISO" ]; then
running "Build boot.iso with lorax"
lorax --product="Fedora" --version=rawhide --release=rawhide --volid="Fedora-rawhide-test" \
$REPOS --isfinal --nomacboot /var/tmp/lorax-fedora-iso/ || exit 1
lorax --product="Red Hat Enterprise Linux" --version=10 --release=10 --volid="RHEL-10-test" \
$REPOS --isfinal /var/tmp/lorax-rhel10-iso/ || exit 1
fi
# Test mkksiso on the new boot.iso