gooftool: Add new "developer_finalize" command allows re-testing factory flow.
For devices in early proto/dvt stage, we don't want to enforce commands that
would prevent DUT to be re-tested or re-initialized again (ex, write protection
or developer mode).
BUG=chrome-os-partner:8396
TEST=gooftool --developer_finalize # pass
Change-Id: I8fb8248ec78c71c09512c3d332c93c9cf26c77db
Reviewed-on: https://gerrit.chromium.org/gerrit/17670
Tested-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Tammo Spalink <tammo@chromium.org>
Commit-Ready: Hung-Te Lin <hungte@chromium.org>
diff --git a/gooftool b/gooftool
index e03129e..a99c7db 100755
--- a/gooftool
+++ b/gooftool
@@ -469,7 +469,7 @@
verify_rootfs))
def verify():
""" Verifies if whole factory process is ready for finalization. """
- # See the depenency list for the real commands to be executed.
+ # See the dependency list for the real commands to be executed.
return True
@@ -482,7 +482,28 @@
prepare_wipe))
def finalize():
""" Finalizes all factory tests and transit system into release state. """
- # See the depenency list for the real commands to be executed.
+ # See the dependency list for the real commands to be executed.
+ return True
+
+
+@GFTCommand
+@GFTCommandDependency((clear_gbb_flags,
+ verify_hwid,
+ verify_vpd,
+ verify_system_time,
+ verify_keys,
+ verify_rootfs,
+ create_report,
+ upload_report,
+ prepare_wipe))
+def developer_finalize():
+ """ Finalizes tests and leave the system in developer-friendly mode.
+
+ This is similar to 'finalize' command but not enforcing commands that would
+ prevent developers to restart factory process, for example write protection
+ (wpfw) and non-developer mode (verify_switch_dev).
+ """
+ # See the dependency list for the real commands to be executed.
return True