[Checkins] SVN: zope.wineggbuilder/trunk/ test a LOT of packages

Adam Groszer agroszer at gmail.com
Sun Nov 28 08:34:22 EST 2010


Log message for revision 118616:
  test a LOT of packages

Changed:
  U   zope.wineggbuilder/trunk/master.cfg
  A   zope.wineggbuilder/trunk/project-list.cfg

-=-
Modified: zope.wineggbuilder/trunk/master.cfg
===================================================================
--- zope.wineggbuilder/trunk/master.cfg	2010-11-27 15:37:59 UTC (rev 118615)
+++ zope.wineggbuilder/trunk/master.cfg	2010-11-28 13:34:21 UTC (rev 118616)
@@ -21,6 +21,8 @@
 from buildbot.scheduler import Scheduler, Nightly, Triggerable, Periodic
 from buildbot.steps.trigger import Trigger
 
+is_win32 = sys.platform == 'win32'
+
 # This is a sample buildmaster config file. It must be installed as
 # 'master.cfg' in your buildmaster's base directory (although the filename
 # can be changed with the --basedir option to 'mktap buildbot master').
@@ -857,7 +859,162 @@
 # mail status
 ######################################
 
+######################################
+# stuff taken from gocept.bsquare
 
+bsquare_platform = PLATFORMS['py_265_win32']
+bsquare_platname = 'py_265_32'
+
+def bsquare_split_file(path):
+    pieces = path.split("/")
+    if len(pieces) < 2:
+        return None
+    project, branch = pieces[0], pieces[1]
+    if branch != "trunk":
+        return None
+    return ("%s/%s" % (project, branch), "/".join(pieces[2:]))
+
+
+def bsquare_make_factory(svn_url):
+    f = factory.BuildFactory()
+    f.addStep(SVN(baseURL=svn_url, mode='copy'))
+
+    #f.addStep(Compile(name='bootstrap',
+    #            command='buildout bootstrap .',
+    #            description=['bootstrapping'],
+    #            descriptionDone=['bootstrap']))
+    f.addStep(shell.ShellCommand(
+              command=[bsquare_platform.python, r"c:\buildmaster\bootstrap.py"],
+              haltOnFailure=True,
+              name="bootstrap",
+              description="bootstrap"))
+
+    #if is_win32:
+    #    command = "bin\\buildout.exe"
+    #else:
+    #    command = 'bin/buildout'
+    #f.addStep(Compile(name="buildout",
+    #            command=command,
+    #            description=['building'],
+    #            descriptionDone=['build']))
+
+    f.addStep(shell.ShellCommand(
+              command=bsquare_platform.withcompiler % r"bin\buildout.exe",
+              haltOnFailure=True,
+              name="buildout",
+              description="buildout",
+              timeout=3600))
+
+
+    if is_win32:
+        command = "bin\\test.exe --exit-with-status -1"
+    else:
+        command = 'bin/test --exit-with-status -1' #-1 == stop on first error
+
+    f.addStep(Test(name="test",
+                command=command,
+                description=['testing'],
+                descriptionDone=['tests']))
+
+    f.treeStableTimer = 300
+    return f
+
+
+def bsquare_configure(c,
+              svn_url, http_port=8010, allowForce=False,
+              svnuser = None, svnpasswd = None,
+              pollinterval = 30, nightlyhour=None,
+              poller = None, makefactory = bsquare_make_factory,
+              maxConcurrent = 2,
+              svnbin = 'svn',
+              slow_lock = None):
+    """Creates a buildout master configuration.
+
+    The configuration returned is almost functional. You just need to add
+    slaves.
+
+    Options are as follows:
+    * svn_url: URL of the SVN repository
+    * http_port: where buildbot will listen as an HTTP server
+    * allowForce: allow force builds (True/False)
+    * svnuser: username to be passed to svn
+    * svnpasswd: password to be passed to svn
+    * pollinterval: interval in seconds to poll the svn repo for changes
+    * nightlyhour: run nightly builds at this hour
+    * poller: custom poller object instance to be used instead of SVNPoller
+    * makefactory:
+      * can a simple callable factory that gets the svn_url
+      * can be a dict of factories getting svn_url keyed by project name
+        * ``__default__`` is a special key, bsquare reverts to this factory
+          first when there is none for a project
+        * bsquare reverts to make_factory as last
+    * maxConcurrent: maximum number of concurrent builds
+    * svnbin: passed directly to SVNPoller (win32 seems to be picky about
+                                            svn location)
+
+    """
+    if poller is None:
+        c['change_source'] = SVNPoller(svn_url,
+                                       split_file=bsquare_split_file,
+                                       svnuser=svnuser,
+                                       svnpasswd=svnpasswd,
+                                       pollinterval=pollinterval,
+                                       svnbin=svnbin)
+    else:
+        c['change_source'] = poller
+
+    if slow_lock is None:
+        slow_lock = locks.SlaveLock("cpu", maxCount=maxConcurrent)
+
+    projects = open("project-list.cfg", "rb").readlines()
+    projects = [x.strip() for x in projects]
+
+    for project in projects:
+        if not project or project.startswith('#'):
+            continue #comment or empty line
+
+        if isinstance(makefactory, dict):
+            f = makefactory.get(project,
+                                makefactory.get('__default__', makefactory))
+            f = f(svn_url)
+        else:
+            f = makefactory(svn_url)
+
+        bname = '%s_%s' % (project, bsquare_platname)
+
+        c['builders'].append({
+            'name': bname,
+            'slavename': 'local',
+            'builddir': project,
+            'factory': f,
+            'locks': [slow_lock],
+        })
+        del f
+
+        c['schedulers'].append(Scheduler(
+            name = bname,
+            branch = "%s/trunk" % project,
+            treeStableTimer = pollinterval*2+10,
+            builderNames = [bname]))
+
+        if nightlyhour is not None:
+            c['schedulers'].append(Nightly(
+                "%s nightly" % project, [bname], hour=[nightlyhour],
+                branch="%s/trunk" % project))
+
+        c['status'].append(
+          MailNotifier(mode="failing",
+                   fromaddr=FROMADDR,
+                   extraRecipients=["agroszer at gmail.com"],
+                   sendToInterestedUsers=False,
+                   builders=[bname],
+                   messageFormatter=message_formatter)
+                   )
+
+    return c
+# stuff taken from gocept.bsquare
+######################################
+
 #let's stick with ONE test
 slow_lock = locks.SlaveLock("cpu", maxCount=1)
 
