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>
This commit is contained in:
Simon Glass 2016-07-31 17:35:09 -06:00 committed by Tom Rini
parent 27c087d58a
commit f6d34651d8
2 changed files with 5 additions and 4 deletions

View file

@ -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):