From e0221f2d25a88fb0025070ef35463288114048ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20K=C4=99pie=C5=84?= Date: Thu, 25 Jan 2018 15:26:27 +0100 Subject: [PATCH] Check for test interfaces before running system tests 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 | 7 +++++++ bin/tests/system/testsummary.sh | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bin/tests/system/Makefile.in b/bin/tests/system/Makefile.in index cfd8e16d24..5637a4bc7d 100644 --- a/bin/tests/system/Makefile.in +++ b/bin/tests/system/Makefile.in @@ -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 diff --git a/bin/tests/system/testsummary.sh b/bin/tests/system/testsummary.sh index 705b2cfdb8..1f4a0dacd0 100644 --- a/bin/tests/system/testsummary.sh +++ b/bin/tests/system/testsummary.sh @@ -40,15 +40,6 @@ if [ $keepfile -eq 0 ]; then rm -f */test.output fi -$PERL testsock.pl || { - cat <