From: Laszlo Gombos Date: Sun, 13 Nov 2022 15:16:22 +0000 (+0000) Subject: test: explicitly check if systemctl is available for systemd tests X-Git-Tag: 058~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48641207f27c5ed908338bdbbbc230b26be3ac06;p=thirdparty%2Fdracut.git test: explicitly check if systemctl is available for systemd tests Dracut tests already do similar checks for test 40, 62, 63 and 98. This is useful when the full testsuite is run and systemd is not available. --- diff --git a/test/TEST-02-SYSTEMD/test.sh b/test/TEST-02-SYSTEMD/test.sh index 64b135ba4..948817d17 100755 --- a/test/TEST-02-SYSTEMD/test.sh +++ b/test/TEST-02-SYSTEMD/test.sh @@ -2,6 +2,10 @@ # shellcheck disable=SC2034 TEST_DESCRIPTION="root filesystem on a ext3 filesystem" +test_check() { + command -v systemctl &> /dev/null +} + KVERSION="${KVERSION-$(uname -r)}" # Uncomment this to debug failures diff --git a/test/TEST-04-FULL-SYSTEMD/test.sh b/test/TEST-04-FULL-SYSTEMD/test.sh index 78725c851..b4d627853 100755 --- a/test/TEST-04-FULL-SYSTEMD/test.sh +++ b/test/TEST-04-FULL-SYSTEMD/test.sh @@ -3,6 +3,10 @@ # shellcheck disable=SC2034 TEST_DESCRIPTION="Full systemd serialization/deserialization test with /usr mount" +test_check() { + command -v systemctl &> /dev/null +} + export KVERSION=${KVERSION-$(uname -r)} # Uncomment this to debug failures