mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 14:07:59 +00:00
test interfaces directly in runall.sh and parallel.mk
This commit is contained in:
@@ -84,14 +84,23 @@ PARALLEL = allow_query rpzrecurse serve-stale \
|
|||||||
.PHONY: parallel.mk
|
.PHONY: parallel.mk
|
||||||
|
|
||||||
parallel.mk:
|
parallel.mk:
|
||||||
PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
|
@PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
|
||||||
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
|
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
|
||||||
echo "" >> $@ ; \
|
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" >> $@ ; \
|
echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
|
||||||
port=$${STARTPORT:-5000} ; \
|
port=$${STARTPORT:-5000} ; \
|
||||||
for directory in $(PARALLEL) ; do \
|
for directory in $(PARALLEL) ; do \
|
||||||
echo "" >> $@ ; \
|
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" >> $@ ; \
|
echo " @$(SHELL) ./run.sh -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
|
||||||
port=`expr $$port + 100` ; \
|
port=`expr $$port + 100` ; \
|
||||||
done
|
done
|
||||||
@@ -99,13 +108,6 @@ parallel.mk:
|
|||||||
# Targets to run the tests.
|
# Targets to run the tests.
|
||||||
|
|
||||||
test: parallel.mk subdirs
|
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
|
@$(MAKE) -f parallel.mk check
|
||||||
@$(SHELL) ./runsequential.sh -r
|
@$(SHELL) ./runsequential.sh -r
|
||||||
@$(SHELL) ./testsummary.sh
|
@$(SHELL) ./testsummary.sh
|
||||||
|
@@ -73,10 +73,20 @@ if [ "$CYGWIN" = "" ]; then
|
|||||||
make -j $numproc check
|
make -j $numproc check
|
||||||
status=$?
|
status=$?
|
||||||
else
|
else
|
||||||
# Running on Windows: no "make" available, so run the tests sequentially.
|
# Running on Windows: no "make" available, so ensure test interfaces are up
|
||||||
# (This is simpler than working out where "nmake" is likely to be found.
|
# and then run the tests sequentially. (This is simpler than working out
|
||||||
# Besides, "nmake" does not support parallel execution so if "nmake" is
|
# where "nmake" is likely to be found. Besides, "nmake" does not support
|
||||||
# used, the tests would be run sequentially anyway.)
|
# 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
|
for testdir in $SUBDIRS; do
|
||||||
$SHELL run.sh $testdir || status=1
|
$SHELL run.sh $testdir || status=1
|
||||||
|
Reference in New Issue
Block a user