| 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 f8218bbe06b84bdaa46a06a4b0b5b1bc91b361eb..1e15a848cc75658294b62c3d4f54dbf0aabc70fc 100644
|
| --- a/client/site_tests/hardware_Components/hardware_Components.py
|
| +++ b/client/site_tests/hardware_Components/hardware_Components.py
|
| @@ -29,6 +29,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',
|
| @@ -211,6 +212,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
|
| @@ -225,6 +240,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 ...
|
| @@ -241,6 +257,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):
|
| @@ -436,7 +453,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
|
|
|
|
|
|
|