]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[rt46602] Sanitize test names to fix "make check" on Solaris
authorMichał Kępień <michal@isc.org>
Mon, 29 Jan 2018 11:08:41 +0000 (12:08 +0100)
committerEvan Hunt <each@isc.org>
Sun, 25 Feb 2018 17:28:46 +0000 (09:28 -0800)
(cherry picked from commit e005fb948d367ea7ae06c9337a243664460be3e8)
(cherry picked from commit cfaeb55e8e4036c1a6c48c468f2e776de744f5f8)
(cherry picked from commit fac15bf973f7b1ef21774468142dd91f3f45c2d0)

bin/tests/system/Makefile.in

index bc1b7de432e47ad15b03cf01ca2f4718d5fcefe0..c7610a34b1bf5c1907f3bc7cba68cf48ec5ae719 100644 (file)
@@ -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