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.
139 lines
4.1 KiB
Makefile
139 lines
4.1 KiB
Makefile
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
#
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
# information regarding copyright ownership.
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
top_srcdir = @top_srcdir@
|
|
|
|
VERSION=@BIND9_VERSION@
|
|
|
|
@BIND9_MAKE_INCLUDES@
|
|
|
|
SUBDIRS = dlzexternal dyndb pipelined rndc rpz rsabigexponent tkey
|
|
|
|
CINCLUDES = ${ISC_INCLUDES} ${DNS_INCLUDES}
|
|
|
|
CDEFINES = @USE_GSSAPI@
|
|
CWARNINGS =
|
|
|
|
DNSLIBS =
|
|
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
|
|
|
|
DNSDEPLIBS =
|
|
ISCDEPLIBS =
|
|
|
|
DEPLIBS =
|
|
|
|
LIBS = @LIBS@
|
|
|
|
OBJS = feature-test.@O@
|
|
SRCS = feature-test.c
|
|
|
|
TARGETS = feature-test@EXEEXT@
|
|
|
|
@BIND9_MAKE_RULES@
|
|
|
|
feature-test@EXEEXT@: feature-test.@O@
|
|
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ feature-test.@O@ ${ISCLIBS} ${LIBS}
|
|
|
|
|
|
# Running the scripts below is bypassed when a separate build directory is
|
|
# used.
|
|
|
|
# Define the tests that can be run in parallel. This should be identical to
|
|
# the definition of PARALLELDIRS in conf.sh. Note: long-running tests
|
|
# such as allow_query and serve-stale are scheduled first to get more
|
|
# benefit from parallelism.
|
|
|
|
PARALLEL = allow_query rpzrecurse serve-stale \
|
|
acl additional addzone auth autosign \
|
|
builtin cacheclean case catz cds chain \
|
|
checkconf checknames checkzone \
|
|
@CHECKDS@ @COVERAGE@ @KEYMGR@ \
|
|
cookie database digdelv dlv dlz dlzexternal \
|
|
dns64 dnssec @DNSTAP@ dscp dsdigest dyndb \
|
|
ednscompliance emptyzones \
|
|
fetchlimit filter-aaaa formerr forward \
|
|
geoip glue inline integrity ixfr keepalive \
|
|
legacy limits logfileconfig \
|
|
masterfile masterformat metadata mkeys \
|
|
names notify nslookup nsupdate nzd2nzf \
|
|
padding pending pipelined \
|
|
reclimit redirect resolver rndc rpz \
|
|
rrchecker rrl rrsetorder rsabigexponent runtime \
|
|
sfcache smartsign sortlist \
|
|
spf staticstub statistics statschannel stub synthfromdnssec \
|
|
tcp tools tsig tsiggss \
|
|
unknown upforwd verify views wildcard \
|
|
xfer xferquota zero zonechecks
|
|
|
|
# Produce intermediate makefile that assigns unique port numbers to each
|
|
# parallel test. The start port number of 5,000 is arbitrary - it must just
|
|
# be greater than the highest privileged port, 1024.
|
|
#
|
|
# Test names need to be sanitized because Solaris make does not like
|
|
# underscores in target names and requires explicit differentiation
|
|
# between a target name and a directory name (.PHONY is not supported).
|
|
|
|
.PHONY: parallel.mk
|
|
|
|
parallel.mk:
|
|
PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
|
|
echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
|
|
echo "" >> $@ ; \
|
|
echo "test check: $$PARALLEL_SANITIZED" >> $@ ; \
|
|
port=$${STARTPORT:-5000} ; \
|
|
for directory in $(PARALLEL) ; do \
|
|
echo "" >> $@ ; \
|
|
echo "test-`echo $$directory | tr _ -`:" >> $@ ; \
|
|
echo " @$(SHELL) ./run.sh -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
|
|
port=`expr $$port + 100` ; \
|
|
done
|
|
|
|
# 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
|
|
|
|
check: test
|
|
|
|
# Other targets:
|
|
#
|
|
# testclean - delete files generated by running tests.
|
|
# clean - testclean + also delete files built for the tests by "make".
|
|
# distclean - clean + also delete test-related files generated by "configure".
|
|
|
|
testclean clean distclean::
|
|
if test -f ./cleanall.sh; then $(SHELL) ./cleanall.sh; fi
|
|
rm -f systests.output
|
|
rm -f random.data
|
|
rm -f parallel.mk
|
|
|
|
clean distclean::
|
|
rm -f ${TARGETS}
|
|
rm -f ${OBJS}
|
|
|
|
distclean::
|
|
rm -f conf.sh
|
|
|
|
installdirs:
|
|
|
|
install::
|
|
|
|
uninstall::
|