]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Add prereq.sh script to the shutdown system test
authorOndřej Surý <ondrej@isc.org>
Thu, 2 Jul 2020 09:20:24 +0000 (11:20 +0200)
committerOndřej Surý <ondrej@isc.org>
Fri, 3 Jul 2020 06:54:01 +0000 (08:54 +0200)
The shutdown test requires python, pytest and dnspython.

bin/tests/system/shutdown/prereq.sh [new file with mode: 0755]
util/copyrights

diff --git a/bin/tests/system/shutdown/prereq.sh b/bin/tests/system/shutdown/prereq.sh
new file mode 100755 (executable)
index 0000000..23a16b5
--- /dev/null
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# See the COPYRIGHT file distributed with this work for additional
+# information regarding copyright ownership.
+
+SYSTEMTESTTOP=..
+. $SYSTEMTESTTOP/conf.sh
+
+if test -n "$PYTHON"
+then
+    if $PYTHON -c "import pytest" 2> /dev/null
+    then
+        :
+    else
+        echo_i "This test requires the pytest framework." >&2
+    fi
+
+    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, the pytest framework and the dnspython module." >&2
+    exit 1
+fi
+
+exit 0
index b34f61d821783c40989c7547acb6afcfffe76a1c..82276dd1cbce0401a03c7e51510eb2039c1c6938 100644 (file)
 ./bin/tests/system/sfcache/tests.sh            SH      2014,2016,2017,2018,2019,2020
 ./bin/tests/system/shutdown/clean.sh           SH      2020
 ./bin/tests/system/shutdown/conftest.py                PYTHON  2020
+./bin/tests/system/shutdown/prereq.sh          SH      2020
 ./bin/tests/system/shutdown/setup.sh           SH      2020
 ./bin/tests/system/shutdown/tests-shutdown.py  PYTHON-BIN      2020
 ./bin/tests/system/smartsign/clean.sh          SH      2010,2012,2014,2016,2018,2019,2020