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

Unified Diff: client/site_tests/hardware_Components/hardware_Components.py

Issue 6658005: Add memory size check (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/autotest.git@0.11.241.B
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/hardware_Components/hardware_Components.py
diff --git a/client/site_tests/hardware_Components/hardware_Components.py b/client/site_tests/hardware_Components/hardware_Components.py
index 60172605f6040e74501f6dcee51a5bfdc622b2c2..9739694d7bc9a3eea5e7dbec969a371f06e2b378 100644
--- a/client/site_tests/hardware_Components/hardware_Components.py
+++ b/client/site_tests/hardware_Components/hardware_Components.py
@@ -32,6 +32,7 @@ class hardware_Components(test.test):
'part_id_audio_codec',
'part_id_cpu',
'part_id_display_panel',
+ 'part_id_dram',
'part_id_embedded_controller',
'part_id_ethernet',
'part_id_flash_chip',
@@ -214,6 +215,20 @@ class hardware_Components(test.test):
return self._not_present
+ def get_part_id_dram(self):
+ grep_cmd = 'grep i2c_dev /proc/modules'
+ i2c_loaded = (utils.system(grep_cmd, ignore_status=True) == 0)
+ if not i2c_loaded:
+ utils.system('modprobe -r i2c_dev')
Hung-Te 2011/03/21 03:43:40 hold on - this will remove i2c_dev. "if i2c is no
+ cmd = ('mosys -l memory spd print geometry | '
+ 'grep size_mb | cut -f2 -d"|"')
+ part_id = utils.system_output(cmd).strip()
+ if part_id != '':
+ return part_id
+ else:
+ return self._not_present
+
+
def get_part_id_flash_chip(self):
# example output:
# Found chip "Winbond W25x16" (2048 KB, FWH) at physical address 0xfe
@@ -228,6 +243,7 @@ class hardware_Components(test.test):
part_id = ", ".join(parts)
return part_id
+
def get_part_id_ec_flash_chip(self):
# example output:
# Found chip "Winbond W25x10" (128 KB, SPI) at physical address ...
@@ -244,6 +260,7 @@ class hardware_Components(test.test):
part_id = ", ".join(parts)
return part_id
+
def get_part_id_hwqual(self):
hwid_file = '/sys/devices/platform/chromeos_acpi/HWID'
if os.path.exists(hwid_file):
@@ -439,7 +456,10 @@ class hardware_Components(test.test):
for group in self._to_be_tested_cids_groups + [ self._not_test_cids ]:
for cid in group:
if cid not in approved:
- raise error.TestFail('%s missing from database' % cid)
+ # If we don't have any listing for this type
+ # of part in HWID, it's not required.
+ factory.log('Bypassing unlisted cid %s' % cid)
+ approved[cid] = '*'
return approved
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698