Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(505)

Side by Side Diff: client/site_tests/hardware_Components/hardware_Components.py

Issue 6685093: Use keyboard_layout instead of initial_locale (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « client/site_tests/factory_SelectKeyboard/factory_SelectKeyboard.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import firmware_hash 5 import firmware_hash
6 import glob 6 import glob
7 import logging 7 import logging
8 import os 8 import os
9 import pprint 9 import pprint
10 import re 10 import re
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 def get_part_id_hwqual(self): 262 def get_part_id_hwqual(self):
263 hwid_file = '/sys/devices/platform/chromeos_acpi/HWID' 263 hwid_file = '/sys/devices/platform/chromeos_acpi/HWID'
264 if os.path.exists(hwid_file): 264 if os.path.exists(hwid_file):
265 part_id = utils.read_one_line(hwid_file) 265 part_id = utils.read_one_line(hwid_file)
266 return part_id 266 return part_id
267 else: 267 else:
268 return self._not_present 268 return self._not_present
269 269
270 def get_part_id_keyboard(self): 270 def get_part_id_keyboard(self):
271 # VPD value "initial_locale"="en-US" should be listed. 271 # VPD value "initial_locale"="en-US" should be listed.
272 cmd = 'vpd -l | grep initial_locale | cut -f4 -d\'"\' ' 272 cmd = 'vpd -i RO_VPD -l | grep \"keyboard_layout\" | cut -f4 -d\'"\' '
273 part_id = utils.system_output(cmd).strip() 273 part_id = utils.system_output(cmd).strip()
274 if part_id != '': 274 if part_id != '':
275 return part_id 275 return part_id
276 else: 276 else:
277 return self._not_present 277 return self._not_present
278 278
279 def get_part_id_storage(self): 279 def get_part_id_storage(self):
280 cmd = ('cd $(find /sys/devices -name sda)/../..; ' 280 cmd = ('cd $(find /sys/devices -name sda)/../..; '
281 'cat vendor model | tr "\n" " " | sed "s/ \+/ /g"') 281 'cat vendor model | tr "\n" " " | sed "s/ \+/ /g"')
282 part_id = utils.system_output(cmd).strip() 282 part_id = utils.system_output(cmd).strip()
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 # hardware_Components may run without factory environment 552 # hardware_Components may run without factory environment
553 factory.log('Failed setting shared data, ignored: %s' % 553 factory.log('Failed setting shared data, ignored: %s' %
554 repr(e)) 554 repr(e))
555 return 555 return
556 556
557 if only_cardreader_failed: 557 if only_cardreader_failed:
558 all_failures = ('You may forget to insert an SD card.\n' + 558 all_failures = ('You may forget to insert an SD card.\n' +
559 all_failures) 559 all_failures)
560 560
561 raise error.TestFail(all_failures) 561 raise error.TestFail(all_failures)
OLDNEW
« no previous file with comments | « client/site_tests/factory_SelectKeyboard/factory_SelectKeyboard.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698