mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 07:04:17 +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:
		| @@ -332,7 +332,19 @@ class Executor(object): | |||||||
|                                        output.basepath) |                                        output.basepath) | ||||||
|  |  | ||||||
|         if config_manager.run_config.reboot_policy.perform_initial_reboot: |         if config_manager.run_config.reboot_policy.perform_initial_reboot: | ||||||
|  |             self.logger.info('Performing inital reboot.') | ||||||
|  |             attempts = config_manager.run_config.max_retries | ||||||
|  |             while attempts: | ||||||
|  |                 try: | ||||||
|                     self.target_manager.target.reboot() |                     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()) |         output.set_target_info(self.target_manager.get_target_info()) | ||||||
|  |  | ||||||
|         self.logger.info('Initializing execution context') |         self.logger.info('Initializing execution context') | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user