def testBuildbotDebugWithPatches(self): """Test we can test patches with --buildbot --debug.""" args = [ '--remote', '-g', '1234', '--debug', '--buildbot', self._X86_PREFLIGHT ] cbuildbot._ParseCommandLine(self.parser, args)
def testCreateBranchDelete(self): """Test we don't require --version with --delete.""" args = [ '--delete-branch', '--branch-name', 'refs/heads/test', constants.BRANCH_UTIL_CONFIG ] cbuildbot._ParseCommandLine(self.parser, args)
def _initConfig(self, bot_id, extra_argv=None, override_hw_test_config=None): """Return normal options/build_config for |bot_id|""" site_config = chromeos_config.GetConfig() build_config = copy.deepcopy(site_config[bot_id]) build_config['master'] = False build_config['important'] = False # Use the cbuildbot parser to create properties and populate default values. parser = cbuildbot._CreateParser() argv = ( ['-r', self.buildroot, '--buildbot', '--debug', '--nochromesdk'] + (extra_argv if extra_argv else []) + [bot_id]) options, _ = cbuildbot._ParseCommandLine(parser, argv) # Yikes. options.managed_chrome = build_config['sync_chrome'] # Iterate through override and update HWTestConfig attributes. if override_hw_test_config: for key, val in override_hw_test_config.iteritems(): for hw_test in build_config.hw_tests: setattr(hw_test, key, val) return cbuildbot_run.BuilderRun(options, site_config, build_config, self._manager)
def testIsDistributedBuilder(self): """Tests for _IsDistributedBuilder() under various configurations.""" parser = cbuildbot._CreateParser() argv = ['x86-generic-paladin'] (options, _) = cbuildbot._ParseCommandLine(parser, argv) options.buildbot = False build_config = dict(pre_cq=False, manifest_version=False) chrome_rev = None def _TestConfig(expected): self.assertEquals( expected, cbuildbot._IsDistributedBuilder(options=options, chrome_rev=chrome_rev, build_config=build_config)) # Default options. _TestConfig(False) build_config['pre_cq'] = True _TestConfig(True) build_config['pre_cq'] = False build_config['manifest_version'] = True # Not running in buildbot mode even though manifest_version=True. _TestConfig(False) options.buildbot = True _TestConfig(True) for chrome_rev in (constants.CHROME_REV_TOT, constants.CHROME_REV_LOCAL, constants.CHROME_REV_SPEC): _TestConfig(False)
def setUp(self): self.buildroot = os.path.join(self.tempdir, 'buildroot') osutils.SafeMakedirs(self.buildroot) # Always stub RunCommmand out as we use it in every method. self.bot_id = 'x86-generic-paladin' self.build_config = copy.deepcopy(cbuildbot_config.GetConfig()[self.bot_id]) self.build_config['master'] = False self.build_config['important'] = False # Use the cbuildbot parser to create properties and populate default values. self.parser = cbuildbot._CreateParser() argv = ['-r', self.buildroot, '--buildbot', '--debug', 'x86-generic-paladin'] (self.options, _) = cbuildbot._ParseCommandLine(self.parser, argv) self.options.bootstrap = False self.options.clean = False self.options.resume = False self.options.sync = False self.options.build = False self.options.uprev = False self.options.tests = False self.options.archive = False self.options.remote_test_status = False self.options.patches = None self.options.prebuilts = False self._manager = parallel.Manager() self._manager.__enter__() self.run = cbuildbot_run.BuilderRun(self.options, self.build_config, self._manager) self.rc.AddCmdResult( [constants.PATH_TO_CBUILDBOT, '--reexec-api-version'], output=constants.REEXEC_API_VERSION)
def _initConfig(self, bot_id, extra_argv=None, override_hw_test_config=None): """Return normal options/build_config for |bot_id|""" site_config = chromeos_config.GetConfig() build_config = copy.deepcopy(site_config[bot_id]) build_config["master"] = False build_config["important"] = False # Use the cbuildbot parser to create properties and populate default values. parser = cbuildbot._CreateParser() argv = ( ["-r", self.buildroot, "--buildbot", "--debug", "--nochromesdk"] + (extra_argv if extra_argv else []) + [bot_id] ) options, _ = cbuildbot._ParseCommandLine(parser, argv) # Yikes. options.managed_chrome = build_config["sync_chrome"] # Iterate through override and update HWTestConfig attributes. if override_hw_test_config: for key, val in override_hw_test_config.iteritems(): for hw_test in build_config.hw_tests: setattr(hw_test, key, val) return cbuildbot_run.BuilderRun(options, site_config, build_config, self._manager)
def testIsDistributedBuilder(self): """Tests for _IsDistributedBuilder() under various configurations.""" parser = cbuildbot._CreateParser() argv = ['x86-generic-paladin'] (options, _) = cbuildbot._ParseCommandLine(parser, argv) options.buildbot = False build_config = dict(pre_cq=False, manifest_version=False) chrome_rev = None def _TestConfig(expected): self.assertEquals(expected, cbuildbot._IsDistributedBuilder( options=options, chrome_rev=chrome_rev, build_config=build_config)) # Default options. _TestConfig(False) build_config['pre_cq'] = True _TestConfig(True) build_config['pre_cq'] = False build_config['manifest_version'] = True # Not running in buildbot mode even though manifest_version=True. _TestConfig(False) options.buildbot = True _TestConfig(True) for chrome_rev in (constants.CHROME_REV_TOT, constants.CHROME_REV_LOCAL, constants.CHROME_REV_SPEC): _TestConfig(False)
def setUp(self): self.buildroot = os.path.join(self.tempdir, 'buildroot') osutils.SafeMakedirs(self.buildroot) # Always stub RunCommmand out as we use it in every method. self.bot_id = 'x86-generic-paladin' self.build_config = config.config[self.bot_id] self.build_config['master'] = False self.build_config['important'] = False # Use the cbuildbot parser to create properties and populate default values. self.parser = cbuildbot._CreateParser() argv = [ '-r', self.buildroot, '--buildbot', '--debug', 'x86-generic-paladin' ] (self.options, _) = cbuildbot._ParseCommandLine(self.parser, argv) self.options.bootstrap = False self.options.clean = False self.options.resume = False self.options.sync = False self.options.build = False self.options.uprev = False self.options.tests = False self.options.archive = False self.options.remote_test_status = False self.options.patches = None self.options.prebuilts = False self.mox.StubOutWithMock(stages.SyncStage, 'HandleSkip') stages.SyncStage.HandleSkip()
def setUp(self): self.buildroot = os.path.join(self.tempdir, 'buildroot') osutils.SafeMakedirs(self.buildroot) # Always stub RunCommmand out as we use it in every method. self.bot_id = 'x86-generic-paladin' self.build_config = config.config[self.bot_id] self.build_config['master'] = False self.build_config['important'] = False # Use the cbuildbot parser to create properties and populate default values. self.parser = cbuildbot._CreateParser() argv = ['-r', self.buildroot, '--buildbot', '--debug', 'x86-generic-paladin'] (self.options, _) = cbuildbot._ParseCommandLine(self.parser, argv) self.options.bootstrap = False self.options.clean = False self.options.resume = False self.options.sync = False self.options.build = False self.options.uprev = False self.options.tests = False self.options.archive = False self.options.remote_test_status = False self.options.patches = None self.options.prebuilts = False self.mox.StubOutWithMock(stages.SyncStage, 'HandleSkip') stages.SyncStage.HandleSkip()
def setUp(self): self.buildroot = os.path.join(self.tempdir, 'buildroot') osutils.SafeMakedirs(self.buildroot) # Always stub RunCommmand out as we use it in every method. self.site_config = config_lib_unittest.MockSiteConfig() self.build_config = config_lib_unittest.MockBuildConfig() self.bot_id = self.build_config.name self.build_config['master'] = False self.build_config['important'] = False # Use the cbuildbot parser to create properties and populate default values. self.parser = cbuildbot._CreateParser() argv = ['-r', self.buildroot, '--buildbot', '--debug', self.bot_id] self.options, _ = cbuildbot._ParseCommandLine(self.parser, argv) self.options.bootstrap = False self.options.clean = False self.options.resume = False self.options.sync = False self.options.build = False self.options.uprev = False self.options.tests = False self.options.archive = False self.options.remote_test_status = False self.options.patches = None self.options.prebuilts = False self._manager = parallel.Manager() self._manager.__enter__() self.run = cbuildbot_run.BuilderRun(self.options, self.site_config, self.build_config, self._manager) self.rc.AddCmdResult( [constants.PATH_TO_CBUILDBOT, '--reexec-api-version'], output=constants.REEXEC_API_VERSION)
def testBuildBotWithDebugOption(self): """Test that --debug option overrides --buildbot option.""" args = ['-r', self._BUILD_ROOT, '--buildbot', '--debug', self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.debug, True) self.assertEquals(options.buildbot, True)
def setUp(self): self.buildroot = os.path.join(self.tempdir, 'buildroot') osutils.SafeMakedirs(self.buildroot) # Always stub RunCommmand out as we use it in every method. self.bot_id = 'x86-generic-paladin' self.build_config = copy.deepcopy(config.config[self.bot_id]) self.build_config['master'] = False self.build_config['important'] = False # Use the cbuildbot parser to create properties and populate default values. self.parser = cbuildbot._CreateParser() argv = ['-r', self.buildroot, '--buildbot', '--debug', 'x86-generic-paladin'] (self.options, _) = cbuildbot._ParseCommandLine(self.parser, argv) self.options.bootstrap = False self.options.clean = False self.options.resume = False self.options.sync = False self.options.build = False self.options.uprev = False self.options.tests = False self.options.archive = False self.options.remote_test_status = False self.options.patches = None self.options.prebuilts = False self._manager = cbuildbot.parallel.Manager() self._manager.__enter__() self.run = cbuildbot_run.BuilderRun(self.options, self.build_config, self._manager) self.StartPatcher(BuilderRunMock())
def setUp(self): self.buildroot = os.path.join(self.tempdir, "buildroot") osutils.SafeMakedirs(self.buildroot) # Always stub RunCommmand out as we use it in every method. self.site_config = config_lib_unittest.MockSiteConfig() self.build_config = config_lib_unittest.MockBuildConfig() self.bot_id = self.build_config.name self.build_config["master"] = False self.build_config["important"] = False # Use the cbuildbot parser to create properties and populate default values. self.parser = cbuildbot._CreateParser() argv = ["-r", self.buildroot, "--buildbot", "--debug", self.bot_id] self.options, _ = cbuildbot._ParseCommandLine(self.parser, argv) self.options.bootstrap = False self.options.clean = False self.options.resume = False self.options.sync = False self.options.build = False self.options.uprev = False self.options.tests = False self.options.archive = False self.options.remote_test_status = False self.options.patches = None self.options.prebuilts = False self._manager = parallel.Manager() self._manager.__enter__() self.run = cbuildbot_run.BuilderRun(self.options, self.site_config, self.build_config, self._manager) self.rc.AddCmdResult([constants.PATH_TO_CBUILDBOT, "--reexec-api-version"], output=constants.REEXEC_API_VERSION)
def testLocalTrybotWithSpacesInPatches(self): """Test that we handle spaces in patch arguments.""" args = ['-r', self._BUILD_ROOT, '--remote', '--local-patches', ' proj:br \t proj2:b2 ', self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.local_patches, ['proj:br', 'proj2:b2'])
def setUp(self): self.parser = cbuildbot._CreateParser() args = ['-r', '/tmp/test_build1', '-g', '5555', '-g', '6666', '--remote'] args.extend(self.BOTS) self.options, args = cbuildbot._ParseCommandLine(self.parser, args) self.checkout_dir = os.path.join(self.tempdir, 'test_checkout') self.int_mirror, self.ext_mirror = None, None
def testLocalTrybotWithSpacesInPatches(self): """Test that we handle spaces in patch arguments.""" args = [ '-r', self._BUILD_ROOT, '--remote', '--local-patches', ' proj:br \t proj2:b2 ', self._X86_PREFLIGHT ] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.local_patches, ['proj:br', 'proj2:b2'])
def setUp(self): self.parser = cbuildbot._CreateParser() args = [ '-r', '/tmp/test_build1', '-g', '5555', '-g', '6666', '--remote' ] args.extend(self.BOTS) self.options, args = cbuildbot._ParseCommandLine(self.parser, args) self.checkout_dir = os.path.join(self.tempdir, 'test_checkout') self.int_mirror, self.ext_mirror = None, None
def testBuildBotWithDebugOption(self): """Test that --debug option overrides --buildbot option.""" args = [ '-r', self._BUILD_ROOT, '--buildbot', '--debug', self._X86_PREFLIGHT ] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertTrue(options.debug) self.assertTrue(options.buildbot)
def setUp(self): # pylint: disable=protected-access self.parser = cbuildbot._CreateParser() args = ["-r", "/tmp/test_build1", "-g", "5555", "-g", "6666", "--remote"] args.extend(self.BOTS) self.options, args = cbuildbot._ParseCommandLine(self.parser, args) self.options.cache_dir = self.tempdir self.checkout_dir = os.path.join(self.tempdir, "test_checkout") self.int_mirror, self.ext_mirror = None, None
def testBuildBotWithGoodChromeRootOption(self): """chrome_root can be set without chrome_rev.""" args = [ '--local', '--buildroot=/tmp', '--chrome_root=.', self._X86_PREFLIGHT, ] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.chrome_rev, constants.CHROME_REV_LOCAL) self.assertNotEquals(options.chrome_root, None)
def setUp(self): # pylint: disable=protected-access self.site_config = config_lib_unittest.MockSiteConfig() self.parser = cbuildbot._CreateParser() args = ['-r', '/tmp/test_build1', '-g', '5555', '-g', '6666', '--remote'] args.extend(self.BOTS) self.options, args = cbuildbot._ParseCommandLine(self.parser, args) self.options.cache_dir = self.tempdir self.checkout_dir = os.path.join(self.tempdir, 'test_checkout') self.int_mirror, self.ext_mirror = None, None
def testBuildBotWithGoodChromeRootOption(self): """chrome_root can be set without chrome_rev.""" args = ['--local', '--buildroot=/tmp', '--chrome_root=.', self._X86_PREFLIGHT] self.mox.ReplayAll() (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.mox.VerifyAll() self.assertEquals(options.chrome_rev, constants.CHROME_REV_LOCAL) self.assertNotEquals(options.chrome_root, None)
def _initConfig(self, bot_id, extra_argv=None): """Return normal options/build_config for |bot_id|""" build_config = copy.deepcopy(config.config[bot_id]) build_config['master'] = False build_config['important'] = False # Use the cbuildbot parser to create properties and populate default values. parser = cbuildbot._CreateParser() argv = (['-r', self.buildroot, '--buildbot', '--debug', '--nochromesdk'] + (extra_argv if extra_argv else []) + [bot_id]) (options, _) = cbuildbot._ParseCommandLine(parser, argv) # Yikes. options.managed_chrome = build_config['sync_chrome'] return cbuildbot_run.BuilderRun(options, build_config, self._manager)
def testBuildBotWithGoodChromeRevAndRootOption(self): """chrome_rev can get reset around chrome_root.""" args = [ '--local', '--buildroot=/tmp', '--chrome_rev=%s' % constants.CHROME_REV_LATEST, '--chrome_rev=%s' % constants.CHROME_REV_STICKY, '--chrome_rev=%s' % constants.CHROME_REV_TOT, '--chrome_rev=%s' % constants.CHROME_REV_TOT, '--chrome_rev=%s' % constants.CHROME_REV_STICKY, '--chrome_rev=%s' % constants.CHROME_REV_LATEST, '--chrome_rev=%s' % constants.CHROME_REV_LOCAL, '--chrome_root=.', '--chrome_rev=%s' % constants.CHROME_REV_TOT, '--chrome_rev=%s' % constants.CHROME_REV_LOCAL, self._X86_PREFLIGHT ] self.mox.ReplayAll() (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.mox.VerifyAll() self.assertEquals(options.chrome_rev, constants.CHROME_REV_LOCAL) self.assertNotEquals(options.chrome_root, None)
def testBuildBotWithGoodChromeRevAndRootOption(self): """chrome_rev can get reset around chrome_root.""" args = [ "--local", "--buildroot=/tmp", "--chrome_rev=%s" % constants.CHROME_REV_LATEST, "--chrome_rev=%s" % constants.CHROME_REV_STICKY, "--chrome_rev=%s" % constants.CHROME_REV_TOT, "--chrome_rev=%s" % constants.CHROME_REV_TOT, "--chrome_rev=%s" % constants.CHROME_REV_STICKY, "--chrome_rev=%s" % constants.CHROME_REV_LATEST, "--chrome_rev=%s" % constants.CHROME_REV_LOCAL, "--chrome_root=.", "--chrome_rev=%s" % constants.CHROME_REV_TOT, "--chrome_rev=%s" % constants.CHROME_REV_LOCAL, self._X86_PREFLIGHT, ] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.chrome_rev, constants.CHROME_REV_LOCAL) self.assertNotEquals(options.chrome_root, None)
def testBuildBotWithGoodChromeRevAndRootOption(self): """chrome_rev can get reset around chrome_root.""" args = ['--local', '--buildroot=/tmp', '--chrome_rev=%s' % constants.CHROME_REV_LATEST, '--chrome_rev=%s' % constants.CHROME_REV_STICKY, '--chrome_rev=%s' % constants.CHROME_REV_TOT, '--chrome_rev=%s' % constants.CHROME_REV_TOT, '--chrome_rev=%s' % constants.CHROME_REV_STICKY, '--chrome_rev=%s' % constants.CHROME_REV_LATEST, '--chrome_rev=%s' % constants.CHROME_REV_LOCAL, '--chrome_root=.', '--chrome_rev=%s' % constants.CHROME_REV_TOT, '--chrome_rev=%s' % constants.CHROME_REV_LOCAL, self._X86_PREFLIGHT] self.mox.ReplayAll() (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.mox.VerifyAll() self.assertEquals(options.chrome_rev, constants.CHROME_REV_LOCAL) self.assertNotEquals(options.chrome_root, None)
def testBuildBotWithoutProfileOption(self): """Test that no --profile option gets defaulted.""" args = ['--buildbot', self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.profile, None)
def testBuildbotDebugWithPatches(self): """Test we can test patches with --buildbot --debug.""" args = ['--remote', '-g', '1234', '--debug', '--buildbot', self._X86_PREFLIGHT] cbuildbot._ParseCommandLine(self.parser, args)
def testBuildBotOption(self): """Test that --buildbot option unsets debug flag.""" args = ['-r', self._BUILD_ROOT, '--buildbot', self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertFalse(options.debug) self.assertTrue(options.buildbot)
def testBuildBotWithoutProfileOption(self): """Test that no --profile option gets defaulted.""" args = ['--buildbot', self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.profile, None)
def testBuildBotOption(self): """Test that --buildbot option unsets debug flag.""" args = ['-r', self._BUILD_ROOT, '--buildbot', self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.debug, False) self.assertEquals(options.buildbot, True)
def testPassThroughOptions(self): """Test we are building up pass-through list properly.""" args = ['--remote', '-g', '1234', self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.pass_through_args, ['-g', '1234'])
def testBuildBotWithDebugOption(self): """Test that --debug option overrides --buildbot option.""" args = ["-r", self._BUILD_ROOT, "--buildbot", "--debug", self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertTrue(options.debug) self.assertTrue(options.buildbot)
def testDebugPassThrough(self): """Test we are passing --debug through.""" args = ['--remote', '--debug', '--buildbot', self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.pass_through_args, ['--debug', '--buildbot'])
def testBuildBotWithProfileOption(self): """Test that --profile option gets parsed.""" args = ['--buildbot', '--profile', 'carp', self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.profile, 'carp')
def testBuildBotWithGoodChromeRootOption(self): """chrome_root can be set without chrome_rev.""" args = ["--local", "--buildroot=/tmp", "--chrome_root=.", self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.chrome_rev, constants.CHROME_REV_LOCAL) self.assertNotEquals(options.chrome_root, None)
def testBuildBotWithProfileOption(self): """Test that --profile option gets parsed.""" args = ["--buildbot", "--profile", "carp", self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.profile, "carp")
def testBuildbotDebugWithPatches(self): """Test we can test patches with --buildbot --debug.""" args = ["--remote", "-g", "1234", "--debug", "--buildbot", self._X86_PREFLIGHT] cbuildbot._ParseCommandLine(self.parser, args)
def testLocalTrybotWithSpacesInPatches(self): """Test that we handle spaces in patch arguments.""" args = ["-r", self._BUILD_ROOT, "--remote", "--local-patches", " proj:br \t proj2:b2 ", self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.local_patches, ["proj:br", "proj2:b2"])
def testPassThroughOptions(self): """Test we are building up pass-through list properly.""" args = ["--remote", "-g", "1234", self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.pass_through_args, ["-g", "1234"])
def testCreateBranchDelete(self): """Test we don't require --version with --delete.""" args = ["--delete-branch", "--branch-name", "refs/heads/test", constants.BRANCH_UTIL_CONFIG] cbuildbot._ParseCommandLine(self.parser, args)
def testPassThroughOptions(self): """Test we are building up pass-through list properly.""" args = ['--remote', '-g', '1234', self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.pass_through_args, ['-g', '1234'])
def testBuildBotWithProfileOption(self): """Test that --profile option gets parsed.""" args = ['--buildbot', '--profile', 'carp', self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.profile, 'carp')
def testDebugBuildBotSetByDefault(self): """Test that debug and buildbot flags are set by default.""" args = ['--local', '-r', self._BUILD_ROOT, self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertTrue(options.debug) self.assertFalse(options.buildbot)
def testDebugBuildBotSetByDefault(self): """Test that debug and buildbot flags are set by default.""" args = ['--local', '-r', self._BUILD_ROOT, self._X86_PREFLIGHT] (options, args) = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.debug, True) self.assertEquals(options.buildbot, False)
def testBuildBotOption(self): """Test that --buildbot option unsets debug flag.""" args = ["-r", self._BUILD_ROOT, "--buildbot", self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertFalse(options.debug) self.assertTrue(options.buildbot)
def testDebugPassThrough(self): """Test we are passing --debug through.""" args = ['--remote', '--debug', '--buildbot', self._X86_PREFLIGHT] options, args = cbuildbot._ParseCommandLine(self.parser, args) self.assertEquals(options.pass_through_args, ['--debug', '--buildbot'])