subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1560409 - /subversion/trunk/subversion/tests/svn_test_main.c
Date Wed, 22 Jan 2014 16:31:07 GMT
Author: rhuijben
Date: Wed Jan 22 16:31:06 2014
New Revision: 1560409

URL: http://svn.apache.org/r1560409
Log:
Following up on r1558470, only enable the sqlite errorlog in C tests when
a new --sqlite-logging argument is passed. This disables the option during
normal test runs.

* subversion/tests/svn_test_main.c
  (test_options_e): Name enum and add value.
  (cl_options): Add and document option.
  (main): Only enable logging when explicitly requested.

Modified:
    subversion/trunk/subversion/tests/svn_test_main.c

Modified: subversion/trunk/subversion/tests/svn_test_main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/svn_test_main.c?rev=1560409&r1=1560408&r2=1560409&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_main.c (original)
+++ subversion/trunk/subversion/tests/svn_test_main.c Wed Jan 22 16:31:06 2014
@@ -88,7 +88,7 @@ enum svn_test_mode_t mode_filter = svn_t
 static svn_boolean_t parallel = FALSE;
 
 /* Option parsing enums and structures */
-enum {
+enum test_options_e {
   help_opt = SVN_OPT_FIRST_LONGOPT_ID,
   cleanup_opt,
   fstype_opt,
@@ -100,6 +100,7 @@ enum {
   allow_segfault_opt,
   srcdir_opt,
   mode_filter_opt,
+  sqlite_log_opt,
   parallel_opt
 };
 
@@ -129,6 +130,8 @@ static const apr_getopt_option_t cl_opti
                     N_("don't trap seg faults (useful for debugging)")},
   {"srcdir",        srcdir_opt, 1,
                     N_("source directory")},
+  {"sqlite-logging", sqlite_log_opt, 0,
+                    N_("enable SQLite logging")},
   {"parallel",      parallel_opt, 0,
                     N_("allow concurrent execution of tests")},
   {0,               0, 0, 0}
@@ -717,11 +720,6 @@ main(int argc, const char *argv[])
 #endif /* _MSC_VER >= 1400 */
 #endif
 
-  /* Temporary code: Enable Sqlite error log to diagnose buildbot issue.
-     ### Perhaps we should later attach this to an environment variable? */
-  svn_sqlite__dbg_enable_errorlog();
-  /* /Temporary code */
-
   if (err)
     return svn_cmdline_handle_exit_error(err, pool, prog_name);
   while (1)
@@ -802,6 +800,9 @@ main(int argc, const char *argv[])
               }
             break;
           }
+        case sqlite_log_opt:
+          svn_sqlite__dbg_enable_errorlog();
+          break;
 #if APR_HAS_THREADS
         case parallel_opt:
           parallel = TRUE;



Mime
View raw message