deploy_chrome: Finesse --board requirements.
--board is only required for stripping, so it may be skipped if
--build-dir is not specified, --no-strip is specified, or --strip-bin
is specified.
BUG=chromium:823996
TEST=manual + unittests
Change-Id: If2e46b3bdcc7c9670cf556d1e967ee362cf01b90
Reviewed-on: https://chromium-review.googlesource.com/977042
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/deploy_chrome_unittest.py b/scripts/deploy_chrome_unittest.py
index 7f16218..1d94d67 100644
--- a/scripts/deploy_chrome_unittest.py
+++ b/scripts/deploy_chrome_unittest.py
@@ -63,10 +63,19 @@
self.assertRaises2(SystemExit, _ParseCommandLine, argv,
check_attrs={'code': 2})
- def testNoBoardBuildDir(self):
+ def testNoBoard(self):
+ """Test cases where --board is not specified."""
argv = ['--staging-only', '--build-dir=/path/to/nowhere']
self.assertParseError(argv)
+ # Don't need --board if no stripping is necessary.
+ argv_nostrip = argv + ['--nostrip']
+ _ParseCommandLine(argv_nostrip)
+
+ # Don't need --board if strip binary is provided.
+ argv_strip_bin = argv + ['--strip-bin', 'strip.bin']
+ _ParseCommandLine(argv_strip_bin)
+
def testMountOptionSetsTargetDir(self):
argv = list(_REGULAR_TO) + ['--gs-path', _GS_PATH, '--mount']
options = _ParseCommandLine(argv)