@@ -52,7 +52,6 @@ popd || exit 2
# run in UEFI, some test cases, e.g. `x86/pmu.c`, require more free memory. A
# simple fix is to increase the QEMU default memory size to 256MiB so that
# UEFI's largest allocatable memory region is large enough.
-EFI_RUN=y \
"$TEST_DIR/run" \
-drive file="$EFI_UEFI",format=raw,if=pflash,readonly=on \
-drive file.dir="$EFI_TEST/$EFI_CASE/",file.driver=vvfat,file.rw=on,format=raw,if=virtio \
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
+source scripts/common.bash
+
if [ -z "$STANDALONE" ]; then
if [ ! -f config.mak ]; then
echo "run ./configure && make first. See ./configure -h"
@@ -39,12 +41,12 @@ fi
command="${qemu} --no-reboot -nodefaults $pc_testdev -vnc none -serial stdio $pci_testdev"
command+=" -machine accel=$ACCEL"
-if ! [ "$EFI_RUN" ]; then
+if [ "${TARGET_EFI}" != "y" ]; then
command+=" -kernel"
fi
command="$(timeout_cmd) $command"
-if [ "$EFI_RUN" ]; then
+if [ "${TARGET_EFI}" == "y" ]; then
# Set ENVIRON_DEFAULT=n to remove '-initrd' flag for QEMU (see
# 'scripts/arch-run.bash' for more details). This is because when using
# UEFI, the test case binaries are passed to QEMU through the disk