Fix running the tests in parallel from 'make check'.
authorHyrum Wright <[email protected]>
Wed, 10 Nov 2010 15:41:48 +0000 (10 15:41 +0000)
committerHyrum Wright <[email protected]>
Wed, 10 Nov 2010 15:41:48 +0000 (10 15:41 +0000)
* build/run_tests.py
  (_run_py_test): Set the value of 'parallel' to the default number of
    threads, rather than simply 'True'.

* subversion/tests/cmdline/svntest/main.py
  (default_num_threads): New magic number value.
  (_create_parser): Use the above variable, rather than a magic number.

git-svn-id: http://svn.apache.org/repos/asf/subversion/trunk/subversion/tests/cmdline@1033531 13f79535-47bb-0310-9956-ffa450edef68

svntest/main.py

index af697bd..14f17ff 100644 (file)
@@ -74,6 +74,8 @@ from svntest import Skip
 #####################################################################
 # Global stuff
 
+default_num_threads = 5
+
 class SVNProcessTerminatedBySignal(Failure):
   "Exception raised if a spawned process segfaulted, aborted, etc."
   pass
@@ -1366,8 +1368,8 @@ def _create_parser():
                     help='Print binary command-lines (not with --quiet)')
   parser.add_option('-q', '--quiet', action='store_true',
                     help='Print only unexpected results (not with --verbose)')
-  parser.add_option('-p', '--parallel', action='store_const', const=5,
-                    dest='parallel',
+  parser.add_option('-p', '--parallel', action='store_const',
+                    const=default_num_threads, dest='parallel',
                     help='Run the tests in parallel')
   parser.add_option('-c', action='store_true', dest='is_child_process',
                     help='Flag if we are running this python test as a ' +