mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 20:09:11 +00:00
fw/execution: record UI state on error
Record UI state if an error occurs during setup, run, and output processing stages (for other stages, the UI state is unlikely to be relevant as they typically would not include UI manipulation).
This commit is contained in:
parent
e93199a0a0
commit
f3bb8e135a
@ -500,8 +500,16 @@ class Runner(object):
|
||||
with signal.wrap('JOB_TARGET_CONFIG', self, context):
|
||||
job.configure_target(context)
|
||||
|
||||
with signal.wrap('JOB_SETUP', self, context):
|
||||
job.setup(context)
|
||||
try:
|
||||
with signal.wrap('JOB_SETUP', self, context):
|
||||
job.setup(context)
|
||||
except Exception as e:
|
||||
job.set_status(Status.FAILED)
|
||||
log.log_error(e, self.logger)
|
||||
if isinstance(e, TargetError) or isinstance(e, TimeoutError):
|
||||
context.tm.verify_target_responsive()
|
||||
self.context.record_ui_state('setup-error')
|
||||
raise e
|
||||
|
||||
try:
|
||||
|
||||
@ -517,6 +525,7 @@ class Runner(object):
|
||||
log.log_error(e, self.logger)
|
||||
if isinstance(e, TargetError) or isinstance(e, TimeoutError):
|
||||
context.tm.verify_target_responsive()
|
||||
self.context.record_ui_state('run-error')
|
||||
raise e
|
||||
finally:
|
||||
try:
|
||||
@ -528,6 +537,7 @@ class Runner(object):
|
||||
job.set_status(Status.PARTIAL)
|
||||
if isinstance(e, TargetError) or isinstance(e, TimeoutError):
|
||||
context.tm.verify_target_responsive()
|
||||
self.context.record_ui_state('output-error')
|
||||
raise
|
||||
|
||||
except KeyboardInterrupt:
|
||||
|
Loading…
x
Reference in New Issue
Block a user