[rt46602] Assign block of ports for each test

Some tests use more ports than just the query and control ports.
Each test that can run in parallel with other tests is now assigned
a unique block of 10 ports.
This commit is contained in:
Stephen Morris
2017-11-23 09:58:57 +00:00
parent 07341693e1
commit e0ff77f9d3
3 changed files with 78 additions and 34 deletions

View File

@@ -50,19 +50,20 @@ feature-test@EXEEXT@: feature-test.@O@
PARALLEL = allow_query catz serve-stale rpzrecurse
# Produce intermediate makefile that assigns unique port numbers to each
# parallel test.
# parallel test. The sequential tests all use ports 5300 (for queries) and
# 9953 (for control). For this reason, the parallel tests start at port
# # 10,000
parallel.mk:
@echo ".PHONY: $(PARALLEL)" > $@ ; \
echo "" >> $@ ; \
echo "check: $(PARALLEL)" >> $@ ; \
port=5299 ; \
port=9990 ; \
for directory in $(PARALLEL) ; do \
port=$$(($$port + 2)) ; \
controlport=$$(($$port + 1)) ; \
port=$$(($$port + 10)) ; \
echo "" >> $@ ; \
echo "$$directory:" >> $@ ; \
echo " @$(SHELL) ./run.sh -p $$port -c $$controlport $$directory" >> $@ ; \
echo " @$(SHELL) ./run.sh -p $$port $$directory" >> $@ ; \
done
# Targets to run the tests that can be done in parallel (which have unique
@@ -70,10 +71,10 @@ parallel.mk:
# they all use query port 5300 and control port 9953).
parallel: parallel.mk
$(MAKE) -f parallel.mk
@$(MAKE) -f parallel.mk
sequential:
if test -f ./runall.sh; then $(SHELL) ./runall.sh; fi
@if test -f ./runall.sh; then $(SHELL) ./runall.sh; fi
# Standard targets.