mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 09:02:12 +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)
 | 
			
		||||
 | 
			
		||||
        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')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user