mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-29 22:24:51 +00:00 
			
		
		
		
	fw/target: add hostname to TargetInfo
Would especially be useful for Linux targets.
This commit is contained in:
		
				
					committed by
					
						 Marc Bonnici
						Marc Bonnici
					
				
			
			
				
	
			
			
			
						parent
						
							30eb98b275
						
					
				
				
					commit
					629abb1afc
				
			| @@ -173,6 +173,7 @@ def get_target_info(target): | ||||
|  | ||||
|     hostid_string = target.execute('{} hostid'.format(target.busybox)).strip() | ||||
|     info.hostid = int(hostid_string, 16) | ||||
|     info.hostname = target.execute('{} hostname'.format(target.busybox)).strip() | ||||
|  | ||||
|     for i, name in enumerate(target.cpuinfo.cpu_names): | ||||
|         cpu = CpuInfo() | ||||
| @@ -219,6 +220,7 @@ class TargetInfo(object): | ||||
|         instance.os = pod['os'] | ||||
|         instance.os_version = pod['os_version'] | ||||
|         instance.hostid = pod['hostid'] | ||||
|         instance.hostname = pod['hostname'] | ||||
|         instance.abi = pod['abi'] | ||||
|         instance.is_rooted = pod['is_rooted'] | ||||
|         instance.kernel_version = kernel_version_from_pod(pod) | ||||
| @@ -238,6 +240,7 @@ class TargetInfo(object): | ||||
|         self.os = None | ||||
|         self.os_version = None | ||||
|         self.hostid = None | ||||
|         self.hostname = None | ||||
|         self.abi = None | ||||
|         self.is_rooted = None | ||||
|         self.kernel_version = None | ||||
| @@ -252,6 +255,7 @@ class TargetInfo(object): | ||||
|         pod['os'] = self.os | ||||
|         pod['os_version'] = self.os_version | ||||
|         pod['hostid'] = self.hostid | ||||
|         pod['hostname'] = self.hostname | ||||
|         pod['abi'] = self.abi | ||||
|         pod['is_rooted'] = self.is_rooted | ||||
|         pod['kernel_release'] = self.kernel_version.release | ||||
|   | ||||
		Reference in New Issue
	
	Block a user