Merge git://git.denx.de/u-boot-dm
[oweals/u-boot.git] / test / py / u_boot_console_base.py
index 3d2ac448757d59906135ab7e644eacd7f8801be4..4606ad48bf5d49d7c90c2ade5418347f08b577bf 100644 (file)
@@ -216,6 +216,22 @@ class ConsoleBase(object):
             self.cleanup_spawn()
             raise
 
+    def run_command_list(self, cmds):
+        """Run a list of commands.
+
+        This is a helper function to call run_command() with default arguments
+        for each command in a list.
+
+        Args:
+            cmd: List of commands (each a string)
+        Returns:
+            Combined output of all commands, as a string
+        """
+        output = ''
+        for cmd in cmds:
+            output += self.run_command(cmd)
+        return output
+
     def ctrlc(self):
         """Send a CTRL-C character to U-Boot.