Add --critical_update option to devserver
The option can be used to test auto update in the OOBE screen.
By default, devserver generates non-critical updates, hence
the updates are skipped in the OOBE screen. With this option,
you can force an update in the OOBE screen.
BUG=chromium-os:16564
TEST=cros_workon start cros-devutils --host; sudo emerge cros-devutils; ./start_devserveri --critical_update; update works with and without the option.
Change-Id: I0d3cc3881398d56ebd8c6efa1c6fec00003bf16f
Reviewed-on: https://gerrit.chromium.org/gerrit/11705
Reviewed-by: Darin Petkov <petkov@chromium.org>
Commit-Ready: Satoru Takabayashi <satorux@chromium.org>
Tested-by: Satoru Takabayashi <satorux@chromium.org>
diff --git a/devserver.py b/devserver.py
index 5c9aa24..f87d0dd 100755
--- a/devserver.py
+++ b/devserver.py
@@ -170,6 +170,9 @@
parser.add_option('--client_prefix', dest='client_prefix_deprecated',
help='No longer used. It is still here so we don\'t break '
'scripts that used it.', default='')
+ parser.add_option('--critical_update', dest='critical_update',
+ action='store_true', default=False,
+ help='Present update payload as critical')
parser.add_option('--data_dir', dest='data_dir',
help='Writable directory where static lives',
default=os.path.dirname(os.path.abspath(sys.argv[0])))
@@ -273,6 +276,7 @@
board=options.board,
copy_to_static_root=not options.exit,
private_key=options.private_key,
+ critical_update=options.critical_update,
)
# Sanity-check for use of validate_factory_config.