]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
oeqa/ssh: allow to retrieve raw, unformatted ouput
authorAlexis Lothoré <alexis.lothore@bootlin.com>
Fri, 5 Jul 2024 14:46:37 +0000 (16:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 8 Jul 2024 08:16:26 +0000 (09:16 +0100)
commit8d05dc6e2284b7ed7c32a8215b9c8bf6f7dabf00
tree9332fc6ee298f234c7b373b5dadbfb074cebbc81
parent4ab0d5c24b32a80432d9cfa6c904027b8a6710b5
oeqa/ssh: allow to retrieve raw, unformatted ouput

The ssh target is currently well tailored to easily retrieve textual output
from a command run on a remote target. It could also be used to retrieve
raw data from a command run onto a remote target (for example, to feed this
data directly to another program), but it currently suffers two minor
issues preventing such use case:
- stderr is piped to stdout, so any error log will be mixed in the program
  output
- the final output is decoded as utf-8 and stripped

Allow to return the raw, unmodified output by adding an optional "raw"
parameter. Keep it to False by default to preserve the current behavior.
When enabled, do not return a string but the raw output as bytes.

Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/core/target/ssh.py