]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: skip UEFI test on architectures without support
authorBenjamin Drung <benjamin.drung@canonical.com>
Wed, 27 Nov 2024 17:40:24 +0000 (18:40 +0100)
committerLaszlo <laszlo.gombos@gmail.com>
Thu, 28 Nov 2024 11:33:53 +0000 (06:33 -0500)
UEFI is only supported on x86, aarch64, and riscv64 (see architecture
check in `dracut.sh`). It is not supported on s390x.

So skip TEST-12-UEFI on architectures that do not support UEFI.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/976
test/TEST-12-UEFI/test.sh

index 700715a4478c6a46848901d874d170b4493fb9e1..4577d33bad9f24720defabf77b3ffa96584f08c9 100755 (executable)
@@ -9,6 +9,12 @@ test_check() {
         return 1
     fi
 
+    local arch=${DRACUT_ARCH:-$(uname -m)}
+    if [[ ! ${arch} =~ ^(x86_64|i.86|aarch64|riscv64)$ ]]; then
+        echo "Architecture '$arch' not supported to create a UEFI executable... Skipping" >&2
+        return 1
+    fi
+
     [[ -n "$(ovmf_code)" ]]
 }