Get the platform name using mosys instead of the firmware ID.
Using mosys is more reliable than the firmware ID. A typo is also fixed.
BUG=chromium-os:19710
TEST=tested on Alex/ZGB and non-Alex/ZGB devices
$ run_remote_tests.sh --remote=$REMOTE_IP -a "xml_config=$OVERLAY_XML \
servo_vid=0x18d1 servo_pid=0x5001" DevMode/control
$ run_remote_tests.sh --remote=$REMOTE_IP -a "xml_config=$OVERLAY_XML \
servo_vid=0x18d1 servo_pid=0x5001" DevTriggerRecovery/control
$ run_remote_tests.sh --remote=$REMOTE_IP -a "xml_config=$OVERLAY_XML \
servo_vid=0x18d1 servo_pid=0x5001" CorruptBothKernelAB/control.normal
$ run_remote_tests.sh --remote=$REMOTE_IP -a "xml_config=$OVERLAY_XML \
servo_vid=0x18d1 servo_pid=0x5001" DevFwNormalBoot/control
Change-Id: Ic42c7666e70691956dee122894bd5080bc96219a
Reviewed-on: https://gerrit.chromium.org/gerrit/12897
Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
diff --git a/client/cros/faft_client.py b/client/cros/faft_client.py
index 6ffb27c..7d0c2cc 100644
--- a/client/cros/faft_client.py
+++ b/client/cros/faft_client.py
@@ -131,6 +131,17 @@
self._chromeos_interface.run_shell_command('reboot')
+ def get_platform_name(self):
+ """Get the platform name of the current system.
+
+ Returns:
+ A string of the platform name.
+ """
+ self._chromeos_interface.log('Requesting get platform name')
+ return self._chromeos_interface.run_shell_command_get_output(
+ 'mosys platform name')[0]
+
+
def get_crossystem_value(self, key):
"""Get crossystem value of the requested key.