From 8654fcfc3093d6dec8be4603ee9c1061adfa6ebe Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 24 May 2018 13:55:44 +0100 Subject: [PATCH] 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. --- wa/framework/execution.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wa/framework/execution.py b/wa/framework/execution.py index 9ae14fcb..79dd7551 100644 --- a/wa/framework/execution.py +++ b/wa/framework/execution.py @@ -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)