]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Merge branch 'parallel-v9_9' into v9_9
authorEvan Hunt <each@isc.org>
Sun, 25 Feb 2018 21:29:36 +0000 (13:29 -0800)
committerEvan Hunt <each@isc.org>
Sun, 25 Feb 2018 21:29:36 +0000 (13:29 -0800)
chg: dev: Convert most of the remaining system tests to be able to run in parallel [GL #91]

Closes #91

See merge request isc-projects/bind9!59

1  2 
bin/tests/system/.gitignore
bin/tests/system/Makefile.in
bin/tests/system/README
bin/tests/system/conf.sh.in
bin/tests/system/runall.sh

index 9063bddd7f52de030a45432828f5b69d55b11448,e4ffcd3c89b8a713769072e5b817b865efe5b4ec..a3146048610afc8381178c43c9e6c131e95681e4
@@@ -1,14 -1,8 +1,12 @@@
--feature-test
--systests.output
  random.data
  named.memstats
  named.run
- named.run
++ans.run
 +dig.out*
 +rndc.out*
 +nsupdate.out*
 +named.pid
 +/feature-test
  **/test.output
  /systests.output
  /random.data
index c7610a34b1bf5c1907f3bc7cba68cf48ec5ae719,0204b759873f0e2b02fcd1a1f9849ecd81985a5c..5a06e8e6a926d4152d4bd8c315b2ce9c89fdc8e9
@@@ -47,58 -47,64 +47,101 @@@ TARGETS = feature-test@EXEEXT
  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.
 +
 +# 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.
 +
 +PARALLEL = allow_query rpzrecurse
 +
 +# 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).
 +
 +parallel.mk:
 +      @PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \
 +      echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \
 +      echo "" >> $@ ; \
 +      echo "check: $$PARALLEL_SANITIZED" >> $@ ; \
 +      port=$${STARTPORT:-5000} ; \
 +      for directory in $(PARALLEL) ; do \
 +              echo "" >> $@ ; \
 +              echo "test-`echo $$directory | tr _ -`:" >> $@ ; \
 +              echo "  @$(SHELL) ./run.sh $$NOCLEAN -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
 +              port=`expr $$port + 100` ; \
 +      done
 +
 +# Targets to run the tests.
 +
 +test: parallel.mk subdirs
 +      @$(MAKE) -f parallel.mk check
 +      @$(SHELL) ./runsequential.sh $$NOCLEAN -r
 +      @$(SHELL) ./testsummary.sh
  
- check: test
+ # 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 acl additional addzone autosign \
+          builtin cacheclean chain checkconf checknames \
+          checkzone @CHECKDS@ @COVERAGE@ database \
+          digdelv dlv dlz dlzexternal dns64 dnssec \
+          emptyzones fetchlimit filter-aaaa \
+          formerr forward glue inline integrity ixfr \
+          legacy limits logfileconfig masterfile masterformat \
+          metadata notify nslookup nsupdate pending reclimit \
+          redirect resolver rndc rpz rrl \
+          rrsetorder rsabigexponent runtime smartsign sortlist \
+          spf staticstub stub \
+          tsig tsiggss unknown upforwd verify views wildcard \
+          xfer xferquota zero zonechecks
  
- # Other targets:
+ # 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.
  #
- # 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".
+ # 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 $$NOCLEAN -r -p $$port $$directory 2>&1 | tee $$directory/test.output" >> $@ ; \
+               port=`expr $$port + 100` ; \
+       done
+ # Targets to run the tests.
+ test: parallel.mk subdirs
+       @$(MAKE) -f parallel.mk check
+       @$(SHELL) ./runsequential.sh $$NOCLEAN -r
+       @$(SHELL) ./testsummary.sh
+ check: test
  
  testclean clean distclean::
 -      if test -f ./cleanall.sh; then sh ./cleanall.sh; fi
 +      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}
  
Simple merge
Simple merge
Simple merge