1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-18 12:06:08 +00:00

fw/target/info: Utilise target properties

Use hostname and hostid target properties instead
of existing calls.
This commit is contained in:
Marc Bonnici 2021-04-07 17:36:12 +01:00
parent c4c0230958
commit c8ea525a00

View File

@ -230,16 +230,15 @@ def get_target_info(target):
info.is_rooted = target.is_rooted
info.kernel_version = target.kernel_version
info.kernel_config = target.config
info.hostname = target.hostname
info.hostid = target.hostid
try:
info.sched_features = target.read_value('/sys/kernel/debug/sched_features').split()
except TargetError:
# best effort -- debugfs might not be mounted
pass
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()
cpu.id = i