Remove mosys platform call from get_platform_name
Mosys is being deprecated. See attached bug for more info.
This CL removes a `mosys platform` call from the FAFT RPC server.
BUG=chromium:1023647
TEST=test_that firmware_FAFTRPC.system (and check logs)
Change-Id: Ibc8ca610ed84e559eb8ef60683b7b2cc1de525f9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2064599
Tested-by: Greg Edelston <gredelston@google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Greg Edelston <gredelston@google.com>
diff --git a/client/cros/faft/rpc_functions.py b/client/cros/faft/rpc_functions.py
index 07cba35..3b8a7d6 100644
--- a/client/cros/faft/rpc_functions.py
+++ b/client/cros/faft/rpc_functions.py
@@ -754,13 +754,12 @@
@return: A string of the platform name.
"""
- # 'mosys platform name' sometimes fails. Let's get the verbose output.
- lines = self._os_if.run_shell_command_get_output(
- '(mosys -vvv platform name 2>&1) || echo Failed')
- if lines[-1].strip() == 'Failed':
- raise Exception('Failed getting platform name: ' +
- '\n'.join(lines))
- return lines[-1]
+ platform = cros_config.call_cros_config_get_output(
+ '/identity platform-name',
+ self._os_if.run_shell_command_get_result)
+ if not platform:
+ raise Exception('Failed getting platform name from cros_config')
+ return platform
def get_model_name(self):
"""Get the model name of the current system.