lib/oeqa: sshcontrol: fix false timeout failures

Ocasionally AB shows odd false fails like:
http://autobuilder.yoctoproject.org/main/builders/nightly-arm/builds/1/steps/Running%20Sanity%20Tests/logs/stdio
This should fix that by checking for eof instead of
polling the return code of the ssh process, because the process
might still be there.

(From OE-Core rev: 3a22b5df5aa38a98b35bc2931d646a2b7702fbec)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Stefan Stanacar 2014-01-17 17:57:47 +02:00 committed by Richard Purdie
parent a29d2708e7
commit e9fae95f30
1 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ class SSHControl(object):
endtime = time.time() + tdelta
# process hasn't returned yet
if sshconn.poll() is None:
if not eof:
sshconn.terminate()
time.sleep(3)
try:
@ -86,7 +86,7 @@ class SSHControl(object):
pass
output += "\n[!!! SSH command killed - no output for %d seconds. Total running time: %d seconds." % (tdelta, time.time() - self._starttime)
self._ret = sshconn.poll()
self._ret = sshconn.wait()
# strip the last LF so we can test the output
self._out = output.rstrip()
self.log("%s" % self._out)