summaryrefslogtreecommitdiff
path: root/test/py/u_boot_console_base.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2024-10-09 18:29:04 -0600
committerTom Rini <trini@konsulko.com>2024-10-15 10:24:27 -0600
commit9fa4be6598108136b927f612e9c3f05f2c983df0 (patch)
tree67da10a8c9f3c038013a4784c9de48edb177f780 /test/py/u_boot_console_base.py
parent85d7dae377ac172a5361bbb526b552db39c5ceca (diff)
test: Tidy up remaining exceptions
Use the new handle_exception() function from ConsoleBase also. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test/py/u_boot_console_base.py')
-rw-r--r--test/py/u_boot_console_base.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py
index 0be6c760206..aebe0dac099 100644
--- a/test/py/u_boot_console_base.py
+++ b/test/py/u_boot_console_base.py
@@ -14,7 +14,7 @@ import pytest
import re
import sys
import u_boot_spawn
-from u_boot_spawn import BootFail, Timeout, Unexpected
+from u_boot_spawn import BootFail, Timeout, Unexpected, handle_exception
# Regexes for text we expect U-Boot to send to the console.
pattern_u_boot_spl_signon = re.compile('(U-Boot SPL \\d{4}\\.\\d{2}[^\r\n]*\\))')
@@ -293,12 +293,12 @@ class ConsoleBase(object):
# indentation.
return self.p.before.strip('\r\n')
except Timeout as exc:
- self.log.error(str(exc))
- self.cleanup_spawn()
+ handle_exception(self.config, self, self.log, exc, 'Lab failure',
+ True)
raise
- except BootFail as ex:
- self.log.error(str(ex))
- self.cleanup_spawn()
+ except BootFail as exc:
+ handle_exception(self.config, self, self.log, exc, 'Boot fail',
+ True, self.get_spawn_output())
raise
finally:
self.log.timestamp()