]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-21-DFUZZER: Skip test if dfuzzer is not installed
authorRichard Maw <richard.maw@codethink.co.uk>
Fri, 5 Apr 2024 16:38:18 +0000 (17:38 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 6 May 2024 08:56:55 +0000 (10:56 +0200)
test/units/testsuite-21.sh

index 7b2013fb51c484a783ae968cf05dd88f0d0abf47..08ebfd91eb65996e10908dc46c53b7a8cfb7d384 100755 (executable)
@@ -3,6 +3,12 @@
 set -eux
 set -o pipefail
 
+# check dfuzzer is present before testing
+if ! command -v dfuzzer &>/dev/null; then
+    echo "dfuzzer is not installed, skipping" | tee --append /skipped
+    exit 77
+fi
+
 # Save the end.service state before we start fuzzing, as it might get changed
 # on the fly by one of the fuzzers
 systemctl list-jobs | grep -F 'end.service' && SHUTDOWN_AT_EXIT=1 || SHUTDOWN_AT_EXIT=0