mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
test: Check exit status in run_and_log_expect_exception()
This check was missed. Add it and make the message more verbose.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
Fixes: 9e17b034
(test/py: Provide a way to check that a command fails)
This commit is contained in:
parent
bcbd0c8fe1
commit
7f64b1874c
2 changed files with 5 additions and 1 deletions
|
@ -102,6 +102,7 @@ class RunAndLog(object):
|
|||
self.name = name
|
||||
self.chained_file = chained_file
|
||||
self.output = None
|
||||
self.exit_status = None
|
||||
|
||||
def close(self):
|
||||
"""Clean up any resources managed by this object."""
|
||||
|
@ -166,6 +167,7 @@ class RunAndLog(object):
|
|||
|
||||
# Store the output so it can be accessed if we raise an exception.
|
||||
self.output = output
|
||||
self.exit_status = exit_status
|
||||
if exception:
|
||||
raise exception
|
||||
return output
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue