]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
test/py: Return output from run_and_log()
authorSimon Glass <sjg@chromium.org>
Sun, 3 Jul 2016 15:40:39 +0000 (09:40 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 14 Jul 2016 22:22:34 +0000 (18:22 -0400)
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>
test/py/u_boot_utils.py

index e4765e38c1474bf5122423683d92f2cbfeb5b738..99bad7c0e4016fc066e4eb50c5bdf12159a7d589 100644 (file)
@@ -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):