[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r31379 - in trunk:

From: Daniel Shahaf <d.s_at_daniel.shahaf.co.il>
Date: Fri, 23 May 2008 09:43:55 +0300 (Jerusalem Daylight Time)

glasser_at_tigris.org wrote on Thu, 22 May 2008 at 17:00 -0700:
> Author: glasser
> Date: Thu May 22 17:00:32 2008
> New Revision: 31379
>
> Log:
> Merge the in-memory-cache branch to trunk.
>
> See that branch's log for full details, but in short:
>
> The branch rewrote various in-memory caches in FSFS to use a unified
> API. By default this API is implemented by some in-process hashes,
> but via a configuration file (db/fsfs.conf), it can use memcached
> instead. Additionally, expanded fulltexts are cached if memcached is
> available.
>
> memcached is accessed with the apr_memcached API, which will be in a
> future version (trunk, now) of apr-util, and is also available as an
> separately-distributed library. The build system knows how to deal
> with both.
>
> Other things that changed:
>
> * The test suite now has a config file; currently, the config file is
> just used as the FSFS config file for any created repositories.
>
> * New random APIs: svn_base64_encode_string2, svn_stream_from_string.
>
> * ra_local ignores "FS warnings" instead of aborting.
>
> Modified: trunk/build/run_tests.py
> URL: http://svn.collab.net/viewvc/svn/trunk/build/run_tests.py?pathrev=31379&r1=31378&r2=31379
> ==============================================================================
> --- trunk/build/run_tests.py Thu May 22 16:51:50 2008 (r31378)
> +++ trunk/build/run_tests.py Thu May 22 17:00:32 2008 (r31379)
> @@ -6,13 +6,13 @@
> '''usage: python run_tests.py [--url=<base-url>] [--fs-type=<fs-type>]
> [--verbose] [--cleanup] [--enable-sasl] [--parallel]
> [--http-library=<http-library>]
> + [--config-file=<file>]
> [--server-minor-version=<version>] <abs_srcdir> <abs_builddir>
> <prog ...>
>
> -The optional base-url, fs-type, http-library, server-minor-version,
> -verbose, parallel, enable-sasl, and cleanup options, and the first two
> -parameters are passed unchanged to the TestHarness constructor. All
> -other parameters are names of test programs.
> +The optional flags and the first two parameters are passed unchanged
> +to the TestHarness constructor. All other parameters are names of
> +test programs.
> '''
>
> import os, sys
> @@ -30,8 +30,8 @@ class TestHarness:
> def __init__(self, abs_srcdir, abs_builddir, logfile,
> base_url=None, fs_type=None, http_library=None,
> server_minor_version=None, verbose=None,
> - cleanup=None, enable_sasl=None, parallel=None, list_tests=None,
> - svn_bin=None):
> + cleanup=None, enable_sasl=None, parallel=None, config_file=None,
                                                                 ^^^^^^^^^^^
> + list_tests=None, svn_bin=None):
> '''Construct a TestHarness instance.
>

Adding the new argument broke the Windows tests, because win-tests.py
calls TestHarness this way:

    import run_tests
    th = run_tests.TestHarness(abs_srcdir, abs_builddir,
                               os.path.join(abs_builddir, log),
                               base_url, fs_type, http_library,
                               server_minor_version, 1, cleanup,
                               enable_sasl, parallel, list_tests,
                                                      ^^^^^^^^^^
                               svn_bin)

Not sure how to fix it; should config_file be supported on Windows?

> ABS_SRCDIR and ABS_BUILDDIR are the source and build directories.
> @@ -53,6 +53,9 @@ class TestHarness:
> self.cleanup = cleanup
> self.enable_sasl = enable_sasl
> self.parallel = parallel
> + self.config_file = None
> + if config_file is not None:
> + self.config_file = os.path.abspath(config_file)
> self.list_tests = list_tests
> self.svn_bin = svn_bin
> self.log = None
> @@ -114,10 +117,14 @@ class TestHarness:
> cmdline.append('--enable-sasl')
> if self.parallel is not None:
> cmdline.append('--parallel')
> + if self.config_file is not None:
> + cmdline.append(quote('--config-file=' + self.config_file))
> elif os.access(prog, os.X_OK):
> progname = './' + progbase
> cmdline = [quote(progname),
> quote('--srcdir=' + os.path.join(self.srcdir, progdir))]
> + if self.config_file is not None:
> + cmdline.append(quote('--config-file=' + self.config_file))
> else:
> print 'Don\'t know what to do about ' + progbase
> sys.exit(1)
> @@ -190,7 +197,7 @@ def main():
> opts, args = my_getopt(sys.argv[1:], 'u:f:vc',
> ['url=', 'fs-type=', 'verbose', 'cleanup',
> 'http-library=', 'server-minor-version=',
> - 'enable-sasl', 'parallel'])
> + 'enable-sasl', 'parallel', 'config-file='])
> except getopt.GetoptError:
> args = []
>
> @@ -199,8 +206,8 @@ def main():
> sys.exit(2)
>
> base_url, fs_type, verbose, cleanup, enable_sasl, http_library, \
> - server_minor_version, parallel = \
> - None, None, None, None, None, None, None, None
> + server_minor_version, parallel, config_file = \
> + None, None, None, None, None, None, None, None, None
> for opt, val in opts:
> if opt in ['-u', '--url']:
> base_url = val
> @@ -218,13 +225,15 @@ def main():
> enable_sasl = 1
> elif opt in ['--parallel']:
> parallel = 1
> + elif opt in ['--config-file']:
> + config_file = val
> else:
> raise getopt.GetoptError
>
> th = TestHarness(args[0], args[1],
> os.path.abspath('tests.log'),
> base_url, fs_type, http_library, server_minor_version,
> - verbose, cleanup, enable_sasl, parallel)
> + verbose, cleanup, enable_sasl, parallel, config_file)
>
> failed = th.run(args[2:])
> if failed:
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-23 08:44:12 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.