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,23 +138,23 @@ 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 [ ! -d "ovmf" ]; then if [ "$TESTING" = true ]; then
echo "Downloading OVMF..." if [ ! -d "ovmf" ]; then
mkdir ovmf echo "Downloading OVMF..."
cd ovmf mkdir ovmf
curl -o OVMF-X64.zip https://efi.akeo.ie/OVMF/OVMF-X64.zip cd ovmf
7z x OVMF-X64.zip curl -o OVMF-X64.zip https://efi.akeo.ie/OVMF/OVMF-X64.zip
cd .. 7z x OVMF-X64.zip
cd ..
fi
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
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
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
fi fi
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
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
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
# 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
rm ./ZealOS-BSD2-UEFI-*.iso 2> /dev/null rm ./ZealOS-BSD2-UEFI-*.iso 2> /dev/null