summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-11-01 16:29:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-11-02 09:21:29 +0000
commit4a264f369547a0f151ec1a7cf7384241bf467f76 (patch)
treeff577b1f74a1a2f7f7346a88619d31e090a9be25 /meta/lib
parent0a97cbba10a708b6147c8d000c9ee2509ed5cc75 (diff)
downloadpoky-4a264f369547a0f151ec1a7cf7384241bf467f76.tar.gz
oeqa/target/ssh: add ignore_status argument to run()
The underlying _run() method has an ignore_status argument and can either return the exit code or raise an exception if it is non-zero. Add the same argument to the run() method so that test cases can change this value. It currently defaults to True as that is the existing behaviour, but a follow-up patch will change this to False as test cases should fail on errors unless told otherwise. (From OE-Core rev: e244228730178d15a066a1428956de328cc09671) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/core/target/ssh.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py
index f956a7744f..7a10ba9763 100644
--- a/meta/lib/oeqa/core/target/ssh.py
+++ b/meta/lib/oeqa/core/target/ssh.py
@@ -78,7 +78,7 @@ class OESSHTarget(OETarget):
78 78
79 return (status, output) 79 return (status, output)
80 80
81 def run(self, command, timeout=None): 81 def run(self, command, timeout=None, ignore_status=True):
82 """ 82 """
83 Runs command in target. 83 Runs command in target.
84 84
@@ -97,7 +97,7 @@ class OESSHTarget(OETarget):
97 else: 97 else:
98 processTimeout = self.timeout 98 processTimeout = self.timeout
99 99
100 status, output = self._run(sshCmd, processTimeout, True) 100 status, output = self._run(sshCmd, processTimeout, ignore_status)
101 self.logger.debug('Command: %s\nStatus: %d Output: %s\n' % (command, status, output)) 101 self.logger.debug('Command: %s\nStatus: %d Output: %s\n' % (command, status, output))
102 if (status == 255) and (('No route to host') in output): 102 if (status == 255) and (('No route to host') in output):
103 if self.monitor_dumper: 103 if self.monitor_dumper: