]> 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:27 +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 a155e593b8d72a5b732a3d7f280beae20700bace..f94f3db12063002ee0b9cdc4ec88627508df33b0 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 cea0cc4a72bab6ece4ca67979a60901f87a6ad01..9d89d569c41fbba50748604cd5e0a673d9cd001b 100644 (file)
@@ -37,15 +37,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:/'