tests: Update run_tests.sh for new mkksiso
Related: rhbz#2088631
This commit is contained in:
parent
b4f9339f7e
commit
b10dbfa7d1
@ -7,7 +7,6 @@ KSNAME=minimal.ks
|
|||||||
KS="/usr/share/doc/lorax/$KSNAME"
|
KS="/usr/share/doc/lorax/$KSNAME"
|
||||||
OUTISO=/var/tmp/out.iso
|
OUTISO=/var/tmp/out.iso
|
||||||
ISODIR=/var/tmp/iso
|
ISODIR=/var/tmp/iso
|
||||||
IMGDIR=/var/tmp/img
|
|
||||||
## Functions for testing mkkiso
|
## Functions for testing mkkiso
|
||||||
|
|
||||||
|
|
||||||
@ -32,12 +31,11 @@ function running {
|
|||||||
|
|
||||||
# unmount the dirs lazily because sometimes some outside thing is still touching them
|
# unmount the dirs lazily because sometimes some outside thing is still touching them
|
||||||
function umount_dirs {
|
function umount_dirs {
|
||||||
umount --lazy "$IMGDIR"
|
|
||||||
umount --lazy "$ISODIR"
|
umount --lazy "$ISODIR"
|
||||||
|
rm -f "$OUTISO"
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -e "$ISODIR" ] || mkdir "$ISODIR"
|
[ -e "$ISODIR" ] || mkdir "$ISODIR"
|
||||||
[ -e "$IMGDIR" ] || mkdir "$IMGDIR"
|
|
||||||
|
|
||||||
# Only add kickstart
|
# Only add kickstart
|
||||||
function ks_only {
|
function ks_only {
|
||||||
@ -61,8 +59,7 @@ function test_ks {
|
|||||||
grep "inst.ks=.*$KSNAME" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg kickstart entry"
|
grep "inst.ks=.*$KSNAME" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg kickstart entry"
|
||||||
|
|
||||||
# Is the kickstart in the UEFI config?
|
# Is the kickstart in the UEFI config?
|
||||||
mount "$ISODIR/images/efiboot.img" "$IMGDIR" || exit 1
|
grep "inst.ks=.*$KSNAME" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
|
||||||
grep "inst.ks=.*$KSNAME" "$IMGDIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add ks and cmdline
|
# Add ks and cmdline
|
||||||
@ -85,7 +82,7 @@ function test_ks_serial {
|
|||||||
grep "console=ttyS0,115200n8" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg cmdline entry"
|
grep "console=ttyS0,115200n8" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg cmdline entry"
|
||||||
|
|
||||||
# Is the serial in the UEFI config?
|
# Is the serial in the UEFI config?
|
||||||
grep "console=ttyS0,115200n8" "$IMGDIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg cmdline entry"
|
grep "console=ttyS0,115200n8" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg cmdline entry"
|
||||||
}
|
}
|
||||||
|
|
||||||
# New VOLID
|
# New VOLID
|
||||||
@ -107,7 +104,7 @@ function test_volid {
|
|||||||
grep "hd:LABEL=mkksiso-test" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg kickstart entry"
|
grep "hd:LABEL=mkksiso-test" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg kickstart entry"
|
||||||
|
|
||||||
# Is the VOLID in the UEFI config?
|
# Is the VOLID in the UEFI config?
|
||||||
grep "hd:LABEL=mkksiso-test" "$IMGDIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
|
grep "hd:LABEL=mkksiso-test" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add extra files
|
# Add extra files
|
||||||
@ -158,9 +155,11 @@ if [ -z "$REPOS" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Run lorax using the host's repository configuration file
|
# Run lorax using the host's repository configuration file
|
||||||
|
if [ ! -e "$BOOTISO" ]; then
|
||||||
running "Build boot.iso with lorax"
|
running "Build boot.iso with lorax"
|
||||||
lorax --product="Red Hat Enterprise Linux" --version=9 --release=9 --volid="RHEL-9-test" \
|
lorax --product="Red Hat Enterprise Linux" --version=9 --release=9 --volid="RHEL-9-test" \
|
||||||
$REPOS --isfinal /var/tmp/lorax-rhel9-iso/ || exit 1
|
$REPOS --isfinal /var/tmp/lorax-rhel9-iso/ || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Test mkksiso on the new boot.iso
|
# Test mkksiso on the new boot.iso
|
||||||
ks_only
|
ks_only
|
||||||
|
Loading…
Reference in New Issue
Block a user