From 54c8d75ee150ea585e1e0d398e111465fb5aaad0 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. (cherry picked from commit e0221f2d25a88fb0025070ef35463288114048ea) --- 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 a155e593b8..f94f3db120 100644 --- a/bin/tests/system/Makefile.in +++ b/bin/tests/system/Makefile.in @@ -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 diff --git a/bin/tests/system/testsummary.sh b/bin/tests/system/testsummary.sh index cea0cc4a72..9d89d569c4 100644 --- a/bin/tests/system/testsummary.sh +++ b/bin/tests/system/testsummary.sh @@ -37,15 +37,6 @@ if [ $keepfile -eq 0 ]; then rm -f */test.output fi -$PERL testsock.pl || { - cat <