diff options
author | Matthew <matthew.zeng@windriver.com> | 2020-08-05 14:51:33 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-06 15:12:34 +0100 |
commit | 0f7d093038274f4f21f6cca39a96aac4f6c32ee3 (patch) | |
tree | f479166e942b1df2a6c1e04ccec0b6f401ffa32a /meta/lib/oeqa/core/target | |
parent | 6d4bfd341eb48e6904cb5b645727cbf351f02a2e (diff) | |
download | openembedded-core-0f7d093038274f4f21f6cca39a96aac4f6c32ee3.tar.gz |
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.
Signed-off-by: Mingde (Matthew) Zeng <matthew.zeng@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core/target')
-rw-r--r-- | meta/lib/oeqa/core/target/ssh.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index 090b40a814..aefb576805 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py @@ -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): """ |