diff options
author | Steven Knight <knight@baldmt.com> | 2010-06-10 08:19:53 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-06-10 08:19:53 (GMT) |
commit | 1dc992070b764deba45742ca3325938c6162e995 (patch) | |
tree | b411e36b1daa61aa76395d4d11153fe6a4b693c6 /QMTest/TestSCons.py | |
parent | b9bf799d4ee594f37b3a404a4e18dbee3fe56533 (diff) | |
download | SCons-1dc992070b764deba45742ca3325938c6162e995.zip SCons-1dc992070b764deba45742ca3325938c6162e995.tar.gz SCons-1dc992070b764deba45742ca3325938c6162e995.tar.bz2 |
Increase the default timeout of TestSCons.wait_for() to 20.0 seconds.
(--interactive mode on our Solaris buildbot slave takes longer than
10 seconds to create the necessary marker files.)
Set the stdin attribute on our popen object to None after we close it,
so some versions of subprocess.py don't try to write it after it's closed.
If we time out waiting for a marker file to be created, then print any
stdout or stderr that's already accumulated, since that may give clues
about why the test failed.
Diffstat (limited to 'QMTest/TestSCons.py')
-rw-r--r-- | QMTest/TestSCons.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/QMTest/TestSCons.py b/QMTest/TestSCons.py index 5f2b958..9269678 100644 --- a/QMTest/TestSCons.py +++ b/QMTest/TestSCons.py @@ -1062,7 +1062,7 @@ print py_ver restore_sconsflags(sconsflags) return p - def wait_for(self, fname, timeout=10.0, popen=None): + def wait_for(self, fname, timeout=20.0, popen=None): """ Waits for the specified file name to exist. """ @@ -1072,8 +1072,17 @@ print py_ver sys.stderr.write('timed out waiting for %s to exist\n' % fname) if popen: popen.stdin.close() + popen.stdin = None self.status = 1 self.finish(popen) + stdout = self.stdout() + if stdout: + sys.stdout.write(self.banner('STDOUT ') + '\n') + sys.stdout.write(stdout) + stderr = self.stderr() + if stderr: + sys.stderr.write(self.banner('STDERR ') + '\n') + sys.stderr.write(stderr) self.fail_test() time.sleep(1.0) waited = waited + 1.0 |