]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix "forward" system test requirements
authorMichał Kępień <michal@isc.org>
Mon, 11 Apr 2022 12:40:20 +0000 (14:40 +0200)
committerMichał Kępień <michal@isc.org>
Mon, 11 Apr 2022 12:40:20 +0000 (14:40 +0200)
Commit 59d1eb3ff810145c8098a0a4fbf93ef4380ad739 added a Python-based
name server (bin/tests/system/forward/ans11/ans.py) to the "forward"
system test, but did not update the bin/tests/system/forward/prereq.sh
script to ensure Python is present in the test environment before the
"forward" system test is run.  Update bin/tests/system/forward/prereq.sh
to enforce that requirement.

bin/tests/system/forward/prereq.sh

index ec369f8586c81c44ee8c710d45b59b08f37853fb..2f5a187fc3e4bb633a98d3d9c0153bd48473b0a0 100644 (file)
@@ -21,3 +21,17 @@ else
     echo_i "This test requires the Net::DNS library." >&2
     exit 1
 fi
+
+if test -n "$PYTHON"
+then
+    if $PYTHON -c "import dns" 2> /dev/null
+    then
+        :
+    else
+        echo_i "This test requires the dnspython module." >&2
+        exit 1
+    fi
+else
+    echo_i "This test requires Python and the dnspython module." >&2
+    exit 1
+fi