Chromium Code Reviews| 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 |