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

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..b46ec214c473b5734cd37cd3ab83f023548be737 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')
+ 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
@@ -252,7 +267,6 @@ class hardware_Components(test.test):
else:
return self._not_present
Tammo Spalink 2011/03/11 07:59:58 and keeping this :)
Nick Sanders 2011/03/11 09:40:57 Done.
-
def get_part_id_storage(self):
cmd = ('cd $(find /sys/devices -name sda)/../..; '
'cat vendor model | tr "\n" " " | sed "s/ \+/ /g"')
@@ -309,6 +323,7 @@ class hardware_Components(test.test):
model = re.sub(' on [^ ]* [Pp]ort$', '', model)
# Format: Model #FirmwareId
part_id = '%s #%s' % (model, firmware_id)
+
Tammo Spalink 2011/03/11 07:59:58 did you mean to add this?
Nick Sanders 2011/03/11 09:40:57 Done.
return part_id
@@ -439,7 +454,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,
Tammo Spalink 2011/03/11 07:59:58 exceeded 80 cols here
Nick Sanders 2011/03/11 09:40:57 Done.
+ # 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