subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1327437 - in /subversion/trunk/subversion/tests/libsvn_subr: named_atomic-test-proc.c named_atomic-test.c
Date Wed, 18 Apr 2012 10:03:50 GMT
Author: stefan2
Date: Wed Apr 18 10:03:49 2012
New Revision: 1327437

URL: http://svn.apache.org/viewvc?rev=1327437&view=rev
Log:
Consolidate error messages from named atomics test #6 into
the main error log.

* subversion/tests/libsvn_subr/named_atomic-test.c
  (run_procs): re-direct sub-process' stdout to the parent's stdout
* subversion/tests/libsvn_subr/named_atomic-test-proc.c
  (main): log errors into stdout instead of stderr, log process id

Modified:
    subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-proc.c
    subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c

Modified: subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-proc.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-proc.c?rev=1327437&r1=1327436&r2=1327437&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-proc.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test-proc.c Wed Apr 18 10:03:49
2012
@@ -69,8 +69,9 @@ main(int argc, const char *argv[])
   err = test_pipeline(id, count, iterations, pool);
   if (err)
   {
+    const char *prefix = apr_psprintf(pool, "Process %d: ", id);
     got_error = TRUE;
-    svn_handle_error2(err, stderr, FALSE, "svn:");
+    svn_handle_error2(err, stdout, FALSE, prefix);
     svn_error_clear(err);
   }
 

Modified: subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c?rev=1327437&r1=1327436&r2=1327437&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c (original)
+++ subversion/trunk/subversion/tests/libsvn_subr/named_atomic-test.c Wed Apr 18 10:03:49
2012
@@ -221,10 +221,11 @@ run_procs(apr_pool_t *pool, const char *
 {
   int i;
   svn_error_t *error = SVN_NO_ERROR;
+  const char * directory = NULL;
 
   /* all processes and their I/O data */
   apr_proc_t *process = apr_palloc(pool, count * sizeof(*process));
-  const char * directory = NULL;
+  apr_file_t *common_stdout = NULL;
 
 #ifdef _WIN32
   /* Under Windows, the test will not be in the current directory
@@ -240,6 +241,8 @@ run_procs(apr_pool_t *pool, const char *
   directory = path;
 #endif
 
+  apr_file_open_stdout(&common_stdout, pool);
+  
   /* start threads */
   for (i = 0; i < count; ++i)
     {
@@ -261,8 +264,8 @@ run_procs(apr_pool_t *pool, const char *
                                 FALSE,      /* no handle inheritance */
                                 FALSE,      /* no STDIN pipe */
                                 NULL,
-                                FALSE,      /* no STDOUT pipe */
-                                NULL,
+                                FALSE,      /* consolidate into 1 STDOUT */
+                                common_stdout,
                                 FALSE,      /* no STDERR pipe */
                                 NULL,
                                 pool));



Mime
View raw message