def testGetopt4(self): opts = "try_connect = 'ssh'\n" + "try_builders = ['a']\n" self.makeOptions(opts) config = runner.TryOptions() config.parseOptions(['--builder=b']) t = tryclient.Try(config) self.failUnlessEqual(t.connect, "ssh") self.failUnlessEqual(t.builderNames, ['b'])
def testGetopt2(self): opts = "" self.makeOptions(opts) config = runner.TryOptions() config.parseOptions(['--connect=ssh', '--builder', 'a']) t = tryclient.Try(config) self.failUnlessEqual(t.connect, "ssh") self.failUnlessEqual(t.builderNames, ['a'])
def _then(ign): port = s.getPort() config = { 'connect': 'pb', 'username': '******', 'passwd': 'pw1', 'master': "localhost:%d" % port, 'builders': ["a", "b"], } self.tryclient = t = tryclient.Try(config) ss = sourcestamp.SourceStamp("branch1", "123", (1, "diff")) t.sourcestamp = ss return t.deliverJob()
def test_getAvailableNames_no_properties(self): """ Test that properties are sent to the server when getAvailableNames is called. """ def callRemote(method, *args): self.assertEqual(method, "getAvailableBuilderNames") self.assertEqual(args, ()) return defer.succeed(['builder']) self.remote.callRemote = callRemote config = TryOptions() config['connect'] = 'pb' config['master'] = 'localhost:1234' try_client = tryclient.Try(config) d = try_client.getAvailableBuilderNames() return d
def run(host, port, passwd, wait): """Run eve client. Args: host (str): The eve host (e.g. example.com). port (int): The try port (e.g. 7999). passwd (str): The master try password. """ tryclient.output = output config = dict( connect='pb', vc='git', username='******', passwd=passwd, master='%s:%s' % (host, port), wait=wait, ) tryc = tryclient.Try(config) tryc.run()
def doTry(config): from buildbot.clients import tryclient t = tryclient.Try(config) t.run()
def runClient(self, config): self.clt = tryclient.Try(config) return self.clt.run(_inTests=True)
def trycmd(config): from buildbot.clients import tryclient t = tryclient.Try(config) t.run() return 0
def runClient(self, config): self.clt = tryclient.Try(config) return self.clt.run_impl()