You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/11/10 16:41:49 UTC
svn commit: r1033531 - in /subversion/trunk: build/run_tests.py
subversion/tests/cmdline/svntest/main.py
Author: hwright
Date: Wed Nov 10 15:41:48 2010
New Revision: 1033531
URL: http://svn.apache.org/viewvc?rev=1033531&view=rev
Log:
Fix running the tests in parallel from 'make check'.
* 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.
Modified:
subversion/trunk/build/run_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/main.py
Modified: subversion/trunk/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=1033531&r1=1033530&r2=1033531&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Wed Nov 10 15:41:48 2010
@@ -303,7 +303,7 @@ 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 = True
+ 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:
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1033531&r1=1033530&r2=1033531&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Wed Nov 10 15:41:48 2010
@@ -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 ' +