[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.z...@windriver.com>
---
 meta/lib/oeqa/core/target/ssh.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index 090b40a814..1b78e830d4 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -61,9 +61,12 @@ class OESSHTarget(OETarget):
         self.logger.debug("[Command returned '%d' after %.2f seconds]"
                  "" % (status, time.time() - starttime))
 
-        if status and not ignore_status:
-            raise AssertionError("Command '%s' returned non-zero exit "
-                                 "status %d:\n%s" % (command, status, output))
+        if status:
+            if not ignore_status:
+                raise AssertionError("Command '%s' returned non-zero exit "
+                                     "status %d:\n%s" % (command, status, 
output))
+            else:
+                self.logger.warning("Command '%s' returned non-zero exit 
status %d:\n%s" % (command, status, output))
 
         return (status, output)
 
@@ -113,7 +116,7 @@ class OESSHTarget(OETarget):
         """
         remotePath = '%s@%s:%s' % (self.user, self.ip, remoteSrc)
         scpCmd = self.scp + [remotePath, localDst]
-        return self._run(scpCmd, ignore_status=False)
+        return self._run(scpCmd, ignore_status=True)
 
     def copyDirTo(self, localSrc, remoteDst):
         """
-- 
2.27.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#141230): 
https://lists.openembedded.org/g/openembedded-core/message/141230
Mute This Topic: https://lists.openembedded.org/mt/76010223/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to