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

Re: [PATCH] #2532 Make svn C test harness to behave the same way as python test harness w.r.t --fs-type, --list switches.

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2006-04-06 16:01:56 CEST

Kamesh Jayachandran wrote:
> Thanks for the comments Garrett.
>
> Attaching the new patch.
>
> With regards
> Kamesh Jayachandran
>
> [[[
> Fix issue #2532, Make svn C test harness to behave the same way as
> python test harness w.r.t --fs-type, --list switches.
>
> * subversion/tests/svn_test_main.c
> (main): Using apr_getopt to parse the command line switches.
> Thanks to apr_getopt now the svn 'C' test programs,
> can be called with --fs-type [bdb/fsfs].
> The --list switch has been implemented to list the tests.
> Removed the notice message printed, on non-numeric arguments
> beyond argv[1].
> ]]]

[...]

> Index: subversion/tests/svn_test_main.c
> ===================================================================
> --- subversion/tests/svn_test_main.c (revision 19185)
> +++ subversion/tests/svn_test_main.c (working copy)
> @@ -26,6 +26,8 @@
> #include <apr_general.h>
> #include <apr_lib.h>
>
> +#include "svn_cmdline.h"
> +#include "svn_opt.h"
> #include "svn_pools.h"
> #include "svn_error.h"
> #include "svn_test.h"
> @@ -46,7 +48,25 @@
> /* Test option: Remove test directories after success */
> static int cleanup_mode = 0;
>
> +enum {
> + cleanup_opt = SVN_OPT_FIRST_LONGOPT_ID,
> + fstype_opt,
> + list_opt,
> + verbose_opt
> +};
>
> +static const apr_getopt_option_t cl_options[] =
> +{
> + {"cleanup", cleanup_opt, 0,
> + N_("remove test directories after success")},
> + {"fs-type", fstype_opt, 1,
> + N_("specify a fs-type ARG")},

I think I'd prefer "specify a filesystem backend type ARG" here. If the
Python tests use the abbreviation "fs-type" to describe the "fs-type"
option, they too should be fixed (though that can be seen as outside the
scope of this patch).

> + switch (opt_id) {
> + case cleanup_opt:
> + cleanup_mode = 1;
> + break;
> + case fstype_opt:
> + opts.fs_type = apr_pstrdup(pool, opt_arg);
> + break;
> + case list_opt:
> + list_mode = 1;
> + break;

Oops -- a little bit of odd indentation for that "break;" statement.

I'll make these final tweaks myself and commit up your otherwise
well-written patch after testing it (which I'm doing right now).

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Thu Apr 6 16:03:14 2006

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.