Make ISO testing in QEMU conditional based on TESTING variable.

This commit is contained in:
TomAwezome 2022-10-16 21:05:30 -04:00
parent 62e0c111bd
commit 9bf6c63f49

View file

@ -16,6 +16,9 @@ fi
# Uncomment if you use doas instead of sudo # Uncomment if you use doas instead of sudo
#alias sudo=doas #alias sudo=doas
# Set this true if you want to test ISOs in QEMU after building.
$TESTING = false
TMPDIR="/tmp/zealtmp" TMPDIR="/tmp/zealtmp"
TMPISODIR="$TMPDIR/iso" TMPISODIR="$TMPDIR/iso"
TMPDISK="$TMPDIR/ZealOS.raw" TMPDISK="$TMPDIR/ZealOS.raw"
@ -135,6 +138,7 @@ xorriso -joliet "on" -rockridge "on" -as mkisofs -b Boot/Limine-CD.BIN \
./limine/limine-deploy ZealOS-limine.iso ./limine/limine-deploy ZealOS-limine.iso
if [ "$TESTING" = true ]; then
if [ ! -d "ovmf" ]; then if [ ! -d "ovmf" ]; then
echo "Downloading OVMF..." echo "Downloading OVMF..."
mkdir ovmf mkdir ovmf
@ -143,14 +147,13 @@ if [ ! -d "ovmf" ]; then
7z x OVMF-X64.zip 7z x OVMF-X64.zip
cd .. cd ..
fi fi
echo "Testing limine-zealbooter-xorriso isohybrid boot in UEFI mode ..." echo "Testing limine-zealbooter-xorriso isohybrid boot in UEFI mode ..."
qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -cdrom ZealOS-limine.iso qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -bios ovmf/OVMF.fd -smp 4 -cdrom ZealOS-limine.iso
echo "Testing limine-zealbooter-xorriso isohybrid boot in BIOS mode ..." echo "Testing limine-zealbooter-xorriso isohybrid boot in BIOS mode ..."
qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -smp 4 -cdrom ZealOS-limine.iso qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -smp 4 -cdrom ZealOS-limine.iso
echo "Testing native ZealC MyDistro legacy ISO in BIOS mode ..." echo "Testing native ZealC MyDistro legacy ISO in BIOS mode ..."
qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -smp 4 -cdrom ZealOS-MyDistro.iso qemu-system-x86_64 -machine q35,accel=kvm -m 1G -rtc base=localtime -smp 4 -cdrom ZealOS-MyDistro.iso
fi
# comment these 2 lines if you want lingering old Distro ISOs # comment these 2 lines if you want lingering old Distro ISOs
rm ./ZealOS-PublicDomain-BIOS-*.iso 2> /dev/null rm ./ZealOS-PublicDomain-BIOS-*.iso 2> /dev/null