]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test(UEFI): run it both hostonly and no-hostonly
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Thu, 2 May 2024 14:08:57 +0000 (10:08 -0400)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Thu, 2 May 2024 23:47:26 +0000 (19:47 -0400)
modules.d/80test/module-setup.sh
test/TEST-18-UEFI/test.sh
test/test-functions

index 9c48a81e7d54465f87ed3ad45561ade2377bac48..eeef92b989d87f544ce10fa5e9a03d3c7be503ee 100755 (executable)
@@ -6,7 +6,7 @@ check() {
 }
 
 depends() {
-    echo "base debug"
+    echo "base debug qemu"
 }
 
 installkernel() {
index 1756ed57715322f9b690e2ecec8ea2027b997a52..11af2b40eb6e511675b803abedf41777ece5b22f 100755 (executable)
@@ -42,7 +42,16 @@ test_setup() {
     mksquashfs "$TESTDIR"/dracut.*/initramfs/ "$TESTDIR"/squashfs.img -quiet -no-progress
 
     mkdir -p "$TESTDIR"/ESP/EFI/BOOT
+
+    test_dracut \
+        --modules 'rootfs-block' \
+        --kernel-cmdline 'root=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root ro rd.skipfsck rootfstype=squashfs' \
+        --drivers 'squashfs' \
+        --uefi \
+        "$TESTDIR"/ESP/EFI/BOOT/BOOTX64.efi
+
     test_dracut \
+        --hostonly \
         --modules 'rootfs-block' \
         --kernel-cmdline 'root=/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_root ro rd.skipfsck rootfstype=squashfs' \
         --drivers 'squashfs' \
index 992e3651fac1086b8979f45b5e37b207b96b1b10..2356ad3a8607f96a6b54900136de5b9a90421956 100644 (file)
@@ -30,9 +30,10 @@ test_dracut() {
     # shellcheck disable=SC2162
     IFS=' ' read -a TEST_DRACUT_ARGS_ARRAY <<< "$TEST_DRACUT_ARGS"
 
-    "$DRACUT" "$@" \
+    "$DRACUT" \
         --kernel-cmdline "panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot quiet rd.retry=10 rd.info rd.shell=0 selinux=0 console=ttyS0,115200n81 $DEBUGFAIL" \
-        "${TEST_DRACUT_ARGS_ARRAY[@]}" || return 1
+        "${TEST_DRACUT_ARGS_ARRAY[@]}" \
+        "$@" || return 1
 }
 
 command -v test_check &> /dev/null || test_check() {