summaryrefslogtreecommitdiff
path: root/meta/lib
diff options
context:
space:
mode:
authorStefan Stanacar <stefanx.stanacar@intel.com>2013-07-24 11:43:18 +0300
committerSaul Wold <sgw@linux.intel.com>2013-08-01 21:57:52 -0700
commit652a1762c8adc3b8cb1c6db2ee4a5234a7436c8d (patch)
tree96215c28d7c97135548fb7200023f6c5254bf855 /meta/lib
parentf192c444c2d88c49738bea4ff4c3af0cc72916de (diff)
downloadopenembedded-core-652a1762c8adc3b8cb1c6db2ee4a5234a7436c8d.tar.gz
openembedded-core-652a1762c8adc3b8cb1c6db2ee4a5234a7436c8d.tar.bz2
openembedded-core-652a1762c8adc3b8cb1c6db2ee4a5234a7436c8d.zip
oeqa/utils/sshcontrol: increase and log timeout in output
Increase a bit the timeout for ssh commands and also write in the output that the command timed out (it's easier to see that in a test fail than checking the ssh log) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/utils/sshcontrol.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 8f98c45354..7de7c3eddd 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -13,7 +13,7 @@ import os
class SSHControl(object):
- def __init__(self, host=None, timeout=200, logfile=None):
+ def __init__(self, host=None, timeout=300, logfile=None):
self.host = host
self.timeout = timeout
self._out = ''
@@ -52,9 +52,10 @@ class SSHControl(object):
self._ret = sshconn.poll()
else:
if timeout is None:
- endtime = time.time() + self.timeout
+ tdelta = self.timeout
else:
- endtime = time.time() + timeout
+ tdelta = timeout
+ endtime = time.time() + tdelta
while sshconn.poll() is None and time.time() < endtime:
time.sleep(1)
# process hasn't returned yet
@@ -64,7 +65,8 @@ class SSHControl(object):
sshconn.kill()
self._out = sshconn.stdout.read()
sshconn.stdout.close()
- self.log("[!!! process killed]")
+ self._out += "\n[!!! SSH command timed out after %d seconds and it was killed]" % tdelta
+ self.log("[!!! SSH command timed out after %d seconds and it was killed]" % tdelta)
else:
self._out = sshconn.stdout.read()
self._ret = sshconn.poll()