]> 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)
committerMichał Kępień <michal@isc.org>
Mon, 26 Feb 2018 13:12:48 +0000 (14:12 +0100)
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.

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

index cfd8e16d24f22701ff430385ecd99dc707ceed73..5637a4bc7d80407e04982c60d2f73aa1bca8e400 100644 (file)
@@ -99,6 +99,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 705b2cfdb8911270c8fcae3883e78917b64d37e9..1f4a0dacd08bcf7898598f2b2d4c09f6144e5827 100644 (file)
@@ -40,15 +40,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:/'