]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
test: improve precondition checking
authorJo Zzsi <jozzsicsataban@gmail.com>
Sun, 10 Nov 2024 11:34:24 +0000 (06:34 -0500)
committerLaszlo <laszlo.gombos@gmail.com>
Sun, 10 Nov 2024 12:26:06 +0000 (07:26 -0500)
These changes allow gentoo:slim CI container to not fail.

test/TEST-12-UEFI/test.sh
test/TEST-20-RAID/test.sh
test/TEST-21-LVM/test.sh
test/TEST-22-RAID-DEG/test.sh
test/TEST-25-LVM-THIN/test.sh
test/TEST-26-ENC-RAID-LVM/test.sh
test/TEST-30-DMSQUASH/test.sh

index 9ba7a9636845ebe40387a925e83e162d29d0c249..700715a4478c6a46848901d874d170b4493fb9e1 100755 (executable)
@@ -4,6 +4,11 @@
 TEST_DESCRIPTION="UEFI boot"
 
 test_check() {
+    if ! type -p mksquashfs &> /dev/null; then
+        echo "Test needs mksquashfs... Skipping"
+        return 1
+    fi
+
     [[ -n "$(ovmf_code)" ]]
 }
 
index 2c34dae99d15345374cfb6e218fe18e20b109475..3e412603d9a3f2043a963e86009d4e3e8a62340f 100755 (executable)
@@ -7,6 +7,11 @@ test_check() {
         echo "Test needs cryptsetup for crypt module... Skipping"
         return 1
     fi
+
+    if ! type -p mdraid &> /dev/null; then
+        echo "Test needs mdraid for mdraid module ... Skipping"
+        return 1
+    fi
 }
 
 # Uncomment this to debug failures
index 5b13e27fff3aafd92e8ec4d147c03dc68e308055..a7a6094cfa8a0a5bbfc6872fcf155a086f5610fd 100755 (executable)
@@ -11,6 +11,11 @@ test_check() {
         echo "Test needs lvm for lvm module... Skipping"
         return 1
     fi
+
+    if ! type -p mdraid &> /dev/null; then
+        echo "Test needs mdraid for mdraid module ... Skipping"
+        return 1
+    fi
 }
 
 test_run() {
index 7d578b0d79b00f615ba0bb43b9917b3e51dfc60d..82b51f11915fac7e321f971998e185ef0f1ea5c9 100755 (executable)
@@ -13,6 +13,11 @@ test_check() {
         echo "Test needs cryptsetup for crypt module... Skipping"
         return 1
     fi
+
+    if ! type -p mdraid &> /dev/null; then
+        echo "Test needs mdraid for mdraid module ... Skipping"
+        return 1
+    fi
 }
 
 client_run() {
index 61ae5d87de70e5fd7f55de3340ff96e2af87968d..32b4a0d6c5fcfd3f4cd44ccfccf159b2a8433898 100755 (executable)
@@ -10,6 +10,11 @@ test_check() {
         echo "Test needs lvm for lvm module... Skipping"
         return 1
     fi
+
+    if ! type -p mdraid &> /dev/null; then
+        echo "Test needs mdraid for mdraid module ... Skipping"
+        return 1
+    fi
 }
 
 test_run() {
index 3861c87212a65f1eea9369f5735c7d530e865d41..7a351ec1be02d99f8d940af512a850f4d91f66f1 100755 (executable)
@@ -12,6 +12,11 @@ test_check() {
         echo "Test needs cryptsetup for crypt module... Skipping"
         return 1
     fi
+
+    if ! type -p mdraid &> /dev/null; then
+        echo "Test needs mdraid for mdraid module ... Skipping"
+        return 1
+    fi
 }
 
 test_run() {
index a6c91e0ef5582a619938a96f614ac460685c1495..d7c39b57747a552628e9e048cf6d48ff0cdc1820 100755 (executable)
@@ -8,7 +8,7 @@ TEST_DESCRIPTION="live root on a squash filesystem"
 
 test_check() {
     if ! type -p mksquashfs &> /dev/null; then
-        echo "Test needs mksquashfs for crypt module... Skipping"
+        echo "Test needs mksquashfs... Skipping"
         return 1
     fi
 }