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:39 +0100 |
commit | b6b6a39ee840bbf2c78cb2196d8fbb6e231d1c48 (patch) | |
tree | 7a61f1e0a6c193af19bae94d589231bd8af8de36 /meta/lib/oeqa/core/target | |
parent | 1beb67e4dfeeeb7434de56b14a4ef6748ac3ce0b (diff) | |
download | poky-b6b6a39ee840bbf2c78cb2196d8fbb6e231d1c48.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.
(From OE-Core rev: 0f7d093038274f4f21f6cca39a96aac4f6c32ee3)
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): | |||
107 | scpCmd = self.scp + [localSrc, remotePath] | 107 | scpCmd = self.scp + [localSrc, remotePath] |
108 | return self._run(scpCmd, ignore_status=False) | 108 | return self._run(scpCmd, ignore_status=False) |
109 | 109 | ||
110 | def copyFrom(self, remoteSrc, localDst): | 110 | def copyFrom(self, remoteSrc, localDst, warn_on_failure=False): |
111 | """ | 111 | """ |
112 | Copy file from target. | 112 | Copy file from target. |
113 | """ | 113 | """ |
114 | remotePath = '%s@%s:%s' % (self.user, self.ip, remoteSrc) | 114 | remotePath = '%s@%s:%s' % (self.user, self.ip, remoteSrc) |
115 | scpCmd = self.scp + [remotePath, localDst] | 115 | scpCmd = self.scp + [remotePath, localDst] |
116 | return self._run(scpCmd, ignore_status=False) | 116 | (status, output) = self._run(scpCmd, ignore_status=warn_on_failure) |
117 | if warn_on_failure and status: | ||
118 | self.logger.warning("Copy returned non-zero exit status %d:\n%s" % (status, output)) | ||
119 | return (status, output) | ||
117 | 120 | ||
118 | def copyDirTo(self, localSrc, remoteDst): | 121 | def copyDirTo(self, localSrc, remoteDst): |
119 | """ | 122 | """ |