cbuildbot: Remove site_config from arg parsing.
If we plan to use command line arguments to fetch the site_config,
then we need to parse those options without a site_config. Rearrange
existing code to do that.
BUG=chromium:497284
TEST=Unittests.
Change-Id: I4106fd44781e48e1740a988f383c2d856fb3dfa0
Reviewed-on: https://chromium-review.googlesource.com/282786
Trybot-Ready: Don Garrett <dgarrett@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Matthew Sartori <msartori@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
diff --git a/scripts/cbuildbot_unittest.py b/scripts/cbuildbot_unittest.py
index 177c9ee..ed36881 100644
--- a/scripts/cbuildbot_unittest.py
+++ b/scripts/cbuildbot_unittest.py
@@ -6,7 +6,6 @@
from __future__ import print_function
-from chromite.cbuildbot import config_lib_unittest
from chromite.cbuildbot import constants
from chromite.lib import cros_test_lib
from chromite.scripts import cbuildbot
@@ -18,11 +17,9 @@
# pylint: disable=W0212
def testIsDistributedBuilder(self):
"""Tests for _IsDistributedBuilder() under various configurations."""
- site_config = config_lib_unittest.MockSiteConfig()
-
parser = cbuildbot._CreateParser()
argv = ['x86-generic-paladin']
- (options, _) = cbuildbot._ParseCommandLine(parser, argv, site_config)
+ (options, _) = cbuildbot._ParseCommandLine(parser, argv)
options.buildbot = False
options.pre_cq = False