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