You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/02/09 17:46:21 UTC

svn commit: r1658462 [31/31] - in /subversion/branches/move-tracking-2: ./ build/ build/generator/ build/generator/templates/ notes/ subversion/ subversion/bindings/cxxhl/include/svncxxhl/ subversion/bindings/javahl/native/ subversion/bindings/javahl/n...

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.c?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.c Mon Feb  9 16:46:16 2015
@@ -22,6 +22,7 @@
 
 #include "svn_error.h"
 #include "svn_client.h"
+#include "svn_cmdline.h"
 #include "svn_pools.h"
 
 #include "utils.h"
@@ -33,9 +34,25 @@
 #define SVN_WC__I_AM_WC_DB
 #include "../../libsvn_wc/wc_db_private.h"
 
+svn_error_t *
+svn_test__create_client_ctx(svn_client_ctx_t **ctx,
+                            svn_test__sandbox_t *sbox,
+                            apr_pool_t *result_pool)
+{
+  SVN_ERR(svn_client_create_context2(ctx, NULL, result_pool));
+
+  SVN_ERR(svn_test__init_auth_baton(&(*ctx)->auth_baton,
+                                    result_pool));
+
+  if (sbox)
+    (*ctx)->wc_ctx = sbox->wc_ctx;
+
+  return SVN_NO_ERROR;
+}
 
 /* Create an empty repository and WC for the test TEST_NAME.  Set *REPOS_URL
- * to the URL of the new repository and *WC_ABSPATH to the root path of the
+ * to the URL of the new repository, *REPOS_DIR to its local path and
+ * *WC_ABSPATH to the root path of the
  * new WC.
  *
  * Create the repository and WC in subdirectories called
@@ -45,6 +62,7 @@
  * Register the repo and WC to be cleaned up when the test suite exits. */
 static svn_error_t *
 create_repos_and_wc(const char **repos_url,
+                    const char **repos_dir,
                     const char **wc_abspath,
                     const char *test_name,
                     const svn_test_opts_t *opts,
@@ -65,8 +83,6 @@ create_repos_and_wc(const char **repos_u
 
   /* Create a repos. Register it for clean-up. Set *REPOS_URL to its path. */
   {
-    svn_repos_t *repos;
-
     /* Use a subpool to create the repository and then destroy the subpool
        so the repository's underlying filesystem is closed.  If opts->fs_type
        is BDB this prevents any attempt to open a second environment handle
@@ -74,8 +90,8 @@ create_repos_and_wc(const char **repos_u
        only a single environment handle to be open per process. */
     apr_pool_t *subpool = svn_pool_create(pool);
 
-    SVN_ERR(svn_test__create_repos(&repos, repos_path, opts, subpool));
-    SVN_ERR(svn_uri_get_file_url_from_dirent(repos_url, repos_path, pool));
+    SVN_ERR(svn_test__create_repos2(NULL, repos_url, repos_dir, repos_path,
+                                    opts, pool, subpool));
     svn_pool_destroy(subpool);
   }
 
@@ -85,7 +101,7 @@ create_repos_and_wc(const char **repos_u
     svn_client_ctx_t *ctx;
     svn_opt_revision_t head_rev = { svn_opt_revision_head, {0} };
 
-    SVN_ERR(svn_client_create_context2(&ctx, NULL, subpool));
+    SVN_ERR(svn_test__create_client_ctx(&ctx, NULL, subpool));
     SVN_ERR(svn_dirent_get_absolute(wc_abspath, wc_path, pool));
     SVN_ERR(svn_client_checkout3(NULL, *repos_url, *wc_abspath,
                                  &head_rev, &head_rev, svn_depth_infinity,
@@ -101,7 +117,6 @@ create_repos_and_wc(const char **repos_u
   return SVN_NO_ERROR;
 }
 
-
 WC_QUERIES_SQL_DECLARE_STATEMENTS(statements);
 
 svn_error_t *
@@ -149,19 +164,28 @@ svn_test__sandbox_create(svn_test__sandb
                          apr_pool_t *pool)
 {
   sandbox->pool = pool;
-  SVN_ERR(create_repos_and_wc(&sandbox->repos_url, &sandbox->wc_abspath,
+  SVN_ERR(create_repos_and_wc(&sandbox->repos_url, &sandbox->repos_dir,
+                              &sandbox->wc_abspath,
                               test_name, opts, pool));
   SVN_ERR(svn_wc_context_create(&sandbox->wc_ctx, NULL, pool, pool));
   return SVN_NO_ERROR;
 }
 
-void
+svn_error_t *
 sbox_file_write(svn_test__sandbox_t *b, const char *path, const char *text)
 {
-  FILE *f = fopen(sbox_wc_path(b, path), "w");
+  apr_file_t *f;
+
+  SVN_ERR(svn_io_file_open(&f, sbox_wc_path(b, path),
+                           (APR_WRITE | APR_CREATE | APR_TRUNCATE),
+                           APR_OS_DEFAULT,
+                           b->pool));
+
+  SVN_ERR(svn_io_file_write_full(f, text, strlen(text), NULL, b->pool));
 
-  fputs(text, f);
-  fclose(f);
+  SVN_ERR(svn_io_file_close(f, b->pool));
+
+  return SVN_NO_ERROR;
 }
 
 svn_error_t *
@@ -240,8 +264,7 @@ sbox_wc_copy_url(svn_test__sandbox_t *b,
                                         scratch_pool, 1,
                                         sizeof(svn_client_copy_source_t *));
 
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, scratch_pool));
-  ctx->wc_ctx = b->wc_ctx;
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, scratch_pool));
 
   if (SVN_IS_VALID_REVNUM(revision))
     {
@@ -282,7 +305,11 @@ sbox_wc_revert(svn_test__sandbox_t *b, c
   SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
                                      dir_abspath, FALSE /* lock_anchor */,
                                      b->pool, b->pool));
-  SVN_ERR(svn_wc_revert5(b->wc_ctx, abspath, depth, FALSE, NULL, FALSE,
+  SVN_ERR(svn_wc_revert5(b->wc_ctx, abspath, depth,
+                         FALSE /* use_commit_times */,
+                         NULL /* changelist_filter */,
+                         FALSE /* clear_changelists */,
+                         FALSE /* metadata_only */,
                          NULL, NULL, /* cancel baton + func */
                          NULL, NULL, /* notify baton + func */
                          b->pool));
@@ -334,8 +361,7 @@ sbox_wc_commit_ex(svn_test__sandbox_t *b
   apr_pool_t *scratch_pool = svn_pool_create(b->pool);
   svn_error_t *err;
 
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, scratch_pool));
-  ctx->wc_ctx = b->wc_ctx;
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, scratch_pool));
 
   /* A successfull commit doesn't close the ra session, but leaves that
      to the caller. This leaves the BDB handle open, which might cause
@@ -387,8 +413,8 @@ sbox_wc_update_depth(svn_test__sandbox_t
     }
 
   APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, path);
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
-  ctx->wc_ctx = b->wc_ctx;
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
+
   return svn_client_update4(&result_revs, paths, &revision, depth,
                             sticky, FALSE, FALSE, FALSE, FALSE,
                             ctx, b->pool);
@@ -412,8 +438,8 @@ sbox_wc_switch(svn_test__sandbox_t *b,
   svn_opt_revision_t head_rev = { svn_opt_revision_head, {0} };
 
   url = apr_pstrcat(b->pool, b->repos_url, url, SVN_VA_NULL);
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
-  ctx->wc_ctx = b->wc_ctx;
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
+
   return svn_client_switch3(&result_rev, sbox_wc_path(b, path), url,
                             &head_rev, &head_rev, depth,
                             FALSE /* depth_is_sticky */,
@@ -464,8 +490,8 @@ sbox_wc_move(svn_test__sandbox_t *b, con
   apr_array_header_t *paths = apr_array_make(b->pool, 1,
                                              sizeof(const char *));
 
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
-  ctx->wc_ctx = b->wc_ctx;
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
+
   APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, src);
   return svn_client_move7(paths, sbox_wc_path(b, dst),
                           FALSE /* move_as_child */,
@@ -488,8 +514,8 @@ sbox_wc_propset(svn_test__sandbox_t *b,
                                              sizeof(const char *));
   svn_string_t *pval = value ? svn_string_create(value, b->pool) : NULL;
 
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, b->pool));
-  ctx->wc_ctx = b->wc_ctx;
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, b->pool));
+
   APR_ARRAY_PUSH(paths, const char *) = sbox_wc_path(b, path);
   return svn_client_propset_local(name, pval, paths, svn_depth_empty,
                                   TRUE /* skip_checks */,
@@ -503,8 +529,7 @@ sbox_wc_relocate(svn_test__sandbox_t *b,
   apr_pool_t *scratch_pool = b->pool;
   svn_client_ctx_t *ctx;
 
-  SVN_ERR(svn_client_create_context2(&ctx, NULL, scratch_pool));
-  ctx->wc_ctx = b->wc_ctx;
+  SVN_ERR(svn_test__create_client_ctx(&ctx, b, scratch_pool));
 
   SVN_ERR(svn_client_relocate2(b->wc_abspath, b->repos_url,
                                new_repos_url, FALSE, ctx,scratch_pool));
@@ -523,7 +548,7 @@ sbox_add_and_commit_greek_tree(svn_test_
     {
       if (node->contents)
         {
-          sbox_file_write(b, node->path, node->contents);
+          SVN_ERR(sbox_file_write(b, node->path, node->contents));
           SVN_ERR(sbox_wc_add(b, node->path));
         }
       else

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.h?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.h (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/utils.h Mon Feb  9 16:46:16 2015
@@ -25,6 +25,8 @@
 
 #include <apr_pools.h>
 #include "svn_error.h"
+#include "svn_client.h"
+
 #include "../svn_test.h"
 
 #ifdef __cplusplus
@@ -53,6 +55,8 @@ typedef struct svn_test__sandbox_t
   svn_wc_context_t *wc_ctx;
   /* The repository URL. */
   const char *repos_url;
+  /* Local path to the repository */
+  const char *repos_dir;
   /* The absolute local path of the WC root. */
   const char *wc_abspath;
   /* A pool that can be used for all allocations. */
@@ -83,7 +87,7 @@ svn_test__sandbox_create(svn_test__sandb
           (svn_dirent_join((b)->wc_abspath, (path), (b)->pool))
 
 /* Create a file on disk at PATH, with TEXT as its content. */
-void
+svn_error_t *
 sbox_file_write(svn_test__sandbox_t *b, const char *path, const char *text);
 
 /* Schedule for addition the single node that exists on disk at PATH,
@@ -185,6 +189,13 @@ svn_test__create_fake_wc(const char *wc_
                          apr_pool_t *scratch_pool);
 
 
+/* Create a client context for the specified sandbox */
+svn_error_t *
+svn_test__create_client_ctx(svn_client_ctx_t **ctx,
+                            svn_test__sandbox_t *sbox,
+                            apr_pool_t *result_pool);
+
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/move-tracking-2/subversion/tests/svn_test.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/svn_test.h?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/svn_test.h (original)
+++ subversion/branches/move-tracking-2/subversion/tests/svn_test.h Mon Feb  9 16:46:16 2015
@@ -34,6 +34,7 @@
 #include "svn_types.h"
 #include "svn_error.h"
 #include "svn_string.h"
+#include "svn_auth.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -117,12 +118,20 @@ extern "C" {
  */
 typedef struct svn_test_opts_t
 {
+  /* The name of the application (to generate unique names) */
+  const char *prog_name;
   /* Description of the fs backend that should be used for testing. */
   const char *fs_type;
   /* Config file. */
   const char *config_file;
   /* Source dir. */
   const char *srcdir;
+  /* Repository dir: temporary directory to create repositories in as subdir */
+  const char *repos_dir;
+  /* Repository url: The url to access REPOS_DIR as */
+  const char *repos_url;
+  /* Repository template: pre-created repository to copy for tests */
+  const char *repos_template;
   /* Minor version to use for servers and FS backends, or zero to use
      the current latest version. */
   int server_minor_version;
@@ -269,6 +278,11 @@ svn_test_get_srcdir(const char **srcdir,
                     const svn_test_opts_t *opts,
                     apr_pool_t *pool);
 
+/* Initializes a standard auth baton for accessing the repositories */
+svn_error_t *
+svn_test__init_auth_baton(svn_auth_baton_t **baton,
+                          apr_pool_t *result_pool);
+
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */

Modified: subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.c?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.c Mon Feb  9 16:46:16 2015
@@ -212,42 +212,115 @@ svn_test__create_fs(svn_fs_t **fs_p,
 }
 
 svn_error_t *
-svn_test__create_repos(svn_repos_t **repos_p,
-                       const char *name,
-                       const svn_test_opts_t *opts,
-                       apr_pool_t *pool)
+svn_test__create_repos2(svn_repos_t **repos_p,
+                        const char **repos_url,
+                        const char **repos_dirent,
+                        const char *name,
+                        const svn_test_opts_t *opts,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool)
 {
   svn_repos_t *repos;
   svn_boolean_t must_reopen;
+  const char *repos_abspath;
+  apr_pool_t *repos_pool = repos_p ? result_pool : scratch_pool;
+  svn_boolean_t init_svnserve = FALSE;
   apr_hash_t *fs_config = make_fs_config(opts->fs_type,
-                                         opts->server_minor_version, pool);
+                                         opts->server_minor_version,
+                                         repos_pool);
+
+  if (repos_url && opts->repos_dir && opts->repos_url)
+    {
+      name = apr_psprintf(scratch_pool, "%s-%s", opts->prog_name,
+                          svn_dirent_basename(name, NULL));
+
+      repos_abspath = svn_dirent_join(opts->repos_dir, name, scratch_pool);
+
+      SVN_ERR(svn_dirent_get_absolute(&repos_abspath, repos_abspath,
+                                      scratch_pool));
+
+      SVN_ERR(svn_io_make_dir_recursively(repos_abspath, scratch_pool));
+
+      *repos_url = svn_path_url_add_component2(opts->repos_url, name,
+                                               result_pool);
+
+      if (strstr(opts->repos_url, "svn://"))
+        init_svnserve = TRUE;
+    }
+  else
+    {
+      SVN_ERR(svn_dirent_get_absolute(&repos_abspath, name, scratch_pool));
+
+      if (repos_url)
+        SVN_ERR(svn_uri_get_file_url_from_dirent(repos_url, repos_abspath,
+                                                 result_pool));
+    }
 
   /* If there's already a repository named NAME, delete it.  Doing
      things this way means that repositories stick around after a
      failure for postmortem analysis, but also that tests can be
      re-run without cleaning out the repositories created by prior
      runs.  */
-  SVN_ERR(svn_io_remove_dir2(name, TRUE, NULL, NULL, pool));
+  SVN_ERR(svn_io_remove_dir2(repos_abspath, TRUE, NULL, NULL, scratch_pool));
 
-  SVN_ERR(svn_repos_create(&repos, name, NULL, NULL, NULL,
-                           fs_config, pool));
+  SVN_ERR(svn_repos_create(&repos, repos_abspath, NULL, NULL, NULL,
+                           fs_config, repos_pool));
 
   /* Register this repo for cleanup. */
-  svn_test_add_dir_cleanup(name);
+  svn_test_add_dir_cleanup(repos_abspath);
 
   SVN_ERR(maybe_install_fs_conf(svn_repos_fs(repos), opts, &must_reopen,
-                                pool));
+                                scratch_pool));
   if (must_reopen)
     {
-      SVN_ERR(svn_repos_open3(&repos, name, NULL, pool, pool));
-      svn_fs_set_warning_func(svn_repos_fs(repos), fs_warning_handler, NULL);
+      SVN_ERR(svn_repos_open3(&repos, repos_abspath, NULL, repos_pool,
+                              scratch_pool));
     }
 
-  *repos_p = repos;
+  svn_fs_set_warning_func(svn_repos_fs(repos), fs_warning_handler, NULL);
+
+  if (init_svnserve)
+    {
+      const char *cfg;
+      const char *pwd;
+
+      cfg = svn_dirent_join(repos_abspath, "conf/svnserve.conf", scratch_pool);
+      SVN_ERR(svn_io_remove_file2(cfg, FALSE, scratch_pool));
+      SVN_ERR(svn_io_file_create(cfg,
+                                 "[general]\n"
+                                 "auth-access = write\n"
+                                 "password-db = passwd\n",
+                                 scratch_pool));
+
+      pwd = svn_dirent_join(repos_abspath, "conf/passwd", scratch_pool);
+      SVN_ERR(svn_io_remove_file2(pwd, FALSE, scratch_pool));
+      SVN_ERR(svn_io_file_create(pwd,
+                                 "[users]\n"
+                                 "jrandom = rayjandom\n"
+                                 "jconstant = rayjandom\n",
+                                 scratch_pool));
+    }
+
+  if (repos_p)
+    *repos_p = repos;
+  if (repos_dirent)
+    *repos_dirent = apr_pstrdup(result_pool, repos_abspath);
+
   return SVN_NO_ERROR;
 }
 
 svn_error_t *
+svn_test__create_repos(svn_repos_t **repos_p,
+                       const char *name,
+                       const svn_test_opts_t *opts,
+                       apr_pool_t *pool)
+{
+  return svn_error_trace(
+            svn_test__create_repos2(repos_p, NULL, NULL, name,
+                                    opts, pool, pool));
+}
+
+svn_error_t *
 svn_test__stream_to_string(svn_stringbuf_t **string,
                            svn_stream_t *stream,
                            apr_pool_t *pool)

Modified: subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.h
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.h?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.h (original)
+++ subversion/branches/move-tracking-2/subversion/tests/svn_test_fs.h Mon Feb  9 16:46:16 2015
@@ -82,6 +82,19 @@ svn_test__create_repos(svn_repos_t **rep
                        const svn_test_opts_t *opts,
                        apr_pool_t *pool);
 
+/* Create a repository with a filesystem based on OPTS in a subdir NAME
+   and return optionally new REPOS object, the directory it was created in
+   and/or the url of the repository .  */
+svn_error_t *
+svn_test__create_repos2(svn_repos_t **repos_p,
+                        const char **repos_url,
+                        const char **repos_dirent,
+                        const char *name,
+                        const svn_test_opts_t *opts,
+                        apr_pool_t *result_pool,
+                        apr_pool_t *scratch_pool);
+
+
 /* Read all data from a generic read STREAM, and return it in STRING.
    Allocate the svn_stringbuf_t in POOL.  (All data in STRING will be
    dup'ed from STREAM using POOL too.) */

Modified: subversion/branches/move-tracking-2/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/svn_test_main.c?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/svn_test_main.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/svn_test_main.c Mon Feb  9 16:46:16 2015
@@ -101,6 +101,9 @@ enum test_options_e {
   server_minor_version_opt,
   allow_segfault_opt,
   srcdir_opt,
+  reposdir_opt,
+  reposurl_opt,
+  repostemplate_opt,
   mode_filter_opt,
   sqlite_log_opt,
   parallel_opt,
@@ -135,6 +138,12 @@ static const apr_getopt_option_t cl_opti
                     N_("don't trap seg faults (useful for debugging)")},
   {"srcdir",        srcdir_opt, 1,
                     N_("directory which contains test's C source files")},
+  {"repos-dir",     reposdir_opt, 1,
+                    N_("directory to create repositories in")},
+  {"repos-url",     reposurl_opt, 1,
+                    N_("the url to access reposdir as")},
+  {"repos-template",repostemplate_opt, 1,
+                    N_("the repository to use as template")},
   {"sqlite-logging", sqlite_log_opt, 0,
                     N_("enable SQLite logging")},
   {"parallel",      parallel_opt, 0,
@@ -682,12 +691,40 @@ svn_test_get_srcdir(const char **srcdir,
   return SVN_NO_ERROR;
 }
 
+svn_error_t *
+svn_test__init_auth_baton(svn_auth_baton_t **ab,
+                          apr_pool_t *result_pool)
+{
+  svn_config_t *cfg_config;
+
+  SVN_ERR(svn_config_create2(&cfg_config, FALSE, FALSE, result_pool));
+
+  /* Disable the crypto backends that might not be entirely
+     threadsafe and/or compatible with running headless.
+
+     The windows system is just our own files, but then with user-key
+     encrypted data inside. */
+  svn_config_set(cfg_config,
+                 SVN_CONFIG_SECTION_AUTH,
+                 SVN_CONFIG_OPTION_PASSWORD_STORES,
+                 "windows-cryptoapi");
+
+  SVN_ERR(svn_cmdline_create_auth_baton(ab,
+                                        TRUE  /* non_interactive */,
+                                        "jrandom", "rayjandom",
+                                        NULL,
+                                        TRUE  /* no_auth_cache */,
+                                        FALSE /* trust_server_cert */,
+                                        cfg_config, NULL, NULL, result_pool));
+
+  return SVN_NO_ERROR;
+}
+
 /* Standard svn test program */
 int
 svn_test_main(int argc, const char *argv[], int max_threads,
               struct svn_test_descriptor_t *test_funcs)
 {
-  const char *prog_name;
   int i;
   svn_boolean_t got_error = FALSE;
   apr_pool_t *pool, *test_pool;
@@ -745,21 +782,19 @@ svn_test_main(int argc, const char *argv
   os->interleave = TRUE; /* Let options and arguments be interleaved */
 
   /* Strip off any leading path components from the program name.  */
-  prog_name = strrchr(argv[0], '/');
-  if (prog_name)
-    prog_name++;
-  else
-    {
-      /* Just check if this is that weird platform that uses \ instead
-         of / for the path separator. */
-      prog_name = strrchr(argv[0], '\\');
-      if (prog_name)
-        prog_name++;
-      else
-        prog_name = argv[0];
-    }
+  opts.prog_name = svn_dirent_internal_style(argv[0], pool);
+  opts.prog_name = svn_dirent_basename(opts.prog_name, NULL);
 
 #ifdef WIN32
+  /* Abuse cast in strstr() to remove .exe extension.
+     Value is allocated in pool by svn_dirent_internal_style() */
+  {
+    char *exe_ext = strstr(opts.prog_name, ".exe");
+
+    if (exe_ext)
+      *exe_ext = '\0';
+  }
+
 #if _MSC_VER >= 1400
   /* ### This should work for VC++ 2002 (=1300) and later */
   /* Show the abort message on STDERR instead of a dialog to allow
@@ -781,7 +816,7 @@ svn_test_main(int argc, const char *argv
 #endif
 
   if (err)
-    return svn_cmdline_handle_exit_error(err, pool, prog_name);
+    return svn_cmdline_handle_exit_error(err, pool, opts.prog_name);
   while (1)
     {
       const char *opt_arg;
@@ -800,7 +835,7 @@ svn_test_main(int argc, const char *argv
 
       switch (opt_id) {
         case help_opt:
-          help(prog_name, pool);
+          help(opts.prog_name, pool);
           exit(0);
         case cleanup_opt:
           cleanup_mode = TRUE;
@@ -815,6 +850,20 @@ svn_test_main(int argc, const char *argv
           SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.srcdir, opt_arg, pool));
           opts.srcdir = svn_dirent_internal_style(opts.srcdir, pool);
           break;
+        case reposdir_opt:
+          SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.repos_dir, opt_arg, pool));
+          opts.repos_dir = svn_dirent_internal_style(opts.repos_dir, pool);
+          break;
+        case reposurl_opt:
+          SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.repos_url, opt_arg, pool));
+          opts.repos_url = svn_uri_canonicalize(opts.repos_url, pool);
+          break;
+        case repostemplate_opt:
+          SVN_INT_ERR(svn_utf_cstring_to_utf8(&opts.repos_template, opt_arg,
+                                              pool));
+          opts.repos_template = svn_dirent_internal_style(opts.repos_template,
+                                                          pool);
+          break;
         case list_opt:
           list_mode = TRUE;
           break;
@@ -903,7 +952,7 @@ svn_test_main(int argc, const char *argv
                        "------  -----  ----------------\n";
           for (i = 1; i <= array_size; i++)
             {
-              if (do_test_num(prog_name, i, test_funcs,
+              if (do_test_num(opts.prog_name, i, test_funcs,
                               TRUE, &opts, &header_msg, test_pool))
                 got_error = TRUE;
 
@@ -924,7 +973,7 @@ svn_test_main(int argc, const char *argv
                     continue;
 
                   ran_a_test = TRUE;
-                  if (do_test_num(prog_name, test_num, test_funcs,
+                  if (do_test_num(opts.prog_name, test_num, test_funcs,
                                   FALSE, &opts, NULL, test_pool))
                     got_error = TRUE;
 
@@ -946,7 +995,7 @@ svn_test_main(int argc, const char *argv
         {
           for (i = 1; i <= array_size; i++)
             {
-              if (do_test_num(prog_name, i, test_funcs,
+              if (do_test_num(opts.prog_name, i, test_funcs,
                               FALSE, &opts, NULL, test_pool))
                 got_error = TRUE;
 
@@ -958,7 +1007,7 @@ svn_test_main(int argc, const char *argv
 #if APR_HAS_THREADS
       else
         {
-          got_error = do_tests_concurrently(prog_name, test_funcs,
+          got_error = do_tests_concurrently(opts.prog_name, test_funcs,
                                             array_size, max_threads,
                                             &opts, test_pool);
 

Propchange: subversion/branches/move-tracking-2/tools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Feb  9 16:46:16 2015
@@ -82,4 +82,4 @@
 /subversion/branches/verify-at-commit/tools:1462039-1462408
 /subversion/branches/verify-keep-going/tools:1439280-1546110
 /subversion/branches/wc-collate-path/tools:1402685-1480384
-/subversion/trunk/tools:1606692-1653312
+/subversion/trunk/tools:1606692-1658451

Modified: subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh (original)
+++ subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svnbuild.sh Mon Feb  9 16:46:16 2015
@@ -41,7 +41,6 @@ echo "============ configure"
   --with-serf=/export/home/wandisco/buildbot/install \
   --with-apxs=/export/home/wandisco/buildbot/install/bin/apxs \
   --with-sqlite=/export/home/wandisco/buildbot/sqlite-amalgamation-3071501/sqlite3.c \
-  --enable-optimize \
   --disable-shared \
   $OPTIMIZE_OPTION \
   || exit $?

Modified: subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh?rev=1658462&r1=1658461&r2=1658462&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh (original)
+++ subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-sparc-solaris/svncheck.sh Mon Feb  9 16:46:16 2015
@@ -24,6 +24,10 @@ SVN_VER_MINOR=`awk '/define SVN_VER_MINO
 
 cd ../obj
 
+# Use GNU iconv since the system one does not work well enough
+LD_PRELOAD_64=/export/home/wandisco/buildbot/install/lib/preloadable_libiconv.so
+export LD_PRELOAD_64
+
 if [ $SVN_VER_MINOR -eq 9 ]; then
   echo "============ make svnserveautocheck"
   make svnserveautocheck CLEANUP=1 PARALLEL=30 THREADED=1
@@ -32,31 +36,4 @@ else
   make check CLEANUP=1 PARALLEL=30 THREADED=1
 fi
 
-# 'make check' will FAIL due to lack of UTF-8 conversion, so whitelist
-# those known failures.
-known="^FAIL: ("
-known="${known} subst_translate-test 1: test svn_subst_translate_string2"
-known="${known}|"
-known="${known} subst_translate-test 2: test svn_subst_translate_string2"
-known="${known}|"
-known="${known} utf-test 3: test svn_utf_cstring_to_utf8_ex2"
-known="${known}|"
-known="${known} utf-test 4: test svn_utf_cstring_from_utf8_ex2"
-known="${known}|"
-known="${known} prop_tests.py 22: test prop. handle invalid property names"
-known="${known}|"
-known="${known} prop_tests.py 41: svn:author with XML unsafe chars"
-known="${known}|"
-known="${known} svnsync_tests.py 24: copy and reencode non-UTF-8 svn:. props"
-known="${known})"
-
-# tests.log must exist
-test -f tests.log || exit 1
-
-# No FAIL other than the known ones.
-egrep -v "$known" tests.log | grep '^FAIL' && exit 1
-
-# Over 1,000 PASS.
-grep '^PASS' tests.log | wc -l | grep [1-9][0-9][0-9][0-9] >/dev/null || echo $?
-
 exit 0

Propchange: subversion/branches/move-tracking-2/tools/dev/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Feb  9 16:46:16 2015
@@ -1,3 +1,4 @@
 .libs
 fsfs-access-map
 logdata.py
+x509-parser