tests: Update run_tests.sh for new mkksiso
This commit is contained in:
parent
683ca95f17
commit
52072bb3c5
@ -7,7 +7,6 @@ KSNAME=fedora-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
|
||||||
@ -155,9 +152,11 @@ fi
|
|||||||
|
|
||||||
# NOTE: We must use --nomacboot because the test system doesn't have the hfsplus fs available
|
# NOTE: We must use --nomacboot because the test system doesn't have the hfsplus fs available
|
||||||
# Run lorax using the host's repository configuration file
|
# Run lorax using the host's repository configuration file
|
||||||
running "Build boot.iso with lorax"
|
if [ ! -e "$BOOTISO" ]; then
|
||||||
lorax --product="Fedora" --version=rawhide --release=rawhide --volid="Fedora-rawhide-test" \
|
running "Build boot.iso with lorax"
|
||||||
$REPOS --isfinal --nomacboot /var/tmp/lorax-fedora-iso/ || exit 1
|
lorax --product="Fedora" --version=rawhide --release=rawhide --volid="Fedora-rawhide-test" \
|
||||||
|
$REPOS --isfinal --nomacboot /var/tmp/lorax-fedora-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