From: Michał Kępień Date: Mon, 29 Jan 2018 11:08:41 +0000 (+0100) Subject: [rt46602] Sanitize test names to fix "make check" on Solaris X-Git-Tag: v9.9.13rc1~78^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=8945f29fb1a8f97611db132a1b95429bc04230fe;p=thirdparty%2Fbind9.git [rt46602] Sanitize test names to fix "make check" on Solaris (cherry picked from commit e005fb948d367ea7ae06c9337a243664460be3e8) (cherry picked from commit cfaeb55e8e4036c1a6c48c468f2e776de744f5f8) (cherry picked from commit fac15bf973f7b1ef21774468142dd91f3f45c2d0) --- diff --git a/bin/tests/system/Makefile.in b/bin/tests/system/Makefile.in index bc1b7de432e..c7610a34b1b 100644 --- a/bin/tests/system/Makefile.in +++ b/bin/tests/system/Makefile.in @@ -59,15 +59,20 @@ 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: - @echo ".PHONY: $(PARALLEL)" > $@ ; \ + @PARALLEL_SANITIZED=`echo $(PARALLEL) | sed "s|\([^ ][^ ]*\)|test-\1|g;" | tr _ -` ; \ + echo ".PHONY: $$PARALLEL_SANITIZED" > $@ ; \ echo "" >> $@ ; \ - echo "check: $(PARALLEL)" >> $@ ; \ + echo "check: $$PARALLEL_SANITIZED" >> $@ ; \ port=$${STARTPORT:-5000} ; \ for directory in $(PARALLEL) ; do \ echo "" >> $@ ; \ - echo "$$directory:" >> $@ ; \ + 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