CHERRY-PICK: gooftool: Let gooftool finalize, verify, verify_hwid_v3 honour rma_mode
For RMA finalize to work on deprecated components, we need to pass
rma_mode argument into Finalize, Verify, and VerifyHwidV3.
Also, add unittest for VerifyHwidV3 in gooftool/__init__.py
BUG=chrome-os-partner:24051
TEST=unittest, also run finalize in rma mode with deprecated components.
Original Change-Id: I571fc84c4b40997f68098e0d72b4b9fc503b4a96
Original Reviewed-on: https://chromium-review.googlesource.com/176822
Original Reviewed-by: Ricky Liang <jcliang@chromium.org>
Original Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Original Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
(cherry picked from commit a2b87240e412ef85f1f70a9ed3c4ec627f01c890)
Change-Id: I48c2b6ad4579e5b317234af5d920cea840c85da4
Reviewed-on: https://chromium-review.googlesource.com/178266
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
diff --git a/py/gooftool/gooftool.py b/py/gooftool/gooftool.py
index 629b109..66fb610 100755
--- a/py/gooftool/gooftool.py
+++ b/py/gooftool/gooftool.py
@@ -614,7 +614,8 @@
_hwdb_path_cmd_arg,
_board_cmd_arg,
_probe_results_cmd_arg,
- _hwid_cmd_arg)
+ _hwid_cmd_arg,
+ _rma_mode_cmd_arg)
def Verify(options):
"""Verifies if whole factory process is ready for finalization.
@@ -755,7 +756,8 @@
_add_file_cmd_arg,
_board_cmd_arg,
_probe_results_cmd_arg,
- _hwid_cmd_arg)
+ _hwid_cmd_arg,
+ _rma_mode_cmd_arg)
def Finalize(options):
"""Verify system readiness and trigger transition into release state.
@@ -863,7 +865,8 @@
_board_cmd_arg,
_hwdb_path_cmd_arg,
_probe_results_cmd_arg,
- _hwid_cmd_arg)
+ _hwid_cmd_arg,
+ _rma_mode_cmd_arg)
def VerifyHwidV3(options):
"""Verify system HWID properties match probed device properties.
@@ -916,7 +919,8 @@
if not options.board:
options.board = common.ProbeBoard(hwid_str)
GetGooftool(options).VerifyHwidV3(
- hwid_str, probe_results, probed_ro_vpd, probed_rw_vpd)
+ hwid_str, probe_results, probed_ro_vpd, probed_rw_vpd,
+ rma_mode=options.rma_mode)
event_log.Log('verified_hwid', hwid=hwid_str)
print 'Verification SUCCESS!'