You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pe...@apache.org on 2010/12/03 08:58:48 UTC

svn commit: r1041719 - /subversion/trunk/tools/dev/unix-build/Makefile.svn

Author: peters
Date: Fri Dec  3 07:58:47 2010
New Revision: 1041719

URL: http://svn.apache.org/viewvc?rev=1041719&view=rev
Log:
De-duplicate the 'svn-check-*' targets of Makefile.svn.  If we're going
to use GNU-make-isms, we may as well get some good use out of them.

* tools/unix-build/Makefile.svn
  (): Move PARALLEL to top of Makefile to make it more obvious that a
   user can override it from the command line.
  (svn-check-neon, svn-check-serf, svn-check-local, svn-check-svn):
   Move most of the logic into...
  (do_check): New macro.  Functionally equivalent, except we now use mv
   instead of cp with the log files, to prevent copying an old one to a
   new destination.

Modified:
    subversion/trunk/tools/dev/unix-build/Makefile.svn

Modified: subversion/trunk/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/unix-build/Makefile.svn?rev=1041719&r1=1041718&r2=1041719&view=diff
==============================================================================
--- subversion/trunk/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/trunk/tools/dev/unix-build/Makefile.svn Fri Dec  3 07:58:47 2010
@@ -8,6 +8,7 @@ ENABLE_RUBY_BINDINGS ?= yes
 ENABLE_PERL_BINDINGS ?= yes
 ENABLE_JAVA_BINDINGS ?= no # they don't build with thread-less APR...
 USE_APR_ICONV ?= no # set to yes to use APR iconv instead of GNU iconv
+PARALLEL = PARALLEL=1 CLEANUP=1
 
 PWD		= $(shell pwd)
 UNAME		= $(shell uname)
@@ -1068,64 +1069,32 @@ start-svnserve: $(SVN_OBJDIR)/.compiled
 stop-svnserve:
 	$(SVNSERVE_STOP_CMD)
 
-# run tests in parallel
-PARALLEL=PARALLEL=1 CLEANUP=1
-TEST_LOGS=tests.log fails.log
+define do_check
+@-cd $(svn_builddir) && for fs in fsfs bdb; do \
+    echo "Begin test: $(subst svn-check-,,$@) x $$fs"; \
+    make check $(PARALLEL) $1 FS_TYPE=$$fs; \
+    for log in tests.log fails.log; do \
+        test -f $$log && mv -f $$log $$log.$@-$$fs; \
+    done; \
+done
+endef
 
 svn-check-neon: httpd-conf $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled
 	$(HTTPD_START_CMD)
-	-cd $(svn_builddir) && make check FS_TYPE=fsfs \
-	       BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=neon \
-	       $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-fsfs;)
-	-cd $(svn_builddir) && make check FS_TYPE=bdb \
-	       BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=neon \
-	       $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-bdb;)
+	$(call do_check,BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=neon)
 	$(HTTPD_STOP_CMD)
 
 svn-check-serf: httpd-conf $(SVN_OBJDIR)/.compiled $(SVN_OBJDIR)/.bindings-compiled
 	$(HTTPD_START_CMD)
-	-cd $(svn_builddir) && make check FS_TYPE=fsfs \
-	       BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=serf \
-	       $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-fsfs;)
-	-cd $(svn_builddir) && make check FS_TYPE=bdb \
-	       BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=serf \
-	       $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-bdb;)
+	$(call do_check,BASE_URL=http://localhost:$(HTTPD_CHECK_PORT) HTTP_LIBRARY=serf)
 	$(HTTPD_STOP_CMD)
 
 svn-check-local:
-	-cd $(svn_builddir) && make check FS_TYPE=fsfs $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-fsfs;)
-	-cd $(svn_builddir) && make check FS_TYPE=bdb $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-bdb;)
+	$(call do_check)
 
 svn-check-svn:
 	$(SVNSERVE_START_CMD)
-	-cd $(svn_builddir) && make check FS_TYPE=fsfs \
-		BASE_URL=svn://127.0.0.1 $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-fsfs;)
-	-cd $(svn_builddir) && make check FS_TYPE=bdb \
-		BASE_URL=svn://127.0.0.1 $(PARALLEL)
-	-$(foreach log, $(TEST_LOGS), \
-		test -f $(svn_builddir)/$(log) && cp -f $(svn_builddir)/$(log) \
-			$(svn_builddir)/$(log).$@-bdb;)
+	$(call do_check,BASE_URL=svn://127.0.0.1)
 	$(SVNSERVE_STOP_CMD)
 
 .PHONY: svn-check-swig-pl svn-check-swig-py svn-check-swig-rb svn-check-javahl