Example #1
0
 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'])
Example #2
0
 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'])
Example #3
0
 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
Example #5
0
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()
Example #6
0
def doTry(config):
    from buildbot.clients import tryclient
    t = tryclient.Try(config)
    t.run()
Example #7
0
 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
Example #9
0
 def runClient(self, config):
     self.clt = tryclient.Try(config)
     return self.clt.run_impl()