You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/06/25 15:55:50 UTC
svn commit: r1496475 - in /subversion/trunk: Makefile.in build/run_tests.py
subversion/tests/cmdline/svntest/main.py
Author: stsp
Date: Tue Jun 25 13:55:50 2013
New Revision: 1496475
URL: http://svn.apache.org/r1496475
Log:
Restore the ability to run tests with exclusive working copy locks.
This functionality was turned on by default between r1493097 and r1496437.
It can now be enabled via a new --exclusive-wc-locks test option,
or like this when using 'make check': make check EXCLUSIVE_WC_LOCKS=1
* Makefile.in: Handle EXCLUSIVE_WC_LOCKS parameter.
* build/run_tests.py:
(usage, main): Add --exclusive-wc-locks option.
(TestHarness): Add exclusive_wc_locks parameter to constructor.
Set svntest.main.options.exclusive_wc_locks based on it.
* subversion/tests/cmdline/svntest/main.py
(create_config_dir): Add exclusive_wc_locks parameter. If TRUE, enable
exclusive working copy locking in the client configuration.
(TestSpawningThread): Handle --exclusive-wc-locks option.
(_create_parser): Add --exclusive-wc-locks option.
(execute_tests): Pass the exclusive_wc_locks option to create_config_dir().
Modified:
subversion/trunk/Makefile.in
subversion/trunk/build/run_tests.py
subversion/trunk/subversion/tests/cmdline/svntest/main.py
Modified: subversion/trunk/Makefile.in
URL: http://svn.apache.org/viewvc/subversion/trunk/Makefile.in?rev=1496475&r1=1496474&r2=1496475&view=diff
==============================================================================
--- subversion/trunk/Makefile.in (original)
+++ subversion/trunk/Makefile.in Tue Jun 25 13:55:50 2013
@@ -523,6 +523,9 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $
if test "$(HTTP_PROXY)" != ""; then \
flags="--http-proxy $(HTTP_PROXY) $$flags"; \
fi; \
+ if test "$(EXCLUSIVE_WC_LOCKS)" != ""; then \
+ flags="--exclusive-wc-locks $$flags"; \
+ fi; \
LD_LIBRARY_PATH='$(auth_plugin_dirs):$(LD_LIBRARY_PATH)' \
$(PYTHON) $(top_srcdir)/build/run_tests.py \
--config-file $(top_srcdir)/subversion/tests/tests.conf \
Modified: subversion/trunk/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=1496475&r1=1496474&r2=1496475&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Tue Jun 25 13:55:50 2013
@@ -30,6 +30,7 @@
[--list] [--milestone-filter=<regex>] [--mode-filter=<type>]
[--server-minor-version=<version>] [--http-proxy=<host>:<port>]
[--config-file=<file>] [--ssl-cert=<file>]
+ [--exclusive-wc-locks]
<abs_srcdir> <abs_builddir>
<prog ...>
@@ -125,7 +126,7 @@ class TestHarness:
fsfs_sharding=None, fsfs_packing=None,
list_tests=None, svn_bin=None, mode_filter=None,
milestone_filter=None, set_log_level=None, ssl_cert=None,
- http_proxy=None):
+ http_proxy=None, exclusive_wc_locks=None):
'''Construct a TestHarness instance.
ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
@@ -178,6 +179,7 @@ class TestHarness:
self.log = None
self.ssl_cert = ssl_cert
self.http_proxy = http_proxy
+ self.exclusive_wc_locks = exclusive_wc_locks
if not sys.stdout.isatty() or sys.platform == 'win32':
TextColors.disable()
@@ -481,6 +483,8 @@ class TestHarness:
svntest.main.options.ssl_cert = self.ssl_cert
if self.http_proxy is not None:
svntest.main.options.http_proxy = self.http_proxy
+ if self.exclusive_wc_locks is not None:
+ svntest.main.options.exclusive_wc_locks = self.exclusive_wc_locks
svntest.main.options.srcdir = self.srcdir
@@ -645,7 +649,7 @@ def main():
'enable-sasl', 'parallel', 'config-file=',
'log-to-stdout', 'list', 'milestone-filter=',
'mode-filter=', 'set-log-level=', 'ssl-cert=',
- 'http-proxy='])
+ 'http-proxy=', 'exclusive-wc-locks'])
except getopt.GetoptError:
args = []
@@ -656,9 +660,9 @@ def main():
base_url, fs_type, verbose, cleanup, enable_sasl, http_library, \
server_minor_version, fsfs_sharding, fsfs_packing, parallel, \
config_file, log_to_stdout, list_tests, mode_filter, milestone_filter, \
- set_log_level, ssl_cert, http_proxy = \
+ set_log_level, ssl_cert, http_proxy, exclusive_wc_locks = \
None, None, None, None, None, None, None, None, None, None, None, \
- None, None, None, None, None, None, None
+ None, None, None, None, None, None, None, None
for opt, val in opts:
if opt in ['-u', '--url']:
base_url = val
@@ -696,6 +700,8 @@ def main():
ssl_cert = val
elif opt in ['--http-proxy']:
http_proxy = val
+ elif opt in ['--exclusive-wc-locks']:
+ exclusive_wc_locks = 1
else:
raise getopt.GetoptError
@@ -712,7 +718,8 @@ def main():
fsfs_sharding, fsfs_packing, list_tests,
mode_filter=mode_filter, milestone_filter=milestone_filter,
set_log_level=set_log_level, ssl_cert=ssl_cert,
- http_proxy=http_proxy)
+ http_proxy=http_proxy,
+ exclusive_wc_locks=exclusive_wc_locks)
failed = th.run(args[2:])
if failed:
Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1496475&r1=1496474&r2=1496475&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Tue Jun 25 13:55:50 2013
@@ -561,7 +561,8 @@ def run_command_stdin(command, error_exp
stderr_lines
def create_config_dir(cfgdir, config_contents=None, server_contents=None,
- ssl_cert=None, ssl_url=None, http_proxy=None):
+ ssl_cert=None, ssl_url=None, http_proxy=None,
+ exclusive_wc_locks=None):
"Create config directories and files"
# config file names
@@ -582,7 +583,11 @@ password-stores =
[miscellany]
interactive-conflicts = false
"""
-
+ if exclusive_wc_locks:
+ config_contents += """
+[working-copy]
+exclusive-locking = true
+"""
# define default server file contents if none provided
if server_contents is None:
http_library_str = ""
@@ -1427,6 +1432,8 @@ class TestSpawningThread(threading.Threa
args.append('--ssl-cert=' + options.ssl_cert)
if options.http_proxy:
args.append('--http-proxy=' + options.http_proxy)
+ if options.exclusive_wc_locks:
+ args.append('--exclusive-wc-locks')
result, stdout_lines, stderr_lines = spawn_process(command, 0, False, None,
*args)
@@ -1774,6 +1781,8 @@ def _create_parser():
help='Use the HTTP Proxy at hostname:port.')
parser.add_option('--tools-bin', action='store', dest='tools_bin',
help='Use the svn tools installed in this path')
+ parser.add_option('--exclusive-wc-locks', action='store_true',
+ help='Use sqlite exclusive locking for working copies')
# most of the defaults are None, but some are other values, set them here
parser.set_defaults(
@@ -2095,7 +2104,8 @@ def execute_tests(test_list, serial_only
create_config_dir(default_config_dir,
ssl_cert=options.ssl_cert,
ssl_url=options.test_area_url,
- http_proxy=options.http_proxy)
+ http_proxy=options.http_proxy,
+ exclusive_wc_locks=options.exclusive_wc_locks)
# Setup the pristine repository
svntest.actions.setup_pristine_greek_repository()