diff options
author | Mikko Rapeli <mikko.rapeli@linaro.org> | 2023-02-09 10:09:29 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-10 09:25:44 +0000 |
commit | 487cb16119543558a3619b11faf5516ab6dfa2f6 (patch) | |
tree | 947ad4e9d5660005c506da9df2525687eb1f5be9 | |
parent | 863d2bcf0ee3dfaafb9e69628122f98d3c6c9f1a (diff) | |
download | poky-487cb16119543558a3619b11faf5516ab6dfa2f6.tar.gz |
oeqa ssh.py: move output prints to new line
The output from is garbled otherwise and it's not
easy to remove debug output form real command output on target.
(From OE-Core rev: 917a70cbc43ac1c70c477b220c4115735457ef04)
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/core/target/ssh.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/core/target/ssh.py b/meta/lib/oeqa/core/target/ssh.py index 7a10ba9763..13fd5b2a49 100644 --- a/meta/lib/oeqa/core/target/ssh.py +++ b/meta/lib/oeqa/core/target/ssh.py | |||
@@ -240,7 +240,7 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
240 | eof = True | 240 | eof = True |
241 | else: | 241 | else: |
242 | output += data | 242 | output += data |
243 | logger.debug('Partial data from SSH call: %s' % data) | 243 | logger.debug('Partial data from SSH call:\n%s' % data) |
244 | endtime = time.time() + timeout | 244 | endtime = time.time() + timeout |
245 | except InterruptedError: | 245 | except InterruptedError: |
246 | continue | 246 | continue |
@@ -256,12 +256,12 @@ def SSHCall(command, logger, timeout=None, **opts): | |||
256 | endtime = time.time() - starttime | 256 | endtime = time.time() - starttime |
257 | lastline = ("\nProcess killed - no output for %d seconds. Total" | 257 | lastline = ("\nProcess killed - no output for %d seconds. Total" |
258 | " running time: %d seconds." % (timeout, endtime)) | 258 | " running time: %d seconds." % (timeout, endtime)) |
259 | logger.debug('Received data from SSH call %s ' % lastline) | 259 | logger.debug('Received data from SSH call:\n%s ' % lastline) |
260 | output += lastline | 260 | output += lastline |
261 | 261 | ||
262 | else: | 262 | else: |
263 | output = process.communicate()[0].decode('utf-8', errors='ignore') | 263 | output = process.communicate()[0].decode('utf-8', errors='ignore') |
264 | logger.debug('Data from SSH call: %s' % output.rstrip()) | 264 | logger.debug('Data from SSH call:\n%s' % output.rstrip()) |
265 | 265 | ||
266 | options = { | 266 | options = { |
267 | "stdout": subprocess.PIPE, | 267 | "stdout": subprocess.PIPE, |