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

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

Issue 3382002: Make data_display_geometry as a check item in hardware component test. (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 3 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 0962d8b6723bdfc3b6013c3843b727077fc14a82..20cbd2f563c965f1b2747a0a9a6dccbe5d36c162 100644
--- a/client/site_tests/hardware_Components/hardware_Components.py
+++ b/client/site_tests/hardware_Components/hardware_Components.py
@@ -14,6 +14,7 @@ from autotest_lib.client.common_lib import site_vblock
class hardware_Components(test.test):
version = 1
_cids = [
+ 'data_display_geometry',
'hash_ro_firmware',
'part_id_audio_codec',
'part_id_cpu',
@@ -46,17 +47,18 @@ class hardware_Components(test.test):
]
_non_check_cids = [
'data_bitmap_fv',
- 'data_display_geometry',
'data_recovery_url',
]
_not_present = 'Not Present'
- def check_component(self, comp_key, comp_id):
+ def check_component(self, comp_key, comp_ids):
if comp_key in self._ignored:
return
- self._system[comp_key] = [ comp_id ]
+ if not isinstance(comp_ids, list):
+ comp_ids = [ comp_ids ]
+ self._system[comp_key] = comp_ids
if not self._approved.has_key(comp_key):
raise error.TestFail('%s missing from database' % comp_key)
@@ -66,8 +68,12 @@ class hardware_Components(test.test):
if '*' in app_cids:
return
- if not comp_id in app_cids:
- self._failures[comp_key] = [ comp_id ]
+ for comp_id in comp_ids:
+ if not comp_id in app_cids:
+ if comp_key in self._failures:
+ self._failures[comp_key].append(comp_id)
+ else:
+ self._failures[comp_key] = [ comp_id ]
def check_approved_part_id_existence(self, cid, type):
@@ -139,6 +145,15 @@ class hardware_Components(test.test):
return False
+ def get_data_display_geometry(self):
+ cmd = ('get-edid | parse-edid | grep "Mode " | '
+ 'sed \'s/^.*"\(.*\)".*$/\\1/\'')
+ data = utils.system_output(cmd).split()
+ if not data:
+ data = [ '' ]
+ return data
+
+
def get_part_id_audio_codec(self):
cmd = 'grep -R Codec: /proc/asound/* | head -n 1 | sed s/.\*Codec://'
part_id = utils.system_output(cmd).strip()
« 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