gooftool: finalize: check HWWP status of EC in VerifyWPSwitch().
Due to cr50 factory mode will always disable HWWP from H1 to AP and EC,
the pytest of write_protect_switch.py would be removed from FAT/FFT test
list. As a result, the finalize should verify both of AP and EC side in
order to make sure their HW are good.
BUG=b:113068962
TEST=manully test on the DUT and `make test gooftool_unittest.py`.
Change-Id: Ifd9c4fa9718cdc6770281471dc8163cc82a7067a
Reviewed-on: https://chromium-review.googlesource.com/1198922
Commit-Ready: Marco Chen <marcochen@chromium.org>
Tested-by: Marco Chen <marcochen@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
diff --git a/py/gooftool/commands.py b/py/gooftool/commands.py
index 9b16753..c14d2e4 100755
--- a/py/gooftool/commands.py
+++ b/py/gooftool/commands.py
@@ -224,6 +224,10 @@
help='Change the offset of embargo end date, cannot less than 7 days or '
'more than 14 days.')
+_no_ectool_cmd_arg = CmdArg(
+ '--no_ectool', action='store_false', dest='has_ectool',
+ help='There is no ectool utility so tests rely on ectool should be '
+ 'skipped.')
@Command(
'verify_ec_key',
@@ -283,11 +287,12 @@
return GetGooftool(options).VerifyManagementEngineLocked()
-@Command('verify_switch_wp')
+@Command('verify_switch_wp',
+ _no_ectool_cmd_arg)
def VerifyWPSwitch(options):
"""Verify hardware write protection switch is enabled."""
- GetGooftool(options).VerifyWPSwitch()
+ GetGooftool(options).VerifyWPSwitch(options.has_ectool)
@Command('verify_switch_dev')
@@ -473,7 +478,8 @@
_firmware_path_cmd_arg,
_enforced_release_channels_cmd_arg,
_waive_list_cmd_arg,
- _skip_list_cmd_arg)
+ _skip_list_cmd_arg,
+ _no_ectool_cmd_arg)
def Verify(options):
"""Verifies if whole factory process is ready for finalization.