Merge branch 'check-for-test-interfaces-before-running-system-tests-v9_9' into 'v9_9'

Check for test interfaces before running system tests

See merge request isc-projects/bind9!19
This commit is contained in:
Evan Hunt
2018-02-26 15:10:40 -08:00
3 changed files with 24 additions and 14 deletions

View File

@@ -84,11 +84,20 @@ parallel.mk:
@PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
echo "" >> $@ ; \
echo "check_interfaces:" >> $@ ; \
echo " @${PERL} testsock.pl > /dev/null 2>&1 || { \\" >> $@ ; \
echo " echo \"I:NOTE: System tests were skipped because they require that the\"; \\" >> $@ ; \
echo " echo \"I: IP addresses 10.53.0.1 through 10.53.0.8 be configured\"; \\" >> $@ ; \
echo " echo \"I: as alias addresses on the loopback interface. Please run\"; \\" >> $@ ; \
echo " echo \"I: \"bin/tests/system/ifconfig.sh up\" as root to configure them.\"; \\" >> $@ ; \
echo " exit 1; \\" >> $@ ; \
echo " }" >> $@ ; \
echo "" >> $@ ; \
echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
port=$${STARTPORT:-5000} ; \
for directory in $(PARALLEL) ; do \
echo "" >> $@ ; \
echo "test-`echo $$directory | tr _ -`:" >> $@ ; \
echo "test-`echo $$directory | tr _ -`: check_interfaces" >> $@ ; \
echo " @$(SHELL) ./run.sh -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
port=`expr $$port + 100` ; \
done

View File

@@ -77,10 +77,20 @@ if [ "$CYGWIN" = "" ]; then
make -j $numproc check
status=$?
else
# Running on Windows: no "make" available, so run the tests sequentially.
# (This is simpler than working out where "nmake" is likely to be found.
# Besides, "nmake" does not support parallel execution so if "nmake" is
# used, the tests would be run sequentially anyway.)
# Running on Windows: no "make" available, so ensure test interfaces are up
# and then run the tests sequentially. (This is simpler than working out
# where "nmake" is likely to be found. Besides, "nmake" does not support
# parallel execution so if "nmake" is used, the tests would be run
# sequentially anyway.)
$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
exit 1
}
{
for testdir in $SUBDIRS; do
$SHELL run.sh $testdir || status=1

View 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:/'