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) |