[Buildbot-commits] buildbot/buildbot/scripts tryclient.py,NONE,1.1

Brian Warner warner at users.sourceforge.net
Wed Aug 10 07:06:14 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26773/buildbot/scripts

Added Files:
	tryclient.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-273
Creator:  Brian Warner <warner at lothar.com>

implement Try_Jobdir, with a unit test

	* buildbot/scheduler.py (Try_Jobdir): implement the jobdir style
	of the TryScheduler, no buildsetID or status-tracking support yet
	* buildbot/test/test_scheduler.py (Scheduling.testTryJobdir): test it

	* buildbot/changes/maildir.py (Maildir.setBasedir): make it
	possible to set the basedir after __init__ time, so it is easier
	to use as a Service-child of the BuildMaster instance

	* buildbot/changes/maildirtwisted.py (MaildirService): make a form
	that delivers messages to its Service parent instead of requiring
	a subclass to be useful. This turns out to be much easier to build
	unit tests around.

	* buildbot/scripts/tryclient.py (createJob): utility code to
	create jobfiles, will eventually be used by 'buildbot try'


--- NEW FILE: tryclient.py ---
# -*- test-case-name: buildbot.test.test_scheduler -*-

def ns(s):
    return "%d:%s," % (len(s), s)

def createJob(bsid, branch, baserev, patchlevel, patch, builderNames):
    job = ""
    job += ns("1")
    job += ns(bsid)
    job += ns(branch)
    job += ns(baserev)
    job += ns("%d" % patchlevel)
    job += ns(patch)
    for bn in builderNames:
        job += ns(bn)
    return job






More information about the Commits mailing list