You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2014/03/02 16:54:09 UTC

svn commit: r1573320 - in /subversion/trunk: Makefile.in build/run_tests.py

Author: philip
Date: Sun Mar  2 15:54:08 2014
New Revision: 1573320

URL: http://svn.apache.org/r1573320
Log:
Allow 'make check PARALLEL=N' to be used to specify that N threads
are used for the python tests.  Use the default number, 5, if N is
not a number greater than 1, thus the behaviour of PARALLEL=1 and
PARALLEL=yes is unchanged.

* Makefile.in:
  (check): Pass PARALLEL value to run_tests.py

* build/run_tests.py
  (run_py_test): Handle --parallel value.
  (main): Accept --parallel value.

Modified:
    subversion/trunk/Makefile.in
    subversion/trunk/build/run_tests.py

Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1573320&r1=1573319&r2=1573320&view=diff
==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Sun Mar  2 15:54:08 2014
@@ -536,7 +536,7 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $
 	    flags="--fsfs-packing $$flags";                                  \
 	  fi;                                                                \
 	  if test "$(PARALLEL)" != ""; then                                  \
-	    flags="--parallel $$flags";                                      \
+	    flags="--parallel $(PARALLEL) $$flags";                          \
 	  fi;                                                                \
 	  if test "$(LOG_TO_STDOUT)" != ""; then                             \
 	    flags="--log-to-stdout $$flags";                                 \

Modified: subversion/trunk/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=1573320&r1=1573319&r2=1573320&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Sun Mar  2 15:54:08 2014
@@ -456,7 +456,14 @@ class TestHarness:
     if self.enable_sasl is not None:
       svntest.main.options.enable_sasl = True
     if self.parallel is not None:
-      svntest.main.options.parallel = svntest.main.default_num_threads
+      try:
+        num_parallel = int(self.parallel) 
+      except exceptions.ValueError:
+        num_parallel = svntest.main.default_num_threads
+      if num_parallel > 1:
+        svntest.main.options.parallel = num_parallel
+      else:
+        svntest.main.options.parallel = svntest.main.default_num_threads
     if self.config_file is not None:
       svntest.main.options.config_file = self.config_file
     if self.verbose is not None:
@@ -659,7 +666,7 @@ def main():
                            ['url=', 'fs-type=', 'verbose', 'cleanup',
                             'http-library=', 'server-minor-version=',
                             'fsfs-packing', 'fsfs-sharding=',
-                            'enable-sasl', 'parallel', 'config-file=',
+                            'enable-sasl', 'parallel=', 'config-file=',
                             'log-to-stdout', 'list', 'milestone-filter=',
                             'mode-filter=', 'set-log-level=', 'ssl-cert=',
                             'http-proxy=', 'http-proxy-username=',
@@ -698,7 +705,7 @@ def main():
     elif opt in ['--enable-sasl']:
       enable_sasl = 1
     elif opt in ['--parallel']:
-      parallel = 1
+      parallel = val
     elif opt in ['--config-file']:
       config_file = val
     elif opt in ['--log-to-stdout']: