From c7f636f59d7d506b89d7fc52aa6509329e9ded1b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 4 Jul 2016 11:58:38 -0600 Subject: test/py: Note which console produced unexpected output At present the SPL and U-Boot consoles both present the same error message when the expected console output does not appear. Add "SPL" to the SPL error message to resolve this ambiguity. Signed-off-by: Simon Glass --- test/py/u_boot_console_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/py/u_boot_console_base.py') diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py index 815fa64d5ff..2dcb2894f96 100644 --- a/test/py/u_boot_console_base.py +++ b/test/py/u_boot_console_base.py @@ -329,7 +329,7 @@ class ConsoleBase(object): m = self.p.expect([pattern_u_boot_spl_signon] + self.bad_patterns) if m != 0: - raise Exception('Bad pattern found on console: ' + + raise Exception('Bad pattern found on SPL console: ' + self.bad_pattern_ids[m - 1]) m = self.p.expect([pattern_u_boot_main_signon] + self.bad_patterns) if m != 0: -- cgit v1.2.3 From ebec58fbcb6da7404b535b9d860546d9baef55c2 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 4 Jul 2016 11:58:39 -0600 Subject: test/py: Provide a way to get early console output Some tests want to check the console output from SPL or U-Boot proper. Provide a means to do this. Signed-off-by: Simon Glass --- test/py/u_boot_console_base.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/py/u_boot_console_base.py') diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py index 2dcb2894f96..3d2ac448757 100644 --- a/test/py/u_boot_console_base.py +++ b/test/py/u_boot_console_base.py @@ -377,6 +377,16 @@ class ConsoleBase(object): pass self.p = None + def get_spawn_output(self): + """Return the start-up output from U-Boot + + Returns: + The output produced by ensure_spawed(), as a string. + """ + if self.p: + return self.p.get_expect_output() + return None + def validate_version_string_in_text(self, text): """Assert that a command's output includes the U-Boot signon message. -- cgit v1.2.3