mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 10:11:17 +00:00
framework/execution: Treat reboot as part of job allowing retires
Treat the optional reboot of the device as part of the job itself so that if the reboot fails it will be retried in accordance to the job configuration.
This commit is contained in:
parent
4a427f830b
commit
8654fcfc30
@ -467,15 +467,15 @@ class Runner(object):
|
||||
signal.disconnect(self._warning_signalled_callback, signal.WARNING_LOGGED)
|
||||
|
||||
def run_next_job(self, context):
|
||||
if self.config.run_config.reboot_policy.reboot_on_each_job:
|
||||
self.logger.debug('Rebooting on new job.')
|
||||
self.context.tm.target.reboot()
|
||||
|
||||
job = context.start_job()
|
||||
self.logger.info('Running job {}'.format(job.id))
|
||||
|
||||
try:
|
||||
log.indent()
|
||||
if self.context.reboot_policy.reboot_on_each_job:
|
||||
self.logger.info('Rebooting on new job.')
|
||||
self.context.tm.target.reboot()
|
||||
|
||||
context.tm.start()
|
||||
self.do_run_job(job, context)
|
||||
job.set_status(Status.OK)
|
||||
|
Loading…
x
Reference in New Issue
Block a user