diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh index 8cd29e9..0cd66f5 100755 --- a/tests/scripts/run_tests.sh +++ b/tests/scripts/run_tests.sh @@ -7,7 +7,6 @@ KSNAME=fedora-minimal.ks KS="/usr/share/doc/lorax/$KSNAME" OUTISO=/var/tmp/out.iso ISODIR=/var/tmp/iso -IMGDIR=/var/tmp/img ## Functions for testing mkkiso @@ -32,12 +31,11 @@ function running { # unmount the dirs lazily because sometimes some outside thing is still touching them function umount_dirs { - umount --lazy "$IMGDIR" umount --lazy "$ISODIR" + rm -f "$OUTISO" } [ -e "$ISODIR" ] || mkdir "$ISODIR" -[ -e "$IMGDIR" ] || mkdir "$IMGDIR" # Only add kickstart function ks_only { @@ -61,8 +59,7 @@ function test_ks { grep "inst.ks=.*$KSNAME" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg kickstart entry" # Is the kickstart in the UEFI config? - mount "$ISODIR/images/efiboot.img" "$IMGDIR" || exit 1 - grep "inst.ks=.*$KSNAME" "$IMGDIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry" + grep "inst.ks=.*$KSNAME" "$ISODIR/EFI/BOOT/grub.cfg" || fail "Missing UEFI grub.cfg kickstart entry" } # 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" # 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 @@ -107,7 +104,7 @@ function test_volid { grep "hd:LABEL=mkksiso-test" "$ISODIR/isolinux/isolinux.cfg" || fail "Missing isolinux.cfg kickstart entry" # 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 @@ -155,9 +152,11 @@ fi # 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 -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 +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 +fi # Test mkksiso on the new boot.iso ks_only