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

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

Issue 3209001: Make cardreader mis-matched a special case to prompt error. (Closed) Base URL: http://src.chromium.org/git/autotest.git
Patch Set: Created 10 years, 4 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 e6ae5dfde01656077425fe0da1017d428548388f..91d45aa7dc32985ff5b72ea8996a48aedf905f80 100644
--- a/client/site_tests/hardware_Components/hardware_Components.py
+++ b/client/site_tests/hardware_Components/hardware_Components.py
@@ -293,7 +293,8 @@ class hardware_Components(test.test):
def run_once(self, approved_dbs='approved_components', ignored_cids=[]):
self._ignored = ignored_cids
- all_failures = ''
+ only_cardreader_failed = False
+ all_failures = 'The following components are not matched.\n'
os.chdir(self.bindir)
# approved_dbs supports shell-like filename expansion.
@@ -325,7 +326,9 @@ class hardware_Components(test.test):
utils.open_write_close(outdb, self.pformat(self._system))
if self._failures:
- all_failures += 'Approved DB: %s' % db
+ if self._failures.keys() == ['part_id_cardreader']:
+ only_cardreader_failed = True
+ all_failures += 'For DB %s:' % db
all_failures += self.pformat(self._failures)
else:
# If one of DBs is matched, record the hwqual_id and exit.
@@ -333,4 +336,8 @@ class hardware_Components(test.test):
{'hwqual_id': self._approved['part_id_hwqual'][0]})
return
+ if only_cardreader_failed:
+ all_failures = ('You may forget to insert an SD card.\n' +
+ all_failures)
+
raise error.TestFail(all_failures)
« 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