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

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

Issue 3333024: Change the path of qualified DBs in factory tests. (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 | client/site_tests/hardware_Components/qualified_components_x86-generic » ('j') | 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 f08b261b51450e4c395a55a231e1613d47745691..126e1ed66b771e8221b23d0249b2d0e96b73a0c7 100644
--- a/client/site_tests/hardware_Components/hardware_Components.py
+++ b/client/site_tests/hardware_Components/hardware_Components.py
@@ -110,13 +110,13 @@ class hardware_Components(test.test):
def check_existence_key_recovery(self, part_id):
current_key = self._gbb.get_recoverykey()
target_key = utils.read_file(part_id)
- return current_key == target_key
+ return current_key.startswith(target_key)
def check_existence_key_root(self, part_id):
current_key = self._gbb.get_rootkey()
target_key = utils.read_file(part_id)
- return current_key == target_key
+ return current_key.startswith(target_key)
def check_existence_part_id_chrontel(self, part_id):
@@ -331,18 +331,18 @@ class hardware_Components(test.test):
# If found the HwQual ID in shared_dict, use the list with the same ID.
if 'part_id_hwqual' in shared_dict:
- id = shared_dict['part_id_hwqual']
- id = id.rpartition(' ')[0].replace(' ', '_')
- approved_dbs = 'qualified_components*%s' % id
+ id = shared_dict['part_id_hwqual'].replace(' ', '_')
+ approved_dbs = 'data_*/components_%s' % id
# approved_dbs supports shell-like filename expansion.
- for db in glob.iglob(approved_dbs):
+ existing_dbs = glob.glob(approved_dbs)
+ if not existing_dbs:
+ raise error.TestError('Unable to find approved db: %s' %
+ approved_dbs)
+
+ for db in existing_dbs:
self._system = {}
self._failures = {}
-
- if not os.path.exists(db):
- raise error.TestError('Unable to find approved db: %s' % db)
-
self._approved = eval(utils.read_file(db))
logging.debug('Approved DB: %s', self.pformat(self._approved))
« no previous file with comments | « no previous file | client/site_tests/hardware_Components/qualified_components_x86-generic » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698