From: Michał Kępień Date: Mon, 11 Apr 2022 12:40:20 +0000 (+0200) Subject: Fix "forward" system test requirements X-Git-Tag: v9.16.28~2^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=55f24575269014e0eb50354800dace37f689f543;p=thirdparty%2Fbind9.git Fix "forward" system test requirements 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. --- diff --git a/bin/tests/system/forward/prereq.sh b/bin/tests/system/forward/prereq.sh index ec369f8586c..2f5a187fc3e 100644 --- a/bin/tests/system/forward/prereq.sh +++ b/bin/tests/system/forward/prereq.sh @@ -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