From c8ea525a00afe1911d68c027090ffeb34930855a Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Wed, 7 Apr 2021 17:36:12 +0100 Subject: [PATCH] fw/target/info: Utilise target properties Use hostname and hostid target properties instead of existing calls. --- wa/framework/target/info.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wa/framework/target/info.py b/wa/framework/target/info.py index a40d6a76..a7a8dd15 100644 --- a/wa/framework/target/info.py +++ b/wa/framework/target/info.py @@ -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