You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/06/14 01:19:53 UTC

svn commit: r954328 - /subversion/trunk/build/run_tests.py

Author: hwright
Date: Sun Jun 13 23:19:53 2010
New Revision: 954328

URL: http://svn.apache.org/viewvc?rev=954328&view=rev
Log:
* build/run_tests.py
  (_run_prog): Remove all the custom stdout/stderr redirect handling, in favor
    of the subprocess module's built-in facilities.

Modified:
    subversion/trunk/build/run_tests.py

Modified: subversion/trunk/build/run_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=954328&r1=954327&r2=954328&view=diff
==============================================================================
--- subversion/trunk/build/run_tests.py (original)
+++ subversion/trunk/build/run_tests.py Sun Jun 13 23:19:53 2010
@@ -323,31 +323,9 @@ class TestHarness:
     '''Execute the file PROGNAME in a subprocess, with ARGLIST as its
     arguments (a list/tuple of arg0..argN), redirecting standard output and
     error to the log file. Return the command's exit code.'''
-    def restore_streams(stdout, stderr):
-      os.dup2(stdout, 1)
-      os.dup2(stderr, 2)
-      os.close(stdout)
-      os.close(stderr)
-
-    if self.log:
-      sys.stdout.flush()
-      sys.stderr.flush()
-      self.log.flush()
-      old_stdout = os.dup(1)
-      old_stderr = os.dup(2)
-    try:
-      if self.log:
-        os.dup2(self.log.fileno(), 1)
-        os.dup2(self.log.fileno(), 2)
-      rv = subprocess.call(arglist)
-    except:
-      if self.log:
-        restore_streams(old_stdout, old_stderr)
-      raise
-    else:
-      if self.log:
-        restore_streams(old_stdout, old_stderr)
-      return rv
+    prog = subprocess.Popen(arglist, stdout=self.log, stderr=self.log)
+    prog.wait()
+    return prog.returncode
 
 
 def main():



Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Tue, Jun 15, 2010 at 3:47 AM, Bert Huijben <be...@qqmail.nl> wrote:
>
> Hi Hyrum,
>
> I think you should revert to sending plain text mails to this list ;-)

Heh, I agree.  Somewhere html snuck into the thread, and my client has
automagically htmlified the responses.  This should fix it, methinks.
(And thanks for the observation.)

-Hyrum

Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Tue, Jun 15, 2010 at 3:47 AM, Bert Huijben <be...@qqmail.nl> wrote:
>
> Hi Hyrum,
>
> I think you should revert to sending plain text mails to this list ;-)

Heh, I agree.  Somewhere html snuck into the thread, and my client has
automagically htmlified the responses.  This should fix it, methinks.
(And thanks for the observation.)

-Hyrum

RE: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by Bert Huijben <be...@qqmail.nl>.
Hi Hyrum,

 

I think you should revert to sending plain text mails to this list ;-)

 

I can confirm that your latest patch resolves the test output issues.

 

                Bert

 

From: hyrum@hyrumwright.org [mailto:hyrum@hyrumwright.org] On Behalf Of
Hyrum K. Wright
Sent: maandag 14 juni 2010 2:48
To: dev
Cc: commits
Subject: Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

 

 

On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:



> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: maandag 14 juni 2010 1:20
> To: commits@subversion.apache.org
> Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
>
> Author: hwright
> Date: Sun Jun 13 23:19:53 2010
> New Revision: 954328
>
> URL: http://svn.apache.org/viewvc?rev=954328
<http://svn.apache.org/viewvc?rev=954328&view=rev> &view=rev
> Log:
> * build/run_tests.py
>   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> favor
>     of the subprocess module's built-in facilities.

