subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1169947 - /subversion/trunk/subversion/tests/svn_test_main.c
Date Mon, 12 Sep 2011 21:43:09 GMT
Author: hwright
Date: Mon Sep 12 21:43:08 2011
New Revision: 1169947

URL: http://svn.apache.org/viewvc?rev=1169947&view=rev
Log:
Remove the --trap-assertion-failures switch from the test suite, in favor of
*allows* trapping assertion failures, unless --allow-segfaults is given.

See: http://svn.haxx.se/dev/archive-2011-09/0307.shtml

Suggested by: danielsh

* subversion/tests/svn_test_main.c
  (trap_assertion_failures): Remove.
  (trap_assert_opt): Remove.
  (cl_options): Remove the option for trapping assertion failures.
  (main): Don't parse the option, and if not told to abort(), don't.

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=1169947&r1=1169946&r2=1169947&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/svn_test_main.c (original)
+++ subversion/trunk/subversion/tests/svn_test_main.c Mon Sep 12 21:43:08 2011
@@ -53,13 +53,6 @@ const char **test_argv;
 /* Test option: Print more output */
 static svn_boolean_t verbose_mode = FALSE;
 
-/* Test option: Trap SVN_ERR_ASSERT failures in the code under test. Default
- * is false so the test can easily be run in a debugger with the debugger
- * catching the assertion failure. Test suites should enable this in order
- * to be able to continue with other sub-tests and report the results even
- * when a test hits an assertion failure. */
-static svn_boolean_t trap_assertion_failures = FALSE;
-
 /* Test option: Print only unexpected results */
 static svn_boolean_t quiet_mode = FALSE;
 
@@ -79,7 +72,6 @@ enum {
   fstype_opt,
   list_opt,
   verbose_opt,
-  trap_assert_opt,
   quiet_opt,
   config_opt,
   server_minor_version_opt,
@@ -106,8 +98,6 @@ static const apr_getopt_option_t cl_opti
   {"server-minor-version", server_minor_version_opt, 1,
                     N_("set the minor version for the server ('3', '4',\n"
                        "'5', or '6')")},
-  {"trap-assertion-failures", trap_assert_opt, 0,
-                    N_("catch and report SVN_ERR_ASSERT failures")},
   {"quiet",         quiet_opt, 0,
                     N_("print only unexpected results")},
   {"allow-segfaults", allow_segfault_opt, 0,
@@ -462,9 +452,6 @@ main(int argc, const char *argv[])
         case verbose_opt:
           verbose_mode = TRUE;
           break;
-        case trap_assert_opt:
-          trap_assertion_failures = TRUE;
-          break;
         case quiet_opt:
           quiet_mode = TRUE;
           break;
@@ -506,7 +493,7 @@ main(int argc, const char *argv[])
   cleanup_pool = svn_pool_create(pool);
   test_pool = svn_pool_create(pool);
 
-  if (trap_assertion_failures)
+  if (!allow_segfaults)
     svn_error_set_malfunction_handler(svn_error_raise_on_malfunction);
 
   if (argc >= 2)  /* notice command-line arguments */



Mime
View raw message