mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
ltp: make copyFrom scp command non-fatal
[YOCTO #13802] Make the scp failure non-fatal so the ltp tests continue to run and the rest of the logs will be available to see afterwards. (From OE-Core rev: 0f7d093038274f4f21f6cca39a96aac4f6c32ee3) Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -107,13 +107,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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user