Add Chrome-based HWID test, and add auto-probing support for HWID.
Migrate autotest-based HWID test to Chrome, and add auto-probing support
for HWID.
BUG=chrome-os-partner:14457
TEST=run following manual tests:
- fetch HWID from shop floor server and write
- auto probe HWID and select one to write if there are multiple matches
- auto probe HWID and write HWID automatically if there is only one
match
- basic function of listing all HWIDs and let operator select one to
write
Change-Id: I1be594d24ca579d6a3e29ef6f3e776e081e1da84
Reviewed-on: https://gerrit.chromium.org/gerrit/33977
Commit-Ready: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Tested-by: Ricky Liang <jcliang@chromium.org>
diff --git a/py/gooftool/gooftool.py b/py/gooftool/gooftool.py
index 11f8873..79175f2 100755
--- a/py/gooftool/gooftool.py
+++ b/py/gooftool/gooftool.py
@@ -278,7 +278,8 @@
matched_hwids = device.GetMatchTreeHwids(match_tree)
if matched_hwids:
for hwid in matched_hwids:
- print 'MATCHING HWID: %s' % hwid
+ if matched_hwids[hwid] in options.status:
+ print 'MATCHING HWID: %s' % hwid
return
print 'exact HWID matching failed, but the following BOMs match: %s' % (
', '.join(sorted(match_tree)))