diff options
-rw-r--r-- | crosperf/machine_manager.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/crosperf/machine_manager.py b/crosperf/machine_manager.py index ea3f17d7..957c8304 100644 --- a/crosperf/machine_manager.py +++ b/crosperf/machine_manager.py @@ -132,8 +132,19 @@ class CrosMachine(object): machine=self.name, chromeos_root=self.chromeos_root) b = if_out.splitlines() a = [l for l in b if "Product" in l] - self.machine_id = a[0] - assert ret == 0, "Could not get machine_id from machine: %s" % self.name + if len(a): + self.machine_id = a[0] + return + command = "ifconfig" + ret, if_out, _ = ce.CrosRunCommand( + command, return_output=True, + machine=self.name, chromeos_root=self.chromeos_root) + b = if_out.splitlines() + a = [l for l in b if "HWaddr" in l] + if len(a): + self.machine_id = "_".join(a) + return + assert 0, "Could not get machine_id from machine: %s" % self.name def __str__(self): l = [] |