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

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

Issue 3270012: factory_WriteGBB and hardware_Components support locating file using HWID. (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: fix tab 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 | client/site_tests/hardware_Components/hardware_Components.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/factory_WriteGBB/factory_WriteGBB.py
diff --git a/client/site_tests/factory_WriteGBB/factory_WriteGBB.py b/client/site_tests/factory_WriteGBB/factory_WriteGBB.py
index 248bc7ee41dc1c1e630c4418a2ff334442cfc003..36e6dc3da2659f39b94a2e61ef4be9558a23a40c 100644
--- a/client/site_tests/factory_WriteGBB/factory_WriteGBB.py
+++ b/client/site_tests/factory_WriteGBB/factory_WriteGBB.py
@@ -4,6 +4,7 @@
import glob, os
+from autotest_lib.client.bin import factory
from autotest_lib.client.bin import test, utils
from autotest_lib.client.common_lib import error
from autotest_lib.client.common_lib import flashrom_util
@@ -12,8 +13,15 @@ from autotest_lib.client.common_lib import flashrom_util
class factory_WriteGBB(test.test):
version = 1
- def run_once(self, gbb_file):
+ def run_once(self, gbb_file='', shared_dict={}):
os.chdir(self.bindir)
+
+ # If found the HwQual ID in shared_dict, use the GBB with the same ID.
+ if 'part_id_hwqual' in shared_dict:
+ id = shared_dict['part_id_hwqual']
+ id = id.rpartition(' ')[0].replace(' ', '_')
+ gbb_file = 'gbb*%s' % id
+
gbb_files = glob.glob(gbb_file)
if len(gbb_files) > 1:
raise error.TestError('More than one GBB file found')
« no previous file with comments | « no previous file | client/site_tests/hardware_Components/hardware_Components.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698