[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

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

From: Bert Huijben <bert_at_vmoo.com>
Date: Mon, 14 Jun 2010 02:36:01 +0200

> -----Original Message-----
> From: hwright_at_apache.org [mailto:hwright_at_apache.org]
> Sent: maandag 14 juni 2010 1:20
> To: commits_at_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():
>
Received on 2010-06-14 02:36:49 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.