gooftool: verify release image channel
Checks release image channel is one of dev/beta/stable since those
channels support image auto-updates.
BUG=chrome-os-partner:40248
TEST=./py/system/system_unittest.py
./py/gooftool/gooftool_unittest.py
gooftool verify
Change-Id: I229b8ea5f8f2b94ee8b362c881bc6bb9c39397bf
Reviewed-on: https://chromium-review.googlesource.com/273985
Commit-Queue: Bowgo Tsai <bowgotsai@chromium.org>
Tested-by: Bowgo Tsai <bowgotsai@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/py/gooftool/gooftool.py b/py/gooftool/gooftool.py
index fc443c9..22cc9fa 100755
--- a/py/gooftool/gooftool.py
+++ b/py/gooftool/gooftool.py
@@ -571,6 +571,17 @@
return GetGooftool(options).VerifyBranding()
+@Command('verify_release_channel')
+def VerifyReleaseChannel(options): # pylint: disable=W0613
+ """Verify that release image channel is correct.
+
+ ChromeOS has four channels: canary, dev, beta and stable.
+ The last three channels support image auto-updates, checks
+ that release image channel is one of them.
+ """
+ return GetGooftool(options).VerifyReleaseChannel()
+
+
@Command('write_protect')
def EnableFwWp(options): # pylint: disable=W0613
"""Enable then verify firmware write protection."""
@@ -691,6 +702,7 @@
VerifyRootFs(options)
VerifyTPM(options)
VerifyBranding(options)
+ VerifyReleaseChannel(options)
@Command('untar_stateful_files')