summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oeqa/core/target/ssh.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oeqa/core/target/ssh.py')
-rw-r--r--poky/meta/lib/oeqa/core/target/ssh.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/poky/meta/lib/oeqa/core/target/ssh.py b/poky/meta/lib/oeqa/core/target/ssh.py
index 090b40a81..461448dbc 100644
--- a/poky/meta/lib/oeqa/core/target/ssh.py
+++ b/poky/meta/lib/oeqa/core/target/ssh.py
@@ -88,6 +88,8 @@ class OESSHTarget(OETarget):
status, output = self._run(sshCmd, processTimeout, True)
self.logger.debug('Command: %s\nOutput: %s\n' % (command, output))
+ if (status == 255) and (('No route to host') in output):
+ self.target_dumper.dump_target()
return (status, output)
def copyTo(self, localSrc, remoteDst):
@@ -107,13 +109,16 @@ class OESSHTarget(OETarget):
scpCmd = self.scp + [localSrc, remotePath]
return self._run(scpCmd, ignore_status=False)
- def copyFrom(self, remoteSrc, localDst):
+ def copyFrom(self, remoteSrc, localDst, warn_on_failure=False):
"""
Copy file from target.
"""
remotePath = '%s@%s:%s' % (self.user, self.ip, remoteSrc)
scpCmd = self.scp + [remotePath, localDst]
- return self._run(scpCmd, ignore_status=False)
+ (status, output) = self._run(scpCmd, ignore_status=warn_on_failure)
+ if warn_on_failure and status:
+ self.logger.warning("Copy returned non-zero exit status %d:\n%s" % (status, output))
+ return (status, output)
def copyDirTo(self, localSrc, remoteDst):
"""