summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-03 09:40:39 -0600
committerTom Rini <trini@konsulko.com>2016-07-14 18:22:34 -0400
commitf3d3e95ce5d26777a6a138635f9bb12ca7ccf6fa (patch)
treee0a37dcf0dc49ea5d66448d42b9c017f54f52c2b /test
parent86845bf38dbba5fa7499db10ac5ee20f72d3f240 (diff)
downloadu-boot-f3d3e95ce5d26777a6a138635f9bb12ca7ccf6fa.tar.gz
test/py: Return output from run_and_log()
It is useful to be able to obtain the output from a command. Return it from this function. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Teddy Reed <teddy.reed@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/py/u_boot_utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py
index e4765e38c1..99bad7c0e4 100644
--- a/test/py/u_boot_utils.py
+++ b/test/py/u_boot_utils.py
@@ -165,12 +165,13 @@ def run_and_log(u_boot_console, cmd, ignore_errors=False):
problems occur.
Returns:
- Nothing.
+ The output as a string.
"""
runner = u_boot_console.log.get_runner(cmd[0], sys.stdout)
- runner.run(cmd, ignore_errors=ignore_errors)
+ output = runner.run(cmd, ignore_errors=ignore_errors)
runner.close()
+ return output
ram_base = None
def find_ram_base(u_boot_console):