cbuildbot: plumb snapshot revision flag
Plumb the --cbb_snapshot_revision flag that will be passed
to post-submit builders inside of the --cbb_extra_args
flag. This will be parsed and set by the cros/swarming
recipe when triggered by Findit.
BUG=chromium:923572
TEST=unittests and tryjob
Change-Id: Ic31bbcc7e953d839cc4c2a43305c359fb21e99c7
Reviewed-on: https://chromium-review.googlesource.com/1477770
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Gregory Meinke <gmeinke@chromium.org>
Reviewed-by: David Burger <dburger@chromium.org>
diff --git a/scripts/cbuildbot_unittest.py b/scripts/cbuildbot_unittest.py
index 487e2f1..3b67433 100644
--- a/scripts/cbuildbot_unittest.py
+++ b/scripts/cbuildbot_unittest.py
@@ -62,7 +62,9 @@
def testBuildPackages(self):
parser = cbuildbot.CreateParser()
argv = ['--buildroot', '/foo', '--buildbot',
+ '--cbb_snapshot_revision', 'hash1234',
'--cbb_build_packages', 'pkgA pkgB', 'caroline-postsubmit']
options = cbuildbot.ParseCommandLine(parser, argv)
expected = ['pkgA', 'pkgB']
self.assertEquals(expected, options.cbb_build_packages)
+ self.assertEquals('hash1234', options.cbb_snapshot_revision)