cbuildbot: move parsed buildbot configs into options object earlier
In preparation for moving from optparse to argparse, move the set of
buildbot configs from a dedicated variable into the options object
earlier. We're already stuffing options.build_targets by hand with
the final list of buildbot configs, but when we move to argparse, we
have to do that even earlier.
So instead of doing it in _FinishParsing and passing around the args
manually from ParseCommandLine, internalize it all in the latter.
Since this change alone touches a bunch of pieces, lets land it by
itself to make further review of the transition easier.
BUG=chromium:496565
TEST=precq passes
Change-Id: I180c794ce43f43c6852946b27439b73969142f14
Reviewed-on: https://chromium-review.googlesource.com/621638
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/cbuildbot_unittest.py b/scripts/cbuildbot_unittest.py
index f540add..9b175f9 100644
--- a/scripts/cbuildbot_unittest.py
+++ b/scripts/cbuildbot_unittest.py
@@ -22,7 +22,7 @@
"""Tests for _IsDistributedBuilder() under various configurations."""
parser = cbuildbot._CreateParser()
argv = ['amd64-generic-paladin']
- (options, _) = cbuildbot.ParseCommandLine(parser, argv)
+ options = cbuildbot.ParseCommandLine(parser, argv)
options.buildbot = False
build_config = dict(pre_cq=False,