TEST-25-IMPORT: Skip if importctl not installed
authorRichard Maw <richard.maw@codethink.co.uk>
Wed, 24 Apr 2024 11:16:37 +0000 (12:16 +0100)
committerRichard Maw <richard.maw@codethink.co.uk>
Fri, 26 Apr 2024 16:25:34 +0000 (17:25 +0100)
machinectl import-* was split out into importctl
which is a separately configurable component to machinectl
and might not always be available.

test/units/testsuite-25.sh

index b298c506e126184b0c2c7da18416ce465a2ec7e6..24b02cedcf69df4dd69b59dcd39f4fa91317f361 100755 (executable)
@@ -3,6 +3,11 @@
 set -eux
 set -o pipefail
 
+if ! command -v importctl >/dev/null; then
+    echo "importctl is not available to be chain-loaded from machinectl, skipping" >>/skipped
+    exit 77
+fi
+
 export SYSTEMD_PAGER=cat
 
 dd if=/dev/urandom of=/var/tmp/testimage.raw bs=$((1024*1024+7)) count=5