gooftool, finalize: Support '--chromebox' flag.
ChromeBox devices have different finalization process. This CL adds a
test_list constant 'is_chromebox' (defaults to false) to indicate the
underlying device type. Also, the `gooftool finalize/verify` support
--chromebox now to have customized process.
TEST=run finalize pytest for is_chromebox=false/true
BUG=none
Change-Id: I9b2078a1fdb6525bf1fdcbc19fd73ca61810745e
diff --git a/py/gooftool/commands.py b/py/gooftool/commands.py
index e2db765..468039b 100755
--- a/py/gooftool/commands.py
+++ b/py/gooftool/commands.py
@@ -150,6 +150,11 @@
'items. For example, registration codes or firmware bitmap '
'locale settings).')
+_chromebox_cmd_arg = CmdArg(
+ '--chromebox', action='store_true', default=None,
+ help='Finalize for ChromeBox devices (may add or remove few test '
+ 'items. For example, VerifyECKey).')
+
_enforced_release_channels_cmd_arg = CmdArg(
'--enforced_release_channels', nargs='*', default=None,
help='Enforced release image channels.')
@@ -460,6 +465,7 @@
_hwid_cmd_arg,
_rma_mode_cmd_arg,
_cros_core_cmd_arg,
+ _chromebox_cmd_arg,
_ec_pubkey_path_cmd_arg,
_ec_pubkey_hash_cmd_arg,
_release_rootfs_cmd_arg,
@@ -482,6 +488,8 @@
VerifyDevSwitch(options)
VerifyHWID(options)
VerifySystemTime(options)
+ if options.chromebox:
+ VerifyECKey(options)
VerifyKeys(options)
VerifyRootFs(options)
VerifyTPM(options)
@@ -650,6 +658,7 @@
_hwid_cmd_arg,
_rma_mode_cmd_arg,
_cros_core_cmd_arg,
+ _chromebox_cmd_arg,
_ec_pubkey_path_cmd_arg,
_ec_pubkey_hash_cmd_arg,
_release_rootfs_cmd_arg,