]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
TEST-75-RESOLVED: assume knot 3.0 or newer is installed
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 12 Feb 2025 10:56:25 +0000 (19:56 +0900)
committerLuca Boccassi <bluca@debian.org>
Fri, 14 Feb 2025 11:54:56 +0000 (11:54 +0000)
And make the test failed if knot is installed but older than 3.0.

test/units/TEST-75-RESOLVED.sh

index d7b535f1538785685f0cd4eb9a67a235b8cb29ed..dc87b1192de03eb0bf757571b7364674d8d0f107 100755 (executable)
@@ -16,12 +16,14 @@ set -o pipefail
 # shellcheck source=test/units/util.sh
 . "$(dirname "$0")"/util.sh
 
-# We need at least Knot 3.0 which support (among others) the ds-push directive
-if ! knotc -c /usr/lib/systemd/tests/testdata/knot-data/knot.conf conf-check; then
-    echo "This test requires at least Knot 3.0. skipping..." | tee --append /skipped
+if ! command knotc >/dev/null; then
+    echo "command knotc not found, skipping..." | tee --append /skipped
     exit 77
 fi
 
+# We need at least Knot 3.0 which support (among others) the ds-push directive
+knotc -c /usr/lib/systemd/tests/testdata/knot-data/knot.conf conf-check
+
 RUN_OUT="$(mktemp)"
 
 run() {