mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-29 22:24:51 +00:00 
			
		
		
		
	LocalLinuxManager: Added a local linux manager
This allows WA to automate the machine it is running on.
This commit is contained in:
		
							
								
								
									
										30
									
								
								wlauto/managers/locallinux.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								wlauto/managers/locallinux.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| from wlauto.core.device_manager import DeviceManager | ||||
| from wlauto import Parameter | ||||
|  | ||||
| from devlib.target import LocalLinuxTarget | ||||
|  | ||||
|  | ||||
| class LocalLinuxManager(DeviceManager): | ||||
|  | ||||
|     name = "local_linux" | ||||
|     target_type = LocalLinuxTarget | ||||
|  | ||||
|     parameters = [ | ||||
|         Parameter('password', | ||||
|                   description='Password for the user.'), | ||||
|     ] | ||||
|  | ||||
|     def __init__(self, **kwargs): | ||||
|         super(LocalLinuxManager, self).__init__(**kwargs) | ||||
|         self.platform = self.platform_type(core_names=self.core_names,  # pylint: disable=E1102 | ||||
|                                            core_clusters=self.core_clusters, | ||||
|                                            modules=self.modules) | ||||
|         self.target = self.target_type(connection_settings=self._make_connection_settings()) | ||||
|  | ||||
|     def connect(self): | ||||
|         self.target.connect() | ||||
|  | ||||
|     def _make_connection_settings(self): | ||||
|         connection_settings = {} | ||||
|         connection_settings['password'] = self.password | ||||
|         return connection_settings | ||||
		Reference in New Issue
	
	Block a user