For some reason I don't see any test output when running the tests now.
(stdout doesn't show anything when starting the tests). The buildbots show
the same effect: No streaming per test results on Windows.


I'm confused: what are you seeing, and what do you expect.  For myself, I
couldn't see *any* difference between the windows buildbot from before this
change and the buildbot after, for both the testlog and stdio files.
 

And it is very hard to debug without output. (Looking at the process monitor
and the log file shows that the tests just run fine).


Agreed that we should have useful output.

Cheers,
-Hyrum 


Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Bert,
Does r954683 make things any better?

-Hyrum

On Mon, Jun 14, 2010 at 2:33 AM, Bert Huijben <be...@vmoo.com> wrote:

> While you are running the test you see:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> (= nothing at all).
>
>
>
> Only after all tests are finished the output is written to screen.
>
>
>
> So yes, after all tests are finished you see exactly the same output (as
> you confirmed), but before that it is just guessing when the tests are over
> and how far the tests are.
>
> So I can only see that some basic tests failed after waiting for all the
> other tests, while I could see that via the ….FAILED line immediately.
>
>
>
>                 Bert
>
>
>
> *From:* hyrum@hyrumwright.org [mailto:hyrum@hyrumwright.org] *On Behalf Of
> *Hyrum K. Wright
> *Sent:* maandag 14 juni 2010 2:48
> *To:* dev
> *Cc:* commits
> *Subject:* Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py
>
>
>
>
>
> On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:
>
>
>
> > -----Original Message-----
> > From: hwright@apache.org [mailto:hwright@apache.org]
> > Sent: maandag 14 juni 2010 1:20
> > To: commits@subversion.apache.org
> > Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
> >
> > Author: hwright
> > Date: Sun Jun 13 23:19:53 2010
> > New Revision: 954328
> >
> > URL: http://svn.apache.org/viewvc?rev=954328&view=rev
> > Log:
> > * build/run_tests.py
> >   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> > favor
> >     of the subprocess module's built-in facilities.
>
> For some reason I don't see any test output when running the tests now.
> (stdout doesn't show anything when starting the tests). The buildbots show
> the same effect: No streaming per test results on Windows.
>
>
> I'm confused: what are you seeing, and what do you expect.  For myself, I
> couldn't see *any* difference between the windows buildbot from before this
> change and the buildbot after, for both the testlog and stdio files.
>
>
> And it is very hard to debug without output. (Looking at the process
> monitor and the log file shows that the tests just run fine).
>
>
> Agreed that we should have useful output.
>
> Cheers,
> -Hyrum
>

Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
Bert,
Does r954683 make things any better?

-Hyrum

On Mon, Jun 14, 2010 at 2:33 AM, Bert Huijben <be...@vmoo.com> wrote:

> While you are running the test you see:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> (= nothing at all).
>
>
>
> Only after all tests are finished the output is written to screen.
>
>
>
> So yes, after all tests are finished you see exactly the same output (as
> you confirmed), but before that it is just guessing when the tests are over
> and how far the tests are.
>
> So I can only see that some basic tests failed after waiting for all the
> other tests, while I could see that via the ….FAILED line immediately.
>
>
>
>                 Bert
>
>
>
> *From:* hyrum@hyrumwright.org [mailto:hyrum@hyrumwright.org] *On Behalf Of
> *Hyrum K. Wright
> *Sent:* maandag 14 juni 2010 2:48
> *To:* dev
> *Cc:* commits
> *Subject:* Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py
>
>
>
>
>
> On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:
>
>
>
> > -----Original Message-----
> > From: hwright@apache.org [mailto:hwright@apache.org]
> > Sent: maandag 14 juni 2010 1:20
> > To: commits@subversion.apache.org
> > Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
> >
> > Author: hwright
> > Date: Sun Jun 13 23:19:53 2010
> > New Revision: 954328
> >
> > URL: http://svn.apache.org/viewvc?rev=954328&view=rev
> > Log:
> > * build/run_tests.py
> >   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> > favor
> >     of the subprocess module's built-in facilities.
>
> For some reason I don't see any test output when running the tests now.
> (stdout doesn't show anything when starting the tests). The buildbots show
> the same effect: No streaming per test results on Windows.
>
>
> I'm confused: what are you seeing, and what do you expect.  For myself, I
> couldn't see *any* difference between the windows buildbot from before this
> change and the buildbot after, for both the testlog and stdio files.
>
>
> And it is very hard to debug without output. (Looking at the process
> monitor and the log file shows that the tests just run fine).
>
>
> Agreed that we should have useful output.
>
> Cheers,
> -Hyrum
>

RE: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by Bert Huijben <be...@vmoo.com>.
While you are running the test you see:

 

 

 

 

 

 

 

 

(= nothing at all).

 

Only after all tests are finished the output is written to screen. 

 

So yes, after all tests are finished you see exactly the same output (as you
confirmed), but before that it is just guessing when the tests are over and
how far the tests are. 

So I can only see that some basic tests failed after waiting for all the
other tests, while I could see that via the ..FAILED line immediately.

 

                Bert

 

From: hyrum@hyrumwright.org [mailto:hyrum@hyrumwright.org] On Behalf Of
Hyrum K. Wright
Sent: maandag 14 juni 2010 2:48
To: dev
Cc: commits
Subject: Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

 

 

On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:



> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: maandag 14 juni 2010 1:20
> To: commits@subversion.apache.org
> Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
>
> Author: hwright
> Date: Sun Jun 13 23:19:53 2010
> New Revision: 954328
>
> URL: http://svn.apache.org/viewvc?rev=954328
<http://svn.apache.org/viewvc?rev=954328&view=rev> &view=rev
> Log:
> * build/run_tests.py
>   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> favor
>     of the subprocess module's built-in facilities.

For some reason I don't see any test output when running the tests now.
(stdout doesn't show anything when starting the tests). The buildbots show
the same effect: No streaming per test results on Windows.


I'm confused: what are you seeing, and what do you expect.  For myself, I
couldn't see *any* difference between the windows buildbot from before this
change and the buildbot after, for both the testlog and stdio files.
 

And it is very hard to debug without output. (Looking at the process monitor
and the log file shows that the tests just run fine).


Agreed that we should have useful output.

Cheers,
-Hyrum 


RE: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by Bert Huijben <be...@qqmail.nl>.
Hi Hyrum,

 

I think you should revert to sending plain text mails to this list ;-)

 

I can confirm that your latest patch resolves the test output issues.

 

                Bert

 

From: hyrum@hyrumwright.org [mailto:hyrum@hyrumwright.org] On Behalf Of
Hyrum K. Wright
Sent: maandag 14 juni 2010 2:48
To: dev
Cc: commits
Subject: Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

 

 

On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:



> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: maandag 14 juni 2010 1:20
> To: commits@subversion.apache.org
> Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
>
> Author: hwright
> Date: Sun Jun 13 23:19:53 2010
> New Revision: 954328
>
> URL: http://svn.apache.org/viewvc?rev=954328
<http://svn.apache.org/viewvc?rev=954328&view=rev> &view=rev
> Log:
> * build/run_tests.py
>   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> favor
>     of the subprocess module's built-in facilities.

For some reason I don't see any test output when running the tests now.
(stdout doesn't show anything when starting the tests). The buildbots show
the same effect: No streaming per test results on Windows.


I'm confused: what are you seeing, and what do you expect.  For myself, I
couldn't see *any* difference between the windows buildbot from before this
change and the buildbot after, for both the testlog and stdio files.
 

And it is very hard to debug without output. (Looking at the process monitor
and the log file shows that the tests just run fine).


Agreed that we should have useful output.

Cheers,
-Hyrum 


RE: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by Bert Huijben <be...@vmoo.com>.
While you are running the test you see:

 

 

 

 

 

 

 

 

(= nothing at all).

 

Only after all tests are finished the output is written to screen. 

 

So yes, after all tests are finished you see exactly the same output (as you
confirmed), but before that it is just guessing when the tests are over and
how far the tests are. 

So I can only see that some basic tests failed after waiting for all the
other tests, while I could see that via the ..FAILED line immediately.

 

                Bert

 

From: hyrum@hyrumwright.org [mailto:hyrum@hyrumwright.org] On Behalf Of
Hyrum K. Wright
Sent: maandag 14 juni 2010 2:48
To: dev
Cc: commits
Subject: Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

 

 

On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:



> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: maandag 14 juni 2010 1:20
> To: commits@subversion.apache.org
> Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
>
> Author: hwright
> Date: Sun Jun 13 23:19:53 2010
> New Revision: 954328
>
> URL: http://svn.apache.org/viewvc?rev=954328
<http://svn.apache.org/viewvc?rev=954328&view=rev> &view=rev
> Log:
> * build/run_tests.py
>   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> favor
>     of the subprocess module's built-in facilities.

For some reason I don't see any test output when running the tests now.
(stdout doesn't show anything when starting the tests). The buildbots show
the same effect: No streaming per test results on Windows.


I'm confused: what are you seeing, and what do you expect.  For myself, I
couldn't see *any* difference between the windows buildbot from before this
change and the buildbot after, for both the testlog and stdio files.
 

And it is very hard to debug without output. (Looking at the process monitor
and the log file shows that the tests just run fine).


Agreed that we should have useful output.

Cheers,
-Hyrum 


Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:

>
>
> > -----Original Message-----
> > From: hwright@apache.org [mailto:hwright@apache.org]
> > Sent: maandag 14 juni 2010 1:20
> > To: commits@subversion.apache.org
> > Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
> >
> > Author: hwright
> > Date: Sun Jun 13 23:19:53 2010
> > New Revision: 954328
> >
> > URL: http://svn.apache.org/viewvc?rev=954328&view=rev
> > Log:
> > * build/run_tests.py
> >   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> > favor
> >     of the subprocess module's built-in facilities.
>
> For some reason I don't see any test output when running the tests now.
> (stdout doesn't show anything when starting the tests). The buildbots show
> the same effect: No streaming per test results on Windows.
>

I'm confused: what are you seeing, and what do you expect.  For myself, I
couldn't see *any* difference between the windows buildbot from before this
change and the buildbot after, for both the testlog and stdio files.


> And it is very hard to debug without output. (Looking at the process
> monitor and the log file shows that the tests just run fine).
>

Agreed that we should have useful output.

Cheers,
-Hyrum

Re: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by "Hyrum K. Wright" <hy...@mail.utexas.edu>.
On Mon, Jun 14, 2010 at 2:36 AM, Bert Huijben <be...@vmoo.com> wrote:

>
>
> > -----Original Message-----
> > From: hwright@apache.org [mailto:hwright@apache.org]
> > Sent: maandag 14 juni 2010 1:20
> > To: commits@subversion.apache.org
> > Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
> >
> > Author: hwright
> > Date: Sun Jun 13 23:19:53 2010
> > New Revision: 954328
> >
> > URL: http://svn.apache.org/viewvc?rev=954328&view=rev
> > Log:
> > * build/run_tests.py
> >   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> > favor
> >     of the subprocess module's built-in facilities.
>
> For some reason I don't see any test output when running the tests now.
> (stdout doesn't show anything when starting the tests). The buildbots show
> the same effect: No streaming per test results on Windows.
>

I'm confused: what are you seeing, and what do you expect.  For myself, I
couldn't see *any* difference between the windows buildbot from before this
change and the buildbot after, for both the testlog and stdio files.


> And it is very hard to debug without output. (Looking at the process
> monitor and the log file shows that the tests just run fine).
>

Agreed that we should have useful output.

Cheers,
-Hyrum

RE: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by Bert Huijben <be...@vmoo.com>.

> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: maandag 14 juni 2010 1:20
> To: commits@subversion.apache.org
> Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
> 
> Author: hwright
> Date: Sun Jun 13 23:19:53 2010
> New Revision: 954328
> 
> URL: http://svn.apache.org/viewvc?rev=954328&view=rev
> Log:
> * build/run_tests.py
>   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> favor
>     of the subprocess module's built-in facilities.

For some reason I don't see any test output when running the tests now. (stdout doesn't show anything when starting the tests). The buildbots show the same effect: No streaming per test results on Windows.

And it is very hard to debug without output. (Looking at the process monitor and the log file shows that the tests just run fine).

	Bert


> 
> Modified:
>     subversion/trunk/build/run_tests.py
> 
> Modified: subversion/trunk/build/run_tests.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=95
> 4328&r1=954327&r2=954328&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/build/run_tests.py (original)
> +++ subversion/trunk/build/run_tests.py Sun Jun 13 23:19:53 2010
> @@ -323,31 +323,9 @@ class TestHarness:
>      '''Execute the file PROGNAME in a subprocess, with ARGLIST as its
>      arguments (a list/tuple of arg0..argN), redirecting standard output and
>      error to the log file. Return the command's exit code.'''
> -    def restore_streams(stdout, stderr):
> -      os.dup2(stdout, 1)
> -      os.dup2(stderr, 2)
> -      os.close(stdout)
> -      os.close(stderr)
> -
> -    if self.log:
> -      sys.stdout.flush()
> -      sys.stderr.flush()
> -      self.log.flush()
> -      old_stdout = os.dup(1)
> -      old_stderr = os.dup(2)
> -    try:
> -      if self.log:
> -        os.dup2(self.log.fileno(), 1)
> -        os.dup2(self.log.fileno(), 2)
> -      rv = subprocess.call(arglist)
> -    except:
> -      if self.log:
> -        restore_streams(old_stdout, old_stderr)
> -      raise
> -    else:
> -      if self.log:
> -        restore_streams(old_stdout, old_stderr)
> -      return rv
> +    prog = subprocess.Popen(arglist, stdout=self.log, stderr=self.log)
> +    prog.wait()
> +    return prog.returncode
> 
> 
>  def main():
> 



RE: svn commit: r954328 - /subversion/trunk/build/run_tests.py

Posted by Bert Huijben <be...@vmoo.com>.

> -----Original Message-----
> From: hwright@apache.org [mailto:hwright@apache.org]
> Sent: maandag 14 juni 2010 1:20
> To: commits@subversion.apache.org
> Subject: svn commit: r954328 - /subversion/trunk/build/run_tests.py
> 
> Author: hwright
> Date: Sun Jun 13 23:19:53 2010
> New Revision: 954328
> 
> URL: http://svn.apache.org/viewvc?rev=954328&view=rev
> Log:
> * build/run_tests.py
>   (_run_prog): Remove all the custom stdout/stderr redirect handling, in
> favor
>     of the subprocess module's built-in facilities.

For some reason I don't see any test output when running the tests now. (stdout doesn't show anything when starting the tests). The buildbots show the same effect: No streaming per test results on Windows.

And it is very hard to debug without output. (Looking at the process monitor and the log file shows that the tests just run fine).

	Bert


> 
> Modified:
>     subversion/trunk/build/run_tests.py
> 
> Modified: subversion/trunk/build/run_tests.py
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/build/run_tests.py?rev=95
> 4328&r1=954327&r2=954328&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/build/run_tests.py (original)
> +++ subversion/trunk/build/run_tests.py Sun Jun 13 23:19:53 2010
> @@ -323,31 +323,9 @@ class TestHarness:
>      '''Execute the file PROGNAME in a subprocess, with ARGLIST as its
>      arguments (a list/tuple of arg0..argN), redirecting standard output and
>      error to the log file. Return the command's exit code.'''
> -    def restore_streams(stdout, stderr):
> -      os.dup2(stdout, 1)
> -      os.dup2(stderr, 2)
> -      os.close(stdout)
> -      os.close(stderr)
> -
> -    if self.log:
> -      sys.stdout.flush()
> -      sys.stderr.flush()
> -      self.log.flush()
> -      old_stdout = os.dup(1)
> -      old_stderr = os.dup(2)
> -    try:
> -      if self.log:
> -        os.dup2(self.log.fileno(), 1)
> -        os.dup2(self.log.fileno(), 2)
> -      rv = subprocess.call(arglist)
> -    except:
> -      if self.log:
> -        restore_streams(old_stdout, old_stderr)
> -      raise
> -    else:
> -      if self.log:
> -        restore_streams(old_stdout, old_stderr)
> -      return rv
> +    prog = subprocess.Popen(arglist, stdout=self.log, stderr=self.log)
> +    prog.wait()
> +    return prog.returncode
> 
> 
>  def main():
>