mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-02-20 11:58:55 +00:00
framework/execution: Allow for retrying the intial reboot
If the device is to perform an initial reboot, allow up to `max_retries` from the run configuration for the reboot to succeed and add logging to inform the user.
This commit is contained in:
parent
8654fcfc30
commit
d6e9e503fa
@ -332,7 +332,19 @@ class Executor(object):
|
||||
output.basepath)
|
||||
|
||||
if config_manager.run_config.reboot_policy.perform_initial_reboot:
|
||||
self.target_manager.target.reboot()
|
||||
self.logger.info('Performing inital reboot.')
|
||||
attempts = config_manager.run_config.max_retries
|
||||
while attempts:
|
||||
try:
|
||||
self.target_manager.target.reboot()
|
||||
except TargetError as e:
|
||||
if attempts:
|
||||
attempts -= 1
|
||||
else:
|
||||
raise e
|
||||
else:
|
||||
break
|
||||
|
||||
output.set_target_info(self.target_manager.get_target_info())
|
||||
|
||||
self.logger.info('Initializing execution context')
|
||||
|
Loading…
x
Reference in New Issue
Block a user