]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check for test interfaces before running system tests
authorMichał Kępień <michal@isc.org>
Thu, 25 Jan 2018 14:26:27 +0000 (15:26 +0100)
committerEvan Hunt <each@isc.org>
Mon, 26 Feb 2018 23:10:35 +0000 (15:10 -0800)
Prevent runall.sh and "make test" from even attempting to run system
tests when "ifconfig.sh up" has not been run beforehand.  This ensures
the user is not flooded with error messages in such a case.

(cherry picked from commit e0221f2d25a88fb0025070ef35463288114048ea)

bin/tests/system/Makefile.in
bin/tests/system/testsummary.sh

index a80350b037de75fd88e3c811da653c18c45a5b5f..971bef1d603de1f7bb1f5d9ca8e07eed51718d05 100644 (file)
@@ -96,6 +96,13 @@ parallel.mk:
 # Targets to run the tests.
 
 test: parallel.mk subdirs
+       @if ! ${PERL} testsock.pl > /dev/null 2>&1; then                                          \
+               echo "I:NOTE: System tests were skipped because they require that the"          ; \
+               echo "I:      IP addresses 10.53.0.1 through 10.53.0.8 be configured"           ; \
+               echo "I:      as alias addresses on the loopback interface.  Please run"        ; \
+               echo "I:      \"bin/tests/system/ifconfig.sh up\" as root to configure them."   ; \
+               exit 1                                                                          ; \
+       fi
        @$(MAKE) -f parallel.mk check
        @$(SHELL) ./runsequential.sh -r
        @$(SHELL) ./testsummary.sh
index f7cd4569b43f8c75887afd2072deb77092ce6b8b..b585a2f6f0c5dd11cbe8b3ea9a6d438d66880fea 100644 (file)
@@ -45,15 +45,6 @@ if [ $keepfile -eq 0 ]; then
     rm -f */test.output
 fi
 
-$PERL testsock.pl || {
-    cat <<EOF
-I:NOTE: System tests were skipped because they require that the
-I:      IP addresses 10.53.0.1 through 10.53.0.8 be configured
-I:      as alias addresses on the loopback interface.  Please run
-I:      "bin/tests/system/ifconfig.sh up" as root to configure them.
-EOF
-}
-
 status=0
 echo "I:System test result summary:"
 grep '^R:' systests.output | cut -d':' -f3 | sort | uniq -c | sed -e 's/^/I:/'