summaryrefslogtreecommitdiff
path: root/test/py/u_boot_console_base.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-07-31 17:35:09 -0600
committerTom Rini <trini@konsulko.com>2016-08-05 20:55:23 -0400
commitf6d34651d8a21514abbfa32f44a0ec2014ef002b (patch)
tree5812373b7eda7dcc4e4fc4b5b76c83d7d8248f47 /test/py/u_boot_console_base.py
parent27c087d58ab703f15211629abfa4a47f19974b9e (diff)
downloadu-boot-imx-f6d34651d8a21514abbfa32f44a0ec2014ef002b.zip
u-boot-imx-f6d34651d8a21514abbfa32f44a0ec2014ef002b.tar.gz
u-boot-imx-f6d34651d8a21514abbfa32f44a0ec2014ef002b.tar.bz2
test: Adjust run_command_list() to return a list of strings
Return one string for each command that was executed. This seems cleaner. Suggested-by: Teddy Reed <teddy.reed@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'test/py/u_boot_console_base.py')
-rw-r--r--test/py/u_boot_console_base.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py
index b855b10..ee9b928 100644
--- a/test/py/u_boot_console_base.py
+++ b/test/py/u_boot_console_base.py
@@ -225,11 +225,12 @@ class ConsoleBase(object):
Args:
cmd: List of commands (each a string).
Returns:
- Combined output of all commands, as a string.
+ A list of output strings from each command, one element for each
+ command.
"""
- output = ''
+ output = []
for cmd in cmds:
- output += self.run_command(cmd)
+ output.append(self.run_command(cmd))
return output
def ctrlc(self):