@@ -879,6 +1036,11 @@
 setup_ZODB_dev_tests(slow_lock, hour=20, minute=40)
 setup_BB_dev_tests(slow_lock, hour=20, minute=50)
 
+bsquare_configure(c,
+              'svn://svn.zope.org/repos/main/',
+              pollinterval = 300,
+              nightlyhour=None,
+              slow_lock = slow_lock)
 
 #NO proxy via apache, so it can be kicked locally at least
 c['status'].append(html.WebStatus(http_port=8009, allowForce=True, logRotateLength=100000000))

Added: zope.wineggbuilder/trunk/project-list.cfg
===================================================================
--- zope.wineggbuilder/trunk/project-list.cfg	                        (rev 0)
+++ zope.wineggbuilder/trunk/project-list.cfg	2010-11-28 13:34:21 UTC (rev 118616)
@@ -0,0 +1,150 @@
+#ZTK:
+zope.annotation
+zope.applicationcontrol
+zope.authentication
+zope.broken
+zope.browser
+zope.browsermenu
+zope.browserpage
+zope.browserresource
+zope.cachedescriptors
+zope.catalog
+zope.component
+zope.componentvocabulary
+zope.configuration
+zope.container
+zope.contentprovider
+zope.contenttype
+zope.copy
+zope.copypastemove
+zope.datetime
+zope.deferredimport
+zope.deprecation
+zope.dottedname
+zope.dublincore
+zope.error
+zope.event
+zope.exceptions
+zope.filerepresentation
+zope.formlib
+zope.hookable
+zope.i18n
+zope.i18nmessageid
+zope.index
+zope.interface
+zope.intid
+zope.keyreference
+zope.lifecycleevent
+zope.location
+zope.login
+zope.mimetype
+zope.minmax
+zope.pagetemplate
+zope.password
+zope.pluggableauth
+zope.principalannotation
+zope.principalregistry
+zope.processlifetime
+zope.proxy
+zope.ptresource
+zope.publisher
+zope.ramcache
+zope.schema
+zope.security
+zope.securitypolicy
+zope.sendmail
+zope.sequencesort
+zope.server
+zope.session
+zope.site
+zope.size
+zope.structuredtext
+zope.tal
+zope.tales
+zope.testing
+zope.testrunner
+zope.traversing
+zope.viewlet
+#zopeapp:
+zc.sourcefactory
+zope.app.applicationcontrol
+zope.app.appsetup
+zope.app.authentication
+zope.app.basicskin
+zope.app.broken
+zope.app.component
+zope.app.container
+zope.app.content
+zope.app.debug
+zope.app.dependable
+zope.app.error
+zope.app.exception
+zope.app.folder
+zope.app.form
+zope.app.generations
+zope.app.http
+zope.app.i18n
+zope.app.locales
+zope.app.localpermission
+zope.app.pagetemplate
+zope.app.principalannotation
+zope.app.publication
+zope.app.publisher
+zope.app.renderer
+zope.app.rotterdam
+zope.app.schema
+zope.app.security
+zope.app.testing
+zope.app.wsgi
+zope.app.zcmlfiles
+zope.app.zopeappgenerations
+zope.generations
+zope.testbrowser
+#my wild choices:
+z3c.authenticator
+z3c.baseregistry
+z3c.batching
+z3c.breadcrumb
+z3c.configurator
+z3c.contents
+z3c.form
+z3c.formui
+z3c.json
+z3c.jsonrpc
+z3c.jsonrpcproxy
+z3c.jsontree
+z3c.language.negotiator
+z3c.language.session
+z3c.language.switch
+z3c.layer.pagelet
+z3c.layer.ready2go
+z3c.macro
+z3c.menu.ready2go
+z3c.pagelet
+z3c.password
+z3c.pdftemplate
+z3c.ptcompat
+z3c.recipe.paster
+z3c.rml
+z3c.sampledata
+z3c.table
+z3c.tabular
+z3c.template
+z3c.testing
+z3c.viewtemplate
+z3c.xmlhttp
+z3c.zrtresource
+zc.catalog
+zc.configuration
+zc.i18n
+zc.lockfile
+zc.monitor
+zc.ngi
+zc.queue
+zc.recipe.egg
+zc.resourcelibrary
+zc.table
+
+zope.app.interface
+zope.app.server
+zope.app.session
\ No newline at end of file


Property changes on: zope.wineggbuilder/trunk/project-list.cfg
___________________________________________________________________
Added: svn:keywords
   + Date Author Id Revision
Added: svn:eol-style
   + native



More information about the checkins mailing list