From warner at users.sourceforge.net Tue Mar 18 19:56:53 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 19:56:53 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1017,1.1018 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19983 Modified Files: ChangeLog Log Message: [project @ test_vc.py: set usePTY=False, to avoid SIGHUP-based failures that I've started seein on recent debian systems] Original author: warner at lothar.com Date: 2008-03-18 19:37:00+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1017 retrieving revision 1.1018 diff -u -d -r1.1017 -r1.1018 --- ChangeLog 5 Feb 2008 21:05:34 -0000 1.1017 +++ ChangeLog 18 Mar 2008 19:56:51 -0000 1.1018 @@ -1,3 +1,11 @@ +2008-03-18 Brian Warner + + * buildbot/test/test_vc.py (VCBase.connectSlave): turn off usePTY + for all slave commands: I'm seeing 'cp' and 'rm' fail with SIGHUP, + probably when we close stdin. This happens on my debian/sid + system, but not on older unixes, so I suspect some change in + behavior in the kernel or glibc or something similar. + 2008-02-05 Brian Warner * buildbot/buildslave.py (BuildSlave._missing_timer_fired): add a From warner at users.sourceforge.net Tue Mar 18 19:56:53 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 19:56:53 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.82,1.83 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19983/buildbot/test Modified Files: test_vc.py Log Message: [project @ test_vc.py: set usePTY=False, to avoid SIGHUP-based failures that I've started seein on recent debian systems] Original author: warner at lothar.com Date: 2008-03-18 19:37:00+00:00 Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- test_vc.py 28 Nov 2007 02:49:43 -0000 1.82 +++ test_vc.py 18 Mar 2008 19:56:51 -0000 1.83 @@ -439,7 +439,7 @@ def connectSlave(self): port = self.master.slavePort._port.getHost().port slave = bot.BuildSlave("localhost", port, "bot1", "sekrit", - self.slavebase, keepalive=0, usePTY=1) + self.slavebase, keepalive=0, usePTY=False) self.slave = slave slave.startService() d = self.master.botmaster.waitUntilBuilderAttached("vc") @@ -559,11 +559,13 @@ d.addCallback(lambda res: self.loadConfig(config % 'copy')) d.addCallback(lambda res: log.msg("testing copy")) d.addCallback(self._do_vctest_copy) + d.addCallback(lambda res: log.msg("did copy test")) if self.metadir: d.addCallback(lambda res: log.msg("doing export")) d.addCallback(lambda res: self.loadConfig(config % 'export')) d.addCallback(lambda res: log.msg("testing export")) d.addCallback(self._do_vctest_export) + d.addCallback(lambda res: log.msg("did export test")) return d def _do_vctest_clobber(self, res): @@ -698,10 +700,12 @@ pass def _do_vctest_copy(self, res): + log.msg("_do_vctest_copy 1") d = self.doBuild() # copy rebuild clobbers new files d.addCallback(self._do_vctest_copy_1) return d def _do_vctest_copy_1(self, bs): + log.msg("_do_vctest_copy 2") if self.metadir: self.shouldExist(self.workdir, self.metadir) self.shouldNotExist(self.workdir, "newfile") @@ -714,6 +718,7 @@ d.addCallback(self._do_vctest_copy_2) return d def _do_vctest_copy_2(self, bs): + log.msg("_do_vctest_copy 3") if self.metadir: self.shouldExist(self.workdir, self.metadir) self.shouldNotExist(self.workdir, "newfile") From warner at users.sourceforge.net Tue Mar 18 20:06:13 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 20:06:13 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1018,1.1019 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24387 Modified Files: ChangeLog Log Message: [project @ shell.py: allow WithProperties in environment variables and workdir=. Closes #52.] Original author: warner at lothar.com Date: 2008-03-18 20:02:24+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1018 retrieving revision 1.1019 diff -u -d -r1.1018 -r1.1019 --- ChangeLog 18 Mar 2008 19:56:51 -0000 1.1018 +++ ChangeLog 18 Mar 2008 20:06:09 -0000 1.1019 @@ -1,5 +1,12 @@ 2008-03-18 Brian Warner + * buildbot/steps/shell.py (ShellCommand._interpolateProperties): + apply patch from Albert Hofkamp to allow WithProperties in + environment variables and the workdir= argument. Closes #52. + * buildbot/test/test_properties.py (Interpolate.testCustomBuildStep): + remove this test, it was pretty weird and didn't work with the + new _interpolateProperties approach. + * buildbot/test/test_vc.py (VCBase.connectSlave): turn off usePTY for all slave commands: I'm seeing 'cp' and 'rm' fail with SIGHUP, probably when we close stdin. This happens on my debian/sid From warner at users.sourceforge.net Tue Mar 18 20:06:14 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 20:06:14 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_properties.py, 1.11, 1.12 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24387/buildbot/test Modified Files: test_properties.py Log Message: [project @ shell.py: allow WithProperties in environment variables and workdir=. Closes #52.] Original author: warner at lothar.com Date: 2008-03-18 20:02:24+00:00 Index: test_properties.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_properties.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- test_properties.py 7 Aug 2007 19:21:40 -0000 1.11 +++ test_properties.py 18 Mar 2008 20:06:12 -0000 1.12 @@ -11,13 +11,6 @@ from buildbot.slave.commands import rmdirRecursive from buildbot.test.runutils import RunMixin -class MyBuildStep(ShellCommand): - def _interpolateProperties(self, command): - command = ["tar", "czf", - "build-%s.tar.gz" % self.getProperty("revision"), - "source"] - return ShellCommand._interpolateProperties(self, command) - class FakeBuild: pass @@ -92,13 +85,6 @@ self.failUnlessEqual(cmd, ["tar", "czf", "build-.tar.gz", "source"]) - def testCustomBuildStep(self): - c = MyBuildStep(workdir=dir) - c.setBuild(self.build) - cmd = c._interpolateProperties(c.command) - self.failUnlessEqual(cmd, - ["tar", "czf", "build-1234.tar.gz", "source"]) - def testSourceStamp(self): c = ShellCommand(workdir=dir, command=["touch", From warner at users.sourceforge.net Tue Mar 18 20:06:14 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 20:06:14 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.9,1.10 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24387/buildbot/steps Modified Files: shell.py Log Message: [project @ shell.py: allow WithProperties in environment variables and workdir=. Closes #52.] Original author: warner at lothar.com Date: 2008-03-18 20:02:24+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- shell.py 23 Dec 2007 08:35:31 -0000 1.9 +++ shell.py 18 Mar 2008 20:06:12 -0000 1.10 @@ -148,8 +148,7 @@ if self.description is not None: return self.description - words = self.command - # TODO: handle WithProperties here + words = self._interpolateProperties(self.command) if isinstance(words, types.StringTypes): words = words.split() if len(words) < 1: @@ -160,17 +159,35 @@ return ["'%s" % words[0], "%s'" % words[1]] return ["'%s" % words[0], "%s" % words[1], "...'"] - def _interpolateProperties(self, command): - # interpolate any build properties into our command - if not isinstance(command, (list, tuple)): - return command - command_argv = [] - for argv in command: - if isinstance(argv, WithProperties): - command_argv.append(argv.render(self.build)) - else: - command_argv.append(argv) - return command_argv + + def _interpolateProperties(self, value): + """ + Expand the L{WithProperties} objects in L{value} + """ + if isinstance(value, types.StringTypes) or \ + isinstance(value, types.BooleanType) or \ + isinstance(value, types.IntType) or \ + isinstance(value, types.FloatType): + return value + + if isinstance(value, types.ListType): + return [self._interpolateProperties(val) for val in value] + + if isinstance(value, types.TupleType): + return tuple([self._interpolateProperties(val) for val in value]) + + if isinstance(value, types.DictType): + new_dict = { } + for key, val in value.iteritems(): + new_key = self._interpolateProperties(key) + new_dict[new_key] = self._interpolateProperties(val) + return new_dict + + # To make sure we catch anything we forgot + assert isinstance(value, WithProperties), \ + "%s (%s) is not a WithProperties" % (value, type(value)) + + return value.render(self.build) def _interpolateWorkdir(self, workdir): if isinstance(workdir, WithProperties): @@ -186,7 +203,7 @@ if slaveEnv: if cmd.args['env'] is None: cmd.args['env'] = {} - cmd.args['env'].update(slaveEnv) + cmd.args['env'].update(self._interpolateProperties(slaveEnv)) # note that each RemoteShellCommand gets its own copy of the # dictionary, so we shouldn't be affecting anyone but ourselves. @@ -219,7 +236,7 @@ command = self._interpolateProperties(self.command) assert isinstance(command, (list, tuple, str)) # create the actual RemoteShellCommand instance now - kwargs = self.remote_kwargs + kwargs = self._interpolateProperties(self.remote_kwargs) kwargs['workdir'] = self._interpolateWorkdir(kwargs['workdir']) kwargs['command'] = command kwargs['logfiles'] = self.logfiles From warner at users.sourceforge.net Tue Mar 18 20:36:16 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 20:36:16 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1019,1.1020 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4939 Modified Files: ChangeLog Log Message: [project @ document the unavailability of SIGHUP (and 'buildbot reconfig') on windows. Closes #105.] Original author: warner at lothar.com Date: 2008-03-18 20:34:41+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1019 retrieving revision 1.1020 diff -u -d -r1.1019 -r1.1020 --- ChangeLog 18 Mar 2008 20:06:09 -0000 1.1019 +++ ChangeLog 18 Mar 2008 20:36:14 -0000 1.1020 @@ -1,5 +1,10 @@ 2008-03-18 Brian Warner + * docs/buildbot.texinfo (Shutdown): make it clear that 'buildbot + reconfig' (which uses SIGHUP) doesn't work on windows. Acknowledge + the occasional failures in reconfig (and suggest 'buildbot + restart' as a fallback). Closes #105. + * buildbot/steps/shell.py (ShellCommand._interpolateProperties): apply patch from Albert Hofkamp to allow WithProperties in environment variables and the workdir= argument. Closes #52. From warner at users.sourceforge.net Tue Mar 18 20:36:16 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 20:36:16 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.131,1.132 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4939/docs Modified Files: buildbot.texinfo Log Message: [project @ document the unavailability of SIGHUP (and 'buildbot reconfig') on windows. Closes #105.] Original author: warner at lothar.com Date: 2008-03-18 20:34:41+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- buildbot.texinfo 23 Dec 2007 08:35:32 -0000 1.131 +++ buildbot.texinfo 18 Mar 2008 20:36:14 -0000 1.132 @@ -1097,7 +1097,9 @@ normally. The buildmaster will respond to a @code{SIGHUP} by re-reading its -config file. The following shortcut is available: +config file. Of course, this only works on unix-like systems with +signal support, and won't work on Windows. The following shortcut is +available: @example buildbot reconfig @var{BASEDIR} @@ -1113,6 +1115,10 @@ buildbot restart @var{BASEDIR} @end example +There are certain configuration changes that are not handled cleanly +by @code{buildbot reconfig}. If this occurs, @code{buildbot restart} +is a more robust tool to fully switch over to the new configuration. + @node Maintenance, Troubleshooting, Shutdown, Installation @section Maintenance From warner at users.sourceforge.net Tue Mar 18 21:41:17 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 21:41:17 +0000 Subject: [Buildbot-commits] buildbot/buildbot buildslave.py,1.9,1.10 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32520/buildbot Modified Files: buildslave.py Log Message: [project @ buildslave-repr-bulletproof.patch] Make BuildSlave's __repr__ a bit more bulletproof; this allows, for example, pretty-printing of configuration files before the twisted reactor starts. Original author: dustin at v.igoro.us Date: 2008-02-17 01:49:36+00:00 Index: buildslave.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/buildslave.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- buildslave.py 5 Feb 2008 21:05:34 -0000 1.9 +++ buildslave.py 18 Mar 2008 21:41:15 -0000 1.10 @@ -66,9 +66,12 @@ self.max_builds = new.max_builds def __repr__(self): - builders = self.botmaster.getBuildersForSlave(self.slavename) - return "" % \ + if self.botmaster: + builders = self.botmaster.getBuildersForSlave(self.slavename) + return "" % \ (self.slavename, ','.join(map(lambda b: b.name, builders))) + else: + return "" % self.slavename def setBotmaster(self, botmaster): assert not self.botmaster, "BuildSlave already has a botmaster" From warner at users.sourceforge.net Tue Mar 18 21:41:21 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 21:41:21 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1020,1.1021 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32537 Modified Files: ChangeLog Log Message: [project @ changelog for 'Make BuildSlave's __repr__ a bit more bulletproof'] Original author: warner at lothar.com Date: 2008-03-18 21:30:12+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1020 retrieving revision 1.1021 diff -u -d -r1.1020 -r1.1021 --- ChangeLog 18 Mar 2008 20:36:14 -0000 1.1020 +++ ChangeLog 18 Mar 2008 21:41:19 -0000 1.1021 @@ -1,5 +1,10 @@ 2008-03-18 Brian Warner + * buildbot/buildslave.py (BuildSlave.__repr__): protect against + .botmaster being empty, to allow pretty-printing of configuration + files before the twisted reactor starts. Patch from Dustin + Mitchell. + * docs/buildbot.texinfo (Shutdown): make it clear that 'buildbot reconfig' (which uses SIGHUP) doesn't work on windows. Acknowledge the occasional failures in reconfig (and suggest 'buildbot From warner at users.sourceforge.net Tue Mar 18 21:41:26 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 21:41:26 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test runutils.py, 1.23, 1.24 test_run.py, 1.51, 1.52 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32551/buildbot/test Modified Files: runutils.py test_run.py Log Message: [project @ #57:testflags.patch] Patch to add 'flags' that can be set in BuildSteps? and tested for in the test harness. These are useful in determining which steps have and have not run. Original author: dustin at v.igoro.us Date: 2008-02-17 04:43:13+00:00 Index: runutils.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/runutils.py,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- runutils.py 1 Jan 2008 02:46:38 -0000 1.23 +++ runutils.py 18 Mar 2008 21:41:24 -0000 1.24 @@ -423,3 +423,45 @@ def filterArgs(self, args): # this can be overridden return args + +# ---------------------------------------- + +_flags = {} + +def setTestFlag(flagname, value): + _flags[flagname] = value + +class SetTestFlagStep(BuildStep): + """ + A special BuildStep to set a named flag; this can be used with the + TestFlagMixin to monitor what has and has not run in a particular + configuration. + """ + def __init__(self, flagname='flag', value=1, **kwargs): + BuildStep.__init__(self, **kwargs) + self.flagname = flagname + self.value = value + + def start(self): + _flags[self.flagname] = self.value + self.finished(builder.SUCCESS) + +class TestFlagMixin: + def clearFlags(self): + """ + Set up for a test by clearing all flags; call this from your test + function. + """ + _flags.clear() + + def failIfFlagSet(self, flagname, msg=None): + if not msg: msg = "flag '%s' is set" % flagname + self.failIf(_flags.has_key(flagname), msg=msg) + + def failIfFlagNotSet(self, flagname, msg=None): + if not msg: msg = "flag '%s' is not set" % flagname + self.failUnless(_flags.has_key(flagname), msg=msg) + + def getFlag(self, flagname): + self.failIfFlagNotSet(flagname, "flag '%s' not set" % flagname) + return _flags.get(flagname) Index: test_run.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_run.py,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- test_run.py 7 Aug 2007 23:51:13 -0000 1.51 +++ test_run.py 18 Mar 2008 21:41:24 -0000 1.52 @@ -10,7 +10,7 @@ from buildbot.status import builder from buildbot.process.base import BuildRequest -from buildbot.test.runutils import RunMixin, rmtree +from buildbot.test.runutils import RunMixin, TestFlagMixin, rmtree config_base = """ from buildbot.process import factory @@ -628,6 +628,43 @@ d = self.master.loadConfig(config_4_newbuilder) return d +config_test_flag = config_base + """ +from buildbot.scheduler import Scheduler +c['schedulers'] = [Scheduler('quick', None, 0.1, ['dummy'])] + +from buildbot.test.runutils import SetTestFlagStep +f3 = factory.BuildFactory([ + s(SetTestFlagStep, flagname='foo', value='bar'), + ]) + +c['builders'] = [{'name': 'dummy', 'slavename': 'bot1', + 'builddir': 'dummy', 'factory': f3}] +""" + +class TestFlag(RunMixin, TestFlagMixin, unittest.TestCase): + """Test for the TestFlag functionality in runutils""" + def testTestFlag(self): + m = self.master + m.loadConfig(config_test_flag) + m.readConfig = True + m.startService() + + c = changes.Change("bob", ["Makefile", "foo/bar.c"], "changed stuff") + m.change_svc.addChange(c) + + d = self.connectSlave() + d.addCallback(self._testTestFlag_1) + return d + + def _testTestFlag_1(self, res): + d = defer.Deferred() + reactor.callLater(0.5, d.callback, None) + d.addCallback(self._testTestFlag_2) + return d + + def _testTestFlag_2(self, res): + self.failUnlessEqual(self.getFlag('foo'), 'bar') + # TODO: test everything, from Change submission to Scheduler to Build to # Status. Use all the status types. Specifically I want to catch recurrences # of the bug where I forgot to make Waterfall inherit from StatusReceiver From warner at users.sourceforge.net Tue Mar 18 21:41:30 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 21:41:30 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1021,1.1022 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32563 Modified Files: ChangeLog Log Message: [project @ add changelog for 'Patch to add 'flags' that can be set in BuildSteps'] Original author: warner at lothar.com Date: 2008-03-18 21:36:25+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1021 retrieving revision 1.1022 diff -u -d -r1.1021 -r1.1022 --- ChangeLog 18 Mar 2008 21:41:19 -0000 1.1021 +++ ChangeLog 18 Mar 2008 21:41:28 -0000 1.1022 @@ -1,5 +1,11 @@ 2008-03-18 Brian Warner + * buildbot/test/runutils.py (SetTestFlagStep): test utility class, + adding 'flags' that can be set by specific buildsteps. This makes + it easier to write tests that detect whether certain buildsteps + have been reached or not. Patch by Dustin Mitchell. + * buildbot/test/test_run.py (TestFlag.testTestFlag): test for it. + * buildbot/buildslave.py (BuildSlave.__repr__): protect against .botmaster being empty, to allow pretty-printing of configuration files before the twisted reactor starts. Patch from Dustin From warner at users.sourceforge.net Tue Mar 18 22:25:57 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 22:25:57 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process builder.py,1.51,1.52 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18032/buildbot/process Modified Files: builder.py Log Message: [project @ #71:absolute-sourcestamps.patch] Allow sourcestamps to be made "absolute" by replacing generic "latest" sourcestamps with specific revisions. Original author: dustin at v.igoro.us Date: 2008-02-17 01:54:44+00:00 Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/builder.py,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- builder.py 7 Aug 2007 23:41:06 -0000 1.51 +++ builder.py 18 Mar 2008 22:25:55 -0000 1.52 @@ -692,7 +692,7 @@ if not bs.isFinished(): return - ss = bs.getSourceStamp() + ss = bs.getSourceStamp(absolute=True) req = base.BuildRequest(reason, ss, self.original.name) self.requestBuild(req) From warner at users.sourceforge.net Tue Mar 18 22:25:58 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 22:25:58 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status builder.py, 1.105, 1.106 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18032/buildbot/status Modified Files: builder.py Log Message: [project @ #71:absolute-sourcestamps.patch] Allow sourcestamps to be made "absolute" by replacing generic "latest" sourcestamps with specific revisions. Original author: dustin at v.igoro.us Date: 2008-02-17 01:54:44+00:00 Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v retrieving revision 1.105 retrieving revision 1.106 diff -u -d -r1.105 -r1.106 --- builder.py 1 Dec 2007 01:48:58 -0000 1.105 +++ builder.py 18 Mar 2008 22:25:55 -0000 1.106 @@ -945,8 +945,10 @@ return None return self.builder.getBuild(self.number-1) - def getSourceStamp(self): - return self.source + def getSourceStamp(self, absolute=False): + if not absolute or not self.properties.has_key('got_revision'): + return self.source + return self.source.getAbsoluteSourceStamp(self.properties['got_revision']) def getReason(self): return self.reason From warner at users.sourceforge.net Tue Mar 18 22:25:57 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 22:25:57 +0000 Subject: [Buildbot-commits] buildbot/buildbot interfaces.py, 1.64, 1.65 sourcestamp.py, 1.5, 1.6 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18032/buildbot Modified Files: interfaces.py sourcestamp.py Log Message: [project @ #71:absolute-sourcestamps.patch] Allow sourcestamps to be made "absolute" by replacing generic "latest" sourcestamps with specific revisions. Original author: dustin at v.igoro.us Date: 2008-02-17 01:54:44+00:00 Index: interfaces.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/interfaces.py,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- interfaces.py 30 Sep 2007 18:48:12 -0000 1.64 +++ interfaces.py 18 Mar 2008 22:25:55 -0000 1.65 @@ -98,6 +98,10 @@ BuildRequests. This is called by a Build when it starts, to figure out what its sourceStamp should be.""" + def getAbsoluteSourceStamp(self, got_revision): + """Get a new SourceStamp object reflecting the actual revision found + by a Source step.""" + def getText(self): """Returns a list of strings to describe the stamp. These are intended to be displayed in a narrow column. If more space is @@ -255,7 +259,11 @@ def getSourceStamp(): """Return a SourceStamp object which can be used to re-create - the source tree that this build used. + the source tree that this build used. This method will + return an absolute SourceStamp if possible, and its results + may change as the build progresses. Specifically, a "HEAD" + build may later be more accurately specified by an absolute + SourceStamp with the specific revision information. This method will return None if the source information is no longer available.""" Index: sourcestamp.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/sourcestamp.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- sourcestamp.py 1 Aug 2007 20:31:43 -0000 1.5 +++ sourcestamp.py 18 Mar 2008 22:25:55 -0000 1.6 @@ -80,6 +80,9 @@ changes=changes) return newsource + def getAbsoluteSourceStamp(self, got_revision): + return SourceStamp(branch=self.branch, revision=got_revision, patch=self.patch) + def getText(self): # TODO: this won't work for VC's with huge 'revision' strings if self.revision is None: From warner at users.sourceforge.net Tue Mar 18 22:26:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 18 Mar 2008 22:26:02 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1022,1.1023 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18057 Modified Files: ChangeLog Log Message: [project @ changelog for: Allow sourcestamps to be made 'absolute'] Original author: warner at lothar.com Date: 2008-03-18 22:21:40+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1022 retrieving revision 1.1023 diff -u -d -r1.1022 -r1.1023 --- ChangeLog 18 Mar 2008 21:41:28 -0000 1.1022 +++ ChangeLog 18 Mar 2008 22:26:00 -0000 1.1023 @@ -1,5 +1,16 @@ 2008-03-18 Brian Warner + * buildbot/interfaces.py (ISourceStamp.getAbsoluteSourceStamp): + merge patch from Dustin to add "absolute source stamps": just like + normal SourceStamp instances except that they have a .revision + attribute copied out of the got_revision property of a build. If + the input SourceStamp says .revision=None (i.e. HEAD), and the + build is done when the tree is at r1234, then the "absolute" + SourceStamp should have .revision=1234 . + * buildbot/sourcestamp.py (SourceStamp.getAbsoluteSourceStamp): same + * buildbot/status/builder.py (BuildStatus.getSourceStamp): add + absolute= argument + * buildbot/test/runutils.py (SetTestFlagStep): test utility class, adding 'flags' that can be set by specific buildsteps. This makes it easier to write tests that detect whether certain buildsteps From warner at users.sourceforge.net Thu Mar 20 17:43:10 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 17:43:10 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps trigger.py,NONE,1.1 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30892/buildbot/steps Added Files: trigger.py Log Message: [project @ #56:trigger.patch] Schedulers that can be triggered by buildsteps, allowing more fine-grained control than Dependent schedulers. Original author: dustin at v.igoro.us Date: 2008-02-17 04:49:06+00:00 --- NEW FILE: trigger.py --- from buildbot.process.buildstep import LoggingBuildStep, SUCCESS, FAILURE, EXCEPTION from buildbot.steps.shell import WithProperties from buildbot.sourcestamp import SourceStamp from buildbot.scheduler import Triggerable from twisted.internet import defer from twisted.python import log import os class Trigger(LoggingBuildStep): """ I trigger a Triggerable. It's fun. """ name = "trigger" flunkOnFailure = True def __init__(self, schedulers=[], updateSourceStamp=False, waitForFinish=False, **kwargs): """ Trigger the given schedulers when this step is executed. @var schedulers: list of schedulers' names that should be triggered. Schedulers can be specified using WithProperties, if desired. @var updateSourceStamp: should I update the source stamp to an absolute SourceStamp before triggering a new build? @var waitForFinish: should I wait for all of the triggered schedulers to finish their builds? """ assert schedulers, "You must specify a scheduler to trigger" self.schedulers = schedulers self.updateSourceStamp = updateSourceStamp self.waitForFinish = waitForFinish self.running = False LoggingBuildStep.__init__(self, **kwargs) self.addFactoryArguments(schedulers=schedulers, updateSourceStamp=updateSourceStamp, waitForFinish=waitForFinish) def interrupt(self, reason): if self.running: self.step_status.setColor("red") self.step_status.setText(["interrupted"]) def start(self): self.running = True ss = self.build.getSourceStamp() if self.updateSourceStamp: ss = ss.getAbsoluteSourceStamp(self.build.getProperty('got_revision')) # (is there an easier way to find the BuildMaster?) all_schedulers = self.build.builder.botmaster.parent.allSchedulers() all_schedulers = dict([(sch.name, sch) for sch in all_schedulers]) unknown_schedulers = [] triggered_schedulers = [] dl = [] for scheduler in self.schedulers: if isinstance(scheduler, WithProperties): scheduler = scheduler.render(self.build) if all_schedulers.has_key(scheduler): sch = all_schedulers[scheduler] if isinstance(sch, Triggerable): dl.append(sch.trigger(ss)) triggered_schedulers.append(scheduler) else: unknown_schedulers.append(scheduler) else: unknown_schedulers.append(scheduler) if unknown_schedulers: self.step_status.setColor("red") self.step_status.setText(['no scheduler:'] + unknown_schedulers) rc = FAILURE else: rc = SUCCESS self.step_status.setText(['triggered'] + triggered_schedulers) if self.waitForFinish: self.step_status.setColor("yellow") else: self.step_status.setColor("green") if self.waitForFinish: d = defer.DeferredList(dl, consumeErrors=1) else: d = defer.succeed([]) def cb(rclist): rc = SUCCESS for was_cb, buildsetstatus in rclist: # TODO: make this algo more configurable if not was_cb: rc = EXCEPTION break if buildsetstatus.getResults() == FAILURE: rc = FAILURE return self.finished(rc) def eb(why): return self.finished(FAILURE) d.addCallbacks(cb, eb) From warner at users.sourceforge.net Thu Mar 20 17:43:11 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 17:43:11 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_run.py,1.52,1.53 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30892/buildbot/test Modified Files: test_run.py Log Message: [project @ #56:trigger.patch] Schedulers that can be triggered by buildsteps, allowing more fine-grained control than Dependent schedulers. Original author: dustin at v.igoro.us Date: 2008-02-17 04:49:06+00:00 Index: test_run.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_run.py,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- test_run.py 18 Mar 2008 21:41:24 -0000 1.52 +++ test_run.py 20 Mar 2008 17:43:09 -0000 1.53 @@ -628,6 +628,77 @@ d = self.master.loadConfig(config_4_newbuilder) return d +class Triggers(RunMixin, TestFlagMixin, unittest.TestCase): + config_trigger = config_base + """ +from buildbot.scheduler import Triggerable, Scheduler +from buildbot.steps.trigger import Trigger +from buildbot.steps.dummy import Dummy +from buildbot.test.runutils import SetTestFlagStep +c['schedulers'] = [ + Scheduler('triggerer', None, 0.1, ['triggerer']), + Triggerable('triggeree', ['triggeree']) +] +triggerer = factory.BuildFactory([ + s(SetTestFlagStep, flagname='triggerer_started'), + s(Trigger, flunkOnFailure=True, @ARGS@), + s(SetTestFlagStep, flagname='triggerer_finished'), + ]) +triggeree = factory.BuildFactory([ + s(SetTestFlagStep, flagname='triggeree_started'), + s(@DUMMYCLASS@), + s(SetTestFlagStep, flagname='triggeree_finished'), + ]) +c['builders'] = [{'name': 'triggerer', 'slavename': 'bot1', + 'builddir': 'triggerer', 'factory': triggerer}, + {'name': 'triggeree', 'slavename': 'bot1', + 'builddir': 'triggeree', 'factory': triggeree}] +""" + + def mkConfig(self, args, dummyclass="Dummy"): + return self.config_trigger.replace("@ARGS@", args).replace("@DUMMYCLASS@", dummyclass) + + def setupTest(self, args, dummyclass, checkFn): + self.clearFlags() + m = self.master + m.loadConfig(self.mkConfig(args, dummyclass)) + m.readConfig = True + m.startService() + + c = changes.Change("bob", ["Makefile", "foo/bar.c"], "changed stuff") + m.change_svc.addChange(c) + + d = self.connectSlave(builders=['triggerer', 'triggeree']) + d.addCallback(self.startTimer, 0.5, checkFn) + return d + + def startTimer(self, res, time, next_fn): + d = defer.Deferred() + reactor.callLater(time, d.callback, None) + d.addCallback(next_fn) + return d + + def testTriggerBuild(self): + return self.setupTest("schedulers=['triggeree']", + "Dummy", + self._checkTriggerBuild) + + def _checkTriggerBuild(self, res): + self.failIfFlagNotSet('triggerer_started') + self.failIfFlagNotSet('triggeree_started') + self.failIfFlagSet('triggeree_finished') + self.failIfFlagNotSet('triggerer_finished') + + def testTriggerBuildWait(self): + return self.setupTest("schedulers=['triggeree'], waitForFinish=1", + "Dummy", + self._checkTriggerBuildWait) + + def _checkTriggerBuildWait(self, res): + self.failIfFlagNotSet('triggerer_started') + self.failIfFlagNotSet('triggeree_started') + self.failIfFlagSet('triggeree_finished') + self.failIfFlagSet('triggerer_finished') + config_test_flag = config_base + """ from buildbot.scheduler import Scheduler c['schedulers'] = [Scheduler('quick', None, 0.1, ['dummy'])] From warner at users.sourceforge.net Thu Mar 20 17:43:11 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 17:43:11 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.26,1.27 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30892/buildbot Modified Files: scheduler.py Log Message: [project @ #56:trigger.patch] Schedulers that can be triggered by buildsteps, allowing more fine-grained control than Dependent schedulers. Original author: dustin at v.igoro.us Date: 2008-02-17 04:49:06+00:00 Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- scheduler.py 6 Feb 2007 20:36:09 -0000 1.26 +++ scheduler.py 20 Mar 2008 17:43:08 -0000 1.27 @@ -682,3 +682,28 @@ from buildbot.status.client import makeRemote return makeRemote(bs.status) +class Triggerable(BaseUpstreamScheduler): + """ + This scheduler doesn't do anything until it is triggered by + a Trigger step in a factory. + """ + + def __init__(self, name, builderNames): + BaseUpstreamScheduler.__init__(self, name) + self.builderNames = builderNames + + def listBuilderNames(self): + return self.builderNames + + def getPendingBuildTimes(self): + return [] + + def trigger(self, ss): + """ + Trigger this scheduler. Returns a deferred that will fire when the buildset + is finished. + """ + bs = buildset.BuildSet(self.builderNames, ss) + d = bs.waitUntilFinished() + self.submit(bs) + return d From warner at users.sourceforge.net Thu Mar 20 17:43:11 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 17:43:11 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.132,1.133 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30892/docs Modified Files: buildbot.texinfo Log Message: [project @ #56:trigger.patch] Schedulers that can be triggered by buildsteps, allowing more fine-grained control than Dependent schedulers. Original author: dustin at v.igoro.us Date: 2008-02-17 04:49:06+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.132 retrieving revision 1.133 diff -u -d -r1.132 -r1.133 --- buildbot.texinfo 18 Mar 2008 20:36:14 -0000 1.132 +++ buildbot.texinfo 20 Mar 2008 17:43:09 -0000 1.133 @@ -2192,6 +2192,12 @@ scheduler is triggered. The next section (@pxref{Build Dependencies}) describes this scheduler in more detail. + at item Triggerable +This scheduler does nothing until it is triggered by a Trigger +step in another build. This facilitates a more general form of +build dependencies, as described in the next section (@pxref{Build +Dependencies}). + @item Periodic This simple scheduler just triggers a build every N seconds. @@ -2218,6 +2224,7 @@ @cindex Dependent @cindex Dependencies @slindex buildbot.scheduler.Dependent + at slindex buildbot.scheduler.Triggerable It is common to wind up with one kind of build which should only be performed if the same source code was successfully handled by some @@ -2260,6 +2267,55 @@ @code{Scheduler} @emph{instance}, not a name. This makes it impossible to create circular dependencies in the config file. +A more general way to coordinate builds is by ``triggering'' schedulers +from builds. The Triggerable waits to be triggered by a +Trigger step in another build. That step can optionally +wait for the scheduler's builds to complete. This provides two +advantages over Dependent schedulers. First, the same scheduler +can be triggered from multiple builds. Second, the ability to wait +for a Triggerable's builds to complete provides a form of +"subroutine call", where one or more builds can "call" a scheduler +to perform some work for them, perhaps on other buildslaves. + + at example +from buildbot import scheduler +from buildbot.steps import trigger +checkin = scheduler.Scheduler("checkin", None, 5*60, + ["checkin"]) +nightly = scheduler.Scheduler("nightly", ... + ["nightly"]) +mktarball = scheduler.Triggerable("mktarball", + ["mktarball"]) +build = scheduler.Triggerable("build-all-platforms", + ["build-all-platforms"]) +test = scheduler.Triggerable("distributed-test", + ["distributed-test"]) +package = scheduler.Triggerable("package-all-platforms", + ["package-all-platforms"]) +c['schedulers'] = [checkin, nightly, build, test, package] + +checkin_factory = factory.BuildFactory() +f.addStep(trigger.TriggerStep('mktarball', + schedulers=['mktarball'], + waitForFinish=1) +f.addStep(trigger.TriggerStep('build', + schedulers=['build-all-platforms'], + waitForFinish=1) +f.addStep(trigger.TriggerStep('test', + schedulers=['distributed-test'], + waitForFinish=1) + +nightly_factory = factory.BuildFactory() +f.addStep(trigger.TriggerStep('mktarball', + schedulers=['mktarball'], + waitForFinish=1) +f.addStep(trigger.TriggerStep('build', + schedulers=['build-all-platforms'], + waitForFinish=1) +f.addStep(trigger.TriggerStep('package', + schedulers=['package-all-platforms'], + waitForFinish=1) + at end example @node Setting the slaveport, Buildslave Specifiers, Listing Change Sources and Schedulers, Configuration @section Setting the slaveport @@ -3666,6 +3722,7 @@ * Simple ShellCommand Subclasses:: * Python BuildSteps:: * Transferring Files:: +* Triggering Schedulers:: * Writing New BuildSteps:: @end menu @@ -4602,7 +4659,7 @@ @end table - at node Python BuildSteps, Transferring Files, Simple ShellCommand Subclasses, Build Steps + at node Python BuildSteps, Triggering Schedulers, Simple ShellCommand Subclasses, Build Steps @subsection Python BuildSteps Here are some BuildSteps that are specifcally useful for projects @@ -4678,7 +4735,7 @@ @end example - at node Transferring Files, Writing New BuildSteps, Python BuildSteps, Build Steps + at node Transferring Files, Triggering Schedulers, Python BuildSteps, Build Steps @subsection Transferring Files @cindex File Transfer @@ -4767,7 +4824,39 @@ creation time (@pxref{Buildslave Options}). - at node Writing New BuildSteps, , Transferring Files, Build Steps + at node Triggering Schedulers, Writing New BuildSteps, Transferring Files, Build Steps + at subsection Triggering Schedulers + +The counterpart to the Triggerable described in section + at pxref{Build Dependencies} is the Trigger BuildStep. + + at example +from buildbot.steps.trigger import Trigger +f.addStep(Trigger, + schedulers=['build-prep'], + waitForFinish=1, + updateSourceStamp=1) + at end example + +The @code{schedulers=} argument lists the Triggerables +that should be triggered when this step is executed. Note that +it is possible, but not advisable, to create a cycle where a build +continually triggers itself, because the schedulers are specified +by name. + +If @code{waitForFinish} is true, then the step will not finish until +all of the builds from the triggered schedulers have finished. If this +argument is not given, then the buildstep succeeds immediately after +triggering the schedulers. + +If @code{updateSourceStamp} is true, then step updates the SourceStamp +given to the Triggerables to include @code{got_revision} +(the revision actually used in this build) as @code{revision} (the +revision to use in the triggered builds). This is useful to ensure +that all of the builds use exactly the same SourceStamp, even if +other Changes have occurred while the build was running. + + at node Writing New BuildSteps, , Triggering Schedulers, Build Steps @subsection Writing New BuildSteps While it is a good idea to keep your build process self-contained in From warner at users.sourceforge.net Thu Mar 20 17:43:16 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 17:43:16 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1023,1.1024 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30923 Modified Files: ChangeLog Log Message: [project @ add ChangeLog for Dustin's patch: 'Schedulers that can be triggered by buildsteps'. Closes #56] Original author: warner at lothar.com Date: 2008-03-19 21:44:39+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1023 retrieving revision 1.1024 diff -u -d -r1.1023 -r1.1024 --- ChangeLog 18 Mar 2008 22:26:00 -0000 1.1023 +++ ChangeLog 20 Mar 2008 17:43:13 -0000 1.1024 @@ -1,3 +1,16 @@ +2008-03-19 Brian Warner + + * buildbot/scheduler.py (Triggerable): merge Dustin's patch: add + "Triggerable" Schedulers, to start builds at specific phases of + other builds rather than in response to source code changes or + periodic timers. These phases are marked by "Trigger" steps, which + are configured with a list of Triggerable schedulers that they + should fire. Closes #56. + * buildbot/steps/trigger.py (Trigger): buildstep to match + * buildbot/test/test_run.py (Triggers): test for it + * docs/buildbot.texinfo (Build Dependencies): document it + (Triggering Schedulers): same + 2008-03-18 Brian Warner * buildbot/interfaces.py (ISourceStamp.getAbsoluteSourceStamp): From warner at users.sourceforge.net Thu Mar 20 17:43:21 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 17:43:21 +0000 Subject: [Buildbot-commits] buildbot NEWS,1.65,1.66 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30947 Modified Files: NEWS Log Message: [project @ NEWS: fix minor typo] Original author: warner at lothar.com Date: 2008-03-19 21:44:50+00:00 Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.65 retrieving revision 1.66 diff -u -d -r1.65 -r1.66 --- NEWS 21 Nov 2007 09:25:48 -0000 1.65 +++ NEWS 20 Mar 2008 17:43:19 -0000 1.66 @@ -36,7 +36,7 @@ another few releases. It is now a subclass of WebStatus which just replaces the default root URL with another copy of the /waterfall resource. -*** Compatiblity: Python-2.3 or newer, Twisted-2.0 or newer +*** Compatibility: Python-2.3 or newer, Twisted-2.0 or newer No compatiblity losses here, buildbot-0.7.6 is compatible with the same versions of python and twisted that 0.7.5 was. From warner at users.sourceforge.net Thu Mar 20 18:04:36 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:36 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1024,1.1025 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6695 Modified Files: ChangeLog Log Message: [project @ buildbot/test/runutils.py: set usePTY=False] Original author: warner at lothar.com Date: 2008-03-19 21:46:21+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1024 retrieving revision 1.1025 diff -u -d -r1.1024 -r1.1025 --- ChangeLog 20 Mar 2008 17:43:13 -0000 1.1024 +++ ChangeLog 20 Mar 2008 18:04:34 -0000 1.1025 @@ -1,5 +1,9 @@ 2008-03-19 Brian Warner + * buildbot/test/runutils.py: set usePTY=False everywhere we aren't + explicitly testing =True, to avoid SIGHUP-based failures that I + now see about 10% of the time. + * buildbot/scheduler.py (Triggerable): merge Dustin's patch: add "Triggerable" Schedulers, to start builds at specific phases of other builds rather than in response to source code changes or From warner at users.sourceforge.net Thu Mar 20 18:04:36 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:36 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test runutils.py,1.24,1.25 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6695/buildbot/test Modified Files: runutils.py Log Message: [project @ buildbot/test/runutils.py: set usePTY=False] Original author: warner at lothar.com Date: 2008-03-19 21:46:21+00:00 Index: runutils.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/runutils.py,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- runutils.py 18 Mar 2008 21:41:24 -0000 1.24 +++ runutils.py 20 Mar 2008 18:04:34 -0000 1.25 @@ -48,7 +48,7 @@ os.mkdir("slavebase-%s" % slavename) slave = MyBuildSlave("localhost", port, slavename, "sekrit", "slavebase-%s" % slavename, - keepalive=0, usePTY=1, debugOpts=opts) + keepalive=0, usePTY=False, debugOpts=opts) slave.info = {"admin": "one"} self.slaves[slavename] = slave slave.startService() @@ -84,7 +84,7 @@ os.mkdir("slavebase-bot2") # this uses bot1, really slave = MyBuildSlave("localhost", port, "bot1", "sekrit", - "slavebase-bot2", keepalive=0, usePTY=1) + "slavebase-bot2", keepalive=0, usePTY=False) slave.info = {"admin": "two"} self.slaves['bot2'] = slave slave.startService() @@ -95,7 +95,7 @@ self.rmtree("slavebase-bot1") os.mkdir("slavebase-bot1") slave = MyBuildSlave("localhost", port, "bot1", "sekrit", - "slavebase-bot1", keepalive=2, usePTY=1, + "slavebase-bot1", keepalive=2, usePTY=False, keepaliveTimeout=1) slave.info = {"admin": "one"} self.slaves['bot1'] = slave From warner at users.sourceforge.net Thu Mar 20 18:04:42 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:42 +0000 Subject: [Buildbot-commits] buildbot ChangeLog, 1.1025, 1.1026 NEWS, 1.66, 1.67 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6717 Modified Files: ChangeLog NEWS Log Message: [project @ remove deprecated freshcvsmail.py, add deprecation schedule to NEWS] Original author: warner at lothar.com Date: 2008-03-19 21:55:45+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1025 retrieving revision 1.1026 diff -u -d -r1.1025 -r1.1026 --- ChangeLog 20 Mar 2008 18:04:34 -0000 1.1025 +++ ChangeLog 20 Mar 2008 18:04:40 -0000 1.1026 @@ -1,5 +1,9 @@ 2008-03-19 Brian Warner + * NEWS: add a deprecation schedule + * buildbot/changes/freshcvsmail.py: remove this file, it was + replaced by mail.FCMaildirSource in the previous release. + * buildbot/test/runutils.py: set usePTY=False everywhere we aren't explicitly testing =True, to avoid SIGHUP-based failures that I now see about 10% of the time. Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- NEWS 20 Mar 2008 17:43:19 -0000 1.66 +++ NEWS 20 Mar 2008 18:04:40 -0000 1.67 @@ -10,6 +10,20 @@ "_all" pseudo-builder that the web pages use to allow force-build buttons that start builds on all Builders at once. +** Deprecation Schedule + +The changes.freshcvsmail change source was replaced by +changes.mail.FCMaildirSource in 0.7.6, and has been removed in 0.7.7 . + +c['sources'] (plural) was replaced by c['change_source'] (singular) in 0.7.6, +and will be removed by 0.8.0. + +c['bots'] was replaced by c['buildslaves'] in 0.7.6, and will be removed by +0.8.0 + +The html.Waterfall status target was replaced by html.WebStatus in 0.7.6, and +will be removed by 0.8.0. + * Release 0.7.6 (30 Sep 2007) From warner at users.sourceforge.net Thu Mar 20 18:04:46 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:46 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_config.py, 1.51, 1.52 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6729/buildbot/test Modified Files: test_config.py Log Message: [project @ hide-deprecations.patch] * Hide deprecation warnings in test_config; these occur because the module is intentionally testing deprecated (but still expected) behavior. Original author: dustin at zmanda.com Date: 2008-01-25 20:05:18+00:00 Index: test_config.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- test_config.py 7 Aug 2007 19:21:40 -0000 1.51 +++ test_config.py 20 Mar 2008 18:04:44 -0000 1.52 @@ -1,6 +1,6 @@ # -*- test-case-name: buildbot.test.test_config -*- -import os +import os, warnings, exceptions from twisted.trial import unittest from twisted.python import failure @@ -373,6 +373,9 @@ class ConfigTest(unittest.TestCase): def setUp(self): + # this class generates several deprecation warnings, which the user + # doesn't need to see. + warnings.simplefilter('ignore', exceptions.DeprecationWarning) self.buildmaster = BuildMaster(".") def failUnlessListsEquivalent(self, list1, list2): From warner at users.sourceforge.net Thu Mar 20 18:04:50 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:50 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1026,1.1027 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6742 Modified Files: ChangeLog Log Message: [project @ changelog for Dustin's patch: 'Hide deprecation warnings in test_config'] Original author: warner at lothar.com Date: 2008-03-19 21:58:32+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1026 retrieving revision 1.1027 diff -u -d -r1.1026 -r1.1027 --- ChangeLog 20 Mar 2008 18:04:40 -0000 1.1026 +++ ChangeLog 20 Mar 2008 18:04:48 -0000 1.1027 @@ -1,5 +1,10 @@ 2008-03-19 Brian Warner + * buildbot/test/test_config.py (ConfigTest.setUp): merge Dustin's + patch: suppress DeprecationWarnings in our tests of deprecated + features that aren't scheduled for removal quite yet. In the long + run, we'll remove the old features and the tests. + * NEWS: add a deprecation schedule * buildbot/changes/freshcvsmail.py: remove this file, it was replaced by mail.FCMaildirSource in the previous release. From warner at users.sourceforge.net Thu Mar 20 18:04:55 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:55 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web xmlrpc.py,1.2,1.3 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6755/buildbot/status/web Modified Files: xmlrpc.py Log Message: [project @ #195:xmlrpc-additions.patch] Patch by Etienne PIERRE adding XMLRPC methods getAllBuilders, getStatus, and getLastBuilds. Original author: dustin at v.igoro.us Date: 2008-02-29 15:34:17+00:00 Index: xmlrpc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/xmlrpc.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- xmlrpc.py 30 Sep 2007 18:20:56 -0000 1.2 +++ xmlrpc.py 20 Mar 2008 18:04:53 -0000 1.3 @@ -16,6 +16,70 @@ self.control = req.site.buildbot_service.getControl() return xmlrpc.XMLRPC.render(self, req) + def xmlrpc_getAllBuilders(self): + """Return a list of all builder names + """ + log.msg("getAllBuilders") + return self.status.getBuilderNames() + + def xmlrpc_getStatus(self, builder_name): + """Return the result of the last build for the given builder + """ + builder = self.status.getBuilder(builder_name) + lastbuild = builder.getBuild(-1) + return Results[lastbuild.getResults()] + + def xmlrpc_getLastBuilds(self, builder_name, num_builds): + """Return the last builds for the given builder + 'builder_name' is the name of the builder to query + 'num_builds' is the number of builds to return + + Each build is returned in the same form as xmlrpc_getAllBuildsInInterval + """ + log.msg("getLastBuilds: %s - %d" % (builder_name, num_builds)) + builder = self.status.getBuilder(builder_name) + all_builds = [] + for build_number in range(1, num_builds+1): + build = builder.getBuild(-build_number) + if not build: + break + if not build.isFinished(): + continue + (build_start, build_end) = build.getTimes() + + ss = build.getSourceStamp() + branch = ss.branch + if branch is None: + branch = "" + try: + revision = build.getProperty("got_revision") + except KeyError: + revision = "" + revision = str(revision) + + answer = (builder_name, + build.getNumber(), + build_end, + branch, + revision, + Results[build.getResults()], + build.getText(), + ) + all_builds.append((build_end, answer)) + + # now we've gotten all the builds we're interested in. Sort them by + # end time. + all_builds.sort(lambda a,b: cmp(a[0], b[0])) + # and remove the timestamps + all_builds = [t[1] for t in all_builds] + + log.msg("ready to go: %s" % (all_builds,)) + + return all_builds + + + + def xmlrpc_getAllBuildsInInterval(self, start, stop): """Return a list of builds that have completed after the 'start' timestamp and before the 'stop' timestamp. This looks at all From warner at users.sourceforge.net Thu Mar 20 18:04:59 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:59 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1027,1.1028 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6767 Modified Files: ChangeLog Log Message: [project @ changelog and minor edits for Etienne PIERRE's patch: add XMLRPC methods. Closes #195] Original author: warner at lothar.com Date: 2008-03-19 22:06:54+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1027 retrieving revision 1.1028 diff -u -d -r1.1027 -r1.1028 --- ChangeLog 20 Mar 2008 18:04:48 -0000 1.1027 +++ ChangeLog 20 Mar 2008 18:04:57 -0000 1.1028 @@ -1,5 +1,11 @@ 2008-03-19 Brian Warner + * buildbot/status/web/xmlrpc.py (XMLRPCServer.xmlrpc_getAllBuilders): + merge Etienne Pierre's patch (via Dustin): add new XMLRPC methods. + (XMLRPCServer.xmlrpc_getStatus): same + (XMLRPCServer.xmlrpc_getLastBuilds): same, returns the last N + completed builds for a given Builder + * buildbot/test/test_config.py (ConfigTest.setUp): merge Dustin's patch: suppress DeprecationWarnings in our tests of deprecated features that aren't scheduled for removal quite yet. In the long From warner at users.sourceforge.net Thu Mar 20 18:04:59 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:04:59 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web xmlrpc.py,1.3,1.4 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6767/buildbot/status/web Modified Files: xmlrpc.py Log Message: [project @ changelog and minor edits for Etienne PIERRE's patch: add XMLRPC methods. Closes #195] Original author: warner at lothar.com Date: 2008-03-19 22:06:54+00:00 Index: xmlrpc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/xmlrpc.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- xmlrpc.py 20 Mar 2008 18:04:53 -0000 1.3 +++ xmlrpc.py 20 Mar 2008 18:04:57 -0000 1.4 @@ -21,7 +21,7 @@ """ log.msg("getAllBuilders") return self.status.getBuilderNames() - + def xmlrpc_getStatus(self, builder_name): """Return the result of the last build for the given builder """ @@ -30,7 +30,7 @@ return Results[lastbuild.getResults()] def xmlrpc_getLastBuilds(self, builder_name, num_builds): - """Return the last builds for the given builder + """Return the last N completed builds for the given builder. 'builder_name' is the name of the builder to query 'num_builds' is the number of builds to return @@ -58,13 +58,13 @@ revision = str(revision) answer = (builder_name, - build.getNumber(), - build_end, - branch, - revision, - Results[build.getResults()], - build.getText(), - ) + build.getNumber(), + build_end, + branch, + revision, + Results[build.getResults()], + build.getText(), + ) all_builds.append((build_end, answer)) # now we've gotten all the builds we're interested in. Sort them by @@ -78,8 +78,6 @@ return all_builds - - def xmlrpc_getAllBuildsInInterval(self, start, stop): """Return a list of builds that have completed after the 'start' timestamp and before the 'stop' timestamp. This looks at all From warner at users.sourceforge.net Thu Mar 20 18:06:56 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:06:56 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1028,1.1029 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7544 Modified Files: ChangeLog Log Message: [project @ docs/buildbot.texinfo: fix up nodes and menus] Original author: warner at lothar.com Date: 2008-03-20 18:01:57+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1028 retrieving revision 1.1029 diff -u -d -r1.1028 -r1.1029 --- ChangeLog 20 Mar 2008 18:04:57 -0000 1.1028 +++ ChangeLog 20 Mar 2008 18:06:54 -0000 1.1029 @@ -1,3 +1,7 @@ +2008-03-20 Brian Warner + + * docs/buildbot.texinfo (Build Properties): fix up nodes+menus + 2008-03-19 Brian Warner * buildbot/status/web/xmlrpc.py (XMLRPCServer.xmlrpc_getAllBuilders): From warner at users.sourceforge.net Thu Mar 20 18:06:56 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 18:06:56 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.133,1.134 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7544/docs Modified Files: buildbot.texinfo Log Message: [project @ docs/buildbot.texinfo: fix up nodes and menus] Original author: warner at lothar.com Date: 2008-03-20 18:01:57+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.133 retrieving revision 1.134 diff -u -d -r1.133 -r1.134 --- buildbot.texinfo 20 Mar 2008 17:43:09 -0000 1.133 +++ buildbot.texinfo 20 Mar 2008 18:06:54 -0000 1.134 @@ -184,6 +184,7 @@ * Simple ShellCommand Subclasses:: * Python BuildSteps:: * Transferring Files:: +* Triggering Schedulers:: * Writing New BuildSteps:: Source Checkout @@ -3722,7 +3723,7 @@ * Simple ShellCommand Subclasses:: * Python BuildSteps:: * Transferring Files:: -* Triggering Schedulers:: +* Triggering Schedulers:: * Writing New BuildSteps:: @end menu @@ -4659,7 +4660,7 @@ @end table - at node Python BuildSteps, Triggering Schedulers, Simple ShellCommand Subclasses, Build Steps + at node Python BuildSteps, Transferring Files, Simple ShellCommand Subclasses, Build Steps @subsection Python BuildSteps Here are some BuildSteps that are specifcally useful for projects From warner at users.sourceforge.net Thu Mar 20 19:06:29 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 19:06:29 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1029,1.1030 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30945 Modified Files: ChangeLog Log Message: [project @ buildbot/steps/trigger.py: remove unused imports to hush pyflakes] Original author: warner at lothar.com Date: 2008-03-20 19:05:25+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1029 retrieving revision 1.1030 diff -u -d -r1.1029 -r1.1030 --- ChangeLog 20 Mar 2008 18:06:54 -0000 1.1029 +++ ChangeLog 20 Mar 2008 19:06:27 -0000 1.1030 @@ -1,5 +1,7 @@ 2008-03-20 Brian Warner + * buildbot/steps/trigger.py: remove unused imports to hush pyflakes + * docs/buildbot.texinfo (Build Properties): fix up nodes+menus 2008-03-19 Brian Warner From warner at users.sourceforge.net Thu Mar 20 19:06:29 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 19:06:29 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps trigger.py,1.1,1.2 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30945/buildbot/steps Modified Files: trigger.py Log Message: [project @ buildbot/steps/trigger.py: remove unused imports to hush pyflakes] Original author: warner at lothar.com Date: 2008-03-20 19:05:25+00:00 Index: trigger.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/trigger.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- trigger.py 20 Mar 2008 17:43:08 -0000 1.1 +++ trigger.py 20 Mar 2008 19:06:27 -0000 1.2 @@ -1,10 +1,7 @@ from buildbot.process.buildstep import LoggingBuildStep, SUCCESS, FAILURE, EXCEPTION from buildbot.steps.shell import WithProperties -from buildbot.sourcestamp import SourceStamp from buildbot.scheduler import Triggerable from twisted.internet import defer -from twisted.python import log -import os class Trigger(LoggingBuildStep): """ From warner at users.sourceforge.net Thu Mar 20 23:56:44 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:56:44 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.10,1.11 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15822/buildbot/steps Modified Files: shell.py Log Message: [project @ #115:Make-WithProperties-easier-to-use-internally.patch] Patch by Greg Ward : Make WithProperties easier to use internally by factoring out function render(). Original author: dustin at v.igoro.us Date: 2008-03-13 03:05:15+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- shell.py 18 Mar 2008 20:06:12 -0000 1.10 +++ shell.py 20 Mar 2008 23:56:41 -0000 1.11 @@ -39,6 +39,19 @@ s = self.fmtstring % _BuildPropertyDictionary(build) return s +def render(s, build): + """Return a string based on s and build that is suitable for use + in a running BuildStep. If s is a string, return s. If s is a + WithProperties object, return the result of s.render(build). + Otherwise, return str(s). + """ + if isinstance(s, (str, unicode)): + return s + elif isinstance(s, WithProperties): + return s.render(build) + else: + return str(s) + class ShellCommand(LoggingBuildStep): """I run a single shell command on the buildslave. I return FAILURE if the exit code of that command is non-zero, SUCCESS otherwise. To change @@ -159,40 +172,20 @@ return ["'%s" % words[0], "%s'" % words[1]] return ["'%s" % words[0], "%s" % words[1], "...'"] - - def _interpolateProperties(self, value): - """ - Expand the L{WithProperties} objects in L{value} - """ - if isinstance(value, types.StringTypes) or \ - isinstance(value, types.BooleanType) or \ - isinstance(value, types.IntType) or \ - isinstance(value, types.FloatType): - return value - - if isinstance(value, types.ListType): - return [self._interpolateProperties(val) for val in value] - - if isinstance(value, types.TupleType): - return tuple([self._interpolateProperties(val) for val in value]) - - if isinstance(value, types.DictType): - new_dict = { } - for key, val in value.iteritems(): - new_key = self._interpolateProperties(key) - new_dict[new_key] = self._interpolateProperties(val) - return new_dict - - # To make sure we catch anything we forgot - assert isinstance(value, WithProperties), \ - "%s (%s) is not a WithProperties" % (value, type(value)) - - return value.render(self.build) + def _interpolateProperties(self, command): + # interpolate any build properties into our command + if not isinstance(command, (list, tuple)): + return command + command_argv = [] + for argv in command: + if isinstance(argv, WithProperties): + command_argv.append(argv.render(self.build)) + else: + command_argv.append(argv) + return command_argv def _interpolateWorkdir(self, workdir): - if isinstance(workdir, WithProperties): - return workdir.render(self.build) - return workdir + return render(workdir, self.build) def setupEnvironment(self, cmd): # merge in anything from Build.slaveEnvironment . Earlier steps From warner at users.sourceforge.net Thu Mar 20 23:56:47 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:56:47 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.11,1.12 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15833/buildbot/steps Modified Files: shell.py Log Message: [project @ #115:Rename-_BuildPropertyDictionary-to-_BuildPropertyMap.patch] Patch by Greg Ward : Rename _BuildPropertyDictionary to _BuildPropertyMapping (because it's not actually a dict). Original author: dustin at v.igoro.us Date: 2008-03-13 03:08:58+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- shell.py 20 Mar 2008 23:56:41 -0000 1.11 +++ shell.py 20 Mar 2008 23:56:45 -0000 1.12 @@ -6,7 +6,7 @@ from buildbot.process.buildstep import LoggingBuildStep, RemoteShellCommand from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE -class _BuildPropertyDictionary: +class _BuildPropertyMapping: def __init__(self, build): self.build = build def __getitem__(self, name): @@ -36,7 +36,7 @@ strings.append(p) s = self.fmtstring % tuple(strings) else: - s = self.fmtstring % _BuildPropertyDictionary(build) + s = self.fmtstring % _BuildPropertyMapping(build) return s def render(s, build): From warner at users.sourceforge.net Thu Mar 20 23:56:51 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:56:51 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.12,1.13 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15846/buildbot/steps Modified Files: shell.py Log Message: [project @ #115:Refactor-WithProperties.render-to-use-_BuildProper.patch] Patch by Greg Ward : Refactor WithProperties.render() to use _BuildPropertyMapping more intelligently. Original author: dustin at v.igoro.us Date: 2008-03-13 03:09:57+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- shell.py 20 Mar 2008 23:56:45 -0000 1.12 +++ shell.py 20 Mar 2008 23:56:49 -0000 1.13 @@ -27,16 +27,14 @@ self.args = args def render(self, build): + pmap = _BuildPropertyMapping(build) if self.args: strings = [] for name in self.args: - p = build.getProperty(name) - if p is None: - p = "" - strings.append(p) + strings.append(pmap[name]) s = self.fmtstring % tuple(strings) else: - s = self.fmtstring % _BuildPropertyMapping(build) + s = self.fmtstring % pmap return s def render(s, build): From warner at users.sourceforge.net Thu Mar 20 23:56:56 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:56:56 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process buildstep.py,1.8,1.9 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15858/buildbot/process Modified Files: buildstep.py Log Message: [project @ #115:Move-WithProperties-and-friends.patch] Patch by Greg Ward : Move WithProperties and friends (render(), _BuildPropertyMapping) from buildbot.steps.shell to buildbot.process.buildstep. Original author: dustin at v.igoro.us Date: 2008-03-13 03:11:52+00:00 Index: buildstep.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/buildstep.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- buildstep.py 12 Aug 2007 22:22:41 -0000 1.8 +++ buildstep.py 20 Mar 2008 23:56:53 -0000 1.9 @@ -8,6 +8,7 @@ from twisted.python.failure import Failure from twisted.web.util import formatFailure +from buildbot import util from buildbot import interfaces from buildbot.status import progress from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, SKIPPED, \ @@ -1082,3 +1083,46 @@ self.step_status.setText(self.getText(cmd, results)) self.step_status.setText2(self.maybeGetText2(cmd, results)) +class _BuildPropertyMapping: + def __init__(self, build): + self.build = build + def __getitem__(self, name): + p = self.build.getProperty(name) + if p is None: + p = "" + return p + +class WithProperties(util.ComparableMixin): + """This is a marker class, used in ShellCommand's command= argument to + indicate that we want to interpolate a build property. + """ + + compare_attrs = ('fmtstring', 'args') + + def __init__(self, fmtstring, *args): + self.fmtstring = fmtstring + self.args = args + + def render(self, build): + pmap = _BuildPropertyMapping(build) + if self.args: + strings = [] + for name in self.args: + strings.append(pmap[name]) + s = self.fmtstring % tuple(strings) + else: + s = self.fmtstring % pmap + return s + +def render(s, build): + """Return a string based on s and build that is suitable for use + in a running BuildStep. If s is a string, return s. If s is a + WithProperties object, return the result of s.render(build). + Otherwise, return str(s). + """ + if isinstance(s, (str, unicode)): + return s + elif isinstance(s, WithProperties): + return s.render(build) + else: + return str(s) From warner at users.sourceforge.net Thu Mar 20 23:56:56 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:56:56 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.13,1.14 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15858/buildbot/steps Modified Files: shell.py Log Message: [project @ #115:Move-WithProperties-and-friends.patch] Patch by Greg Ward : Move WithProperties and friends (render(), _BuildPropertyMapping) from buildbot.steps.shell to buildbot.process.buildstep. Original author: dustin at v.igoro.us Date: 2008-03-13 03:11:52+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- shell.py 20 Mar 2008 23:56:49 -0000 1.13 +++ shell.py 20 Mar 2008 23:56:54 -0000 1.14 @@ -2,40 +2,11 @@ import types, re from twisted.python import log -from buildbot import util -from buildbot.process.buildstep import LoggingBuildStep, RemoteShellCommand +from buildbot.process.buildstep import LoggingBuildStep, RemoteShellCommand, render from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE -class _BuildPropertyMapping: - def __init__(self, build): - self.build = build - def __getitem__(self, name): - p = self.build.getProperty(name) - if p is None: - p = "" - return p - -class WithProperties(util.ComparableMixin): - """This is a marker class, used in ShellCommand's command= argument to - indicate that we want to interpolate a build property. - """ - - compare_attrs = ('fmtstring', 'args') - - def __init__(self, fmtstring, *args): - self.fmtstring = fmtstring - self.args = args - - def render(self, build): - pmap = _BuildPropertyMapping(build) - if self.args: - strings = [] - for name in self.args: - strings.append(pmap[name]) - s = self.fmtstring % tuple(strings) - else: - s = self.fmtstring % pmap - return s +# for existing configurations that import WithProperties from here +from buildbot.process.buildstep import WithProperties def render(s, build): """Return a string based on s and build that is suitable for use From warner at users.sourceforge.net Thu Mar 20 23:57:00 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:57:00 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.14,1.15 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15876/buildbot/steps Modified Files: shell.py Log Message: [project @ #115:Modify-ShellCommand.describe-to-use-WithProperties.patch] patch by Greg Ward : Modify ShellCommand.describe() to use WithProperties via render(). Original author: dustin at v.igoro.us Date: 2008-03-13 03:25:04+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- shell.py 20 Mar 2008 23:56:54 -0000 1.14 +++ shell.py 20 Mar 2008 23:56:58 -0000 1.15 @@ -39,9 +39,9 @@ - a command= parameter to my constructor (overrides .command) - set explicitly with my .setCommand() method (overrides both) - @ivar command: a list of argv strings (or WithProperties instances). - This will be used by start() to create a - RemoteShellCommand instance. + @ivar command: a list of renderable objects (typically strings or + WithProperties instances). This will be used by start() + to create a RemoteShellCommand instance. @ivar logfiles: a dict mapping log NAMEs to workdir-relative FILENAMEs of their corresponding logfiles. The contents of the file @@ -130,9 +130,12 @@ if self.description is not None: return self.description - words = self._interpolateProperties(self.command) + words = self.command + # TODO: handle WithProperties here if isinstance(words, types.StringTypes): words = words.split() + # render() each word to handle WithProperties objects + words = [render(word, self.build) for word in words] if len(words) < 1: return ["???"] if len(words) == 1: From warner at users.sourceforge.net Thu Mar 20 23:57:06 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:57:06 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps transfer.py,1.11,1.12 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16120/buildbot/steps Modified Files: transfer.py Log Message: [project @ #115:Second-example-of-using-render-to-make-WithPropert.patch] Patch by Greg Ward : Second example of using render() to make WithProperties easily available: apply it to source/dest filenames in FileUpload and FileDownload steps. Original author: dustin at v.igoro.us Date: 2008-03-13 03:29:37+00:00 Index: transfer.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/transfer.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- transfer.py 18 Jun 2007 02:52:49 -0000 1.11 +++ transfer.py 20 Mar 2008 23:57:04 -0000 1.12 @@ -4,7 +4,7 @@ from twisted.internet import reactor from twisted.spread import pb from twisted.python import log -from buildbot.process.buildstep import RemoteCommand, BuildStep +from buildbot.process.buildstep import RemoteCommand, BuildStep, render from buildbot.process.buildstep import SUCCESS, FAILURE from buildbot.interfaces import BuildSlaveTooOldError @@ -114,8 +114,8 @@ m = "slave is too old, does not know about uploadFile" raise BuildSlaveTooOldError(m) - source = self.slavesrc - masterdest = self.masterdest + source = render(self.slavesrc, self.build) + masterdest = render(self.masterdest, self.build) # we rely upon the fact that the buildmaster runs chdir'ed into its # basedir to make sure that relative paths in masterdest are expanded # properly. TODO: maybe pass the master's basedir all the way down @@ -128,7 +128,8 @@ self.step_status.setText(['uploading', os.path.basename(source)]) # we use maxsize to limit the amount of data on both sides - fileWriter = _FileWriter(self.masterdest, self.maxsize, self.mode) + # XXX should that be 'masterdest' or 'target'? + fileWriter = _FileWriter(masterdest, self.maxsize, self.mode) # default arguments args = { @@ -243,8 +244,8 @@ # we are currently in the buildmaster's basedir, so any non-absolute # paths will be interpreted relative to that - source = os.path.expanduser(self.mastersrc) - slavedest = self.slavedest + source = os.path.expanduser(render(self.mastersrc, self.build)) + slavedest = render(self.slavedest, self.build) log.msg("FileDownload started, from master %r to slave %r" % (source, slavedest)) @@ -267,7 +268,7 @@ # default arguments args = { - 'slavedest': self.slavedest, + 'slavedest': slavedest, 'maxsize': self.maxsize, 'reader': fileReader, 'blocksize': self.blocksize, From warner at users.sourceforge.net Thu Mar 20 23:57:11 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:57:11 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1030,1.1031 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16256 Modified Files: ChangeLog Log Message: [project @ merge in Greg Ward's WithProperties patches: changelog, fix merge conflict. Closes #115.] Original author: warner at lothar.com Date: 2008-03-20 23:55:52+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1030 retrieving revision 1.1031 diff -u -d -r1.1030 -r1.1031 --- ChangeLog 20 Mar 2008 19:06:27 -0000 1.1030 +++ ChangeLog 20 Mar 2008 23:57:09 -0000 1.1031 @@ -1,5 +1,11 @@ 2008-03-20 Brian Warner + * buildbot/steps/shell.py: merge Greg Ward's patch (via Dustin): + refactor WithProperties handling, allow WithProperties in more + places. Closes #115. + * buildbot/process/buildstep.py: same + * buildbot/steps/transfer.py: same, allow WithProperties in filenames + * buildbot/steps/trigger.py: remove unused imports to hush pyflakes * docs/buildbot.texinfo (Build Properties): fix up nodes+menus From warner at users.sourceforge.net Thu Mar 20 23:57:11 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Thu, 20 Mar 2008 23:57:11 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.15,1.16 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16256/buildbot/steps Modified Files: shell.py Log Message: [project @ merge in Greg Ward's WithProperties patches: changelog, fix merge conflict. Closes #115.] Original author: warner at lothar.com Date: 2008-03-20 23:55:52+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- shell.py 20 Mar 2008 23:56:58 -0000 1.15 +++ shell.py 20 Mar 2008 23:57:09 -0000 1.16 @@ -131,7 +131,6 @@ return self.description words = self.command - # TODO: handle WithProperties here if isinstance(words, types.StringTypes): words = words.split() # render() each word to handle WithProperties objects @@ -144,17 +143,34 @@ return ["'%s" % words[0], "%s'" % words[1]] return ["'%s" % words[0], "%s" % words[1], "...'"] - def _interpolateProperties(self, command): - # interpolate any build properties into our command - if not isinstance(command, (list, tuple)): - return command - command_argv = [] - for argv in command: - if isinstance(argv, WithProperties): - command_argv.append(argv.render(self.build)) - else: - command_argv.append(argv) - return command_argv + def _interpolateProperties(self, value): + """ + Expand the L{WithProperties} objects in L{value} + """ + if isinstance(value, types.StringTypes) or \ + isinstance(value, types.BooleanType) or \ + isinstance(value, types.IntType) or \ + isinstance(value, types.FloatType): + return value + + if isinstance(value, types.ListType): + return [self._interpolateProperties(val) for val in value] + + if isinstance(value, types.TupleType): + return tuple([self._interpolateProperties(val) for val in value]) + + if isinstance(value, types.DictType): + new_dict = { } + for key, val in value.iteritems(): + new_key = self._interpolateProperties(key) + new_dict[new_key] = self._interpolateProperties(val) + return new_dict + + # To make sure we catch anything we forgot + assert isinstance(value, WithProperties), \ + "%s (%s) is not a WithProperties" % (value, type(value)) + + return value.render(self.build) def _interpolateWorkdir(self, workdir): return render(workdir, self.build) From warner at users.sourceforge.net Fri Mar 21 00:07:04 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 00:07:04 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.92,1.93 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19820/buildbot/slave Modified Files: commands.py Log Message: [project @ #188:no-auth-cache.patch] Suggested by marcusl; add the --no-auth-cache option to svn invocations to avoid caching buildbot's credentials. Original author: dustin at v.igoro.us Date: 2008-02-17 17:48:50+00:00 Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- commands.py 1 Jan 2008 02:46:37 -0000 1.92 +++ commands.py 21 Mar 2008 00:07:02 -0000 1.93 @@ -1530,12 +1530,12 @@ d = self.builder.basedir if self.mode == "export": command = [self.vcexe, 'export', '--revision', str(revision), - '--non-interactive', + '--non-interactive', '--no-auth-cache', self.svnurl, self.srcdir] else: # mode=='clobber', or copy/update on a broken workspace command = [self.vcexe, 'checkout', '--revision', str(revision), - '--non-interactive', + '--non-interactive', '--no-auth-cache', self.svnurl, self.srcdir] c = ShellCommand(self.builder, command, d, sendRC=False, timeout=self.timeout, From warner at users.sourceforge.net Fri Mar 21 00:07:08 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 00:07:08 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1031,1.1032 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20080 Modified Files: ChangeLog Log Message: [project @ commands.SVN: merge dustin's patch, to add --no-auth-cache to svn calls. Closes #188.] Original author: warner at lothar.com Date: 2008-03-21 00:06:00+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1031 retrieving revision 1.1032 diff -u -d -r1.1031 -r1.1032 --- ChangeLog 20 Mar 2008 23:57:09 -0000 1.1031 +++ ChangeLog 21 Mar 2008 00:07:06 -0000 1.1032 @@ -1,5 +1,12 @@ 2008-03-20 Brian Warner + * buildbot/slave/commands.py (SVN.doVCFull): merge Dustin's patch: + add --no-auth-cache option to svn invocations to avoid caching + buildbot's credentials. This also helps when users run a + buildslave from their personal account, to keep the buildslave + from clobbering their manually-provided svn password. Closes #188. + (SVN.doVCUpdate): do it for 'svn update' too. + * buildbot/steps/shell.py: merge Greg Ward's patch (via Dustin): refactor WithProperties handling, allow WithProperties in more places. Closes #115. From warner at users.sourceforge.net Fri Mar 21 00:07:09 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 00:07:09 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.93,1.94 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20080/buildbot/slave Modified Files: commands.py Log Message: [project @ commands.SVN: merge dustin's patch, to add --no-auth-cache to svn calls. Closes #188.] Original author: warner at lothar.com Date: 2008-03-21 00:06:00+00:00 Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.93 retrieving revision 1.94 diff -u -d -r1.93 -r1.94 --- commands.py 21 Mar 2008 00:07:02 -0000 1.93 +++ commands.py 21 Mar 2008 00:07:06 -0000 1.94 @@ -1518,7 +1518,7 @@ # update: possible for mode in ('copy', 'update') d = os.path.join(self.builder.basedir, self.srcdir) command = [self.vcexe, 'update', '--revision', str(revision), - '--non-interactive'] + '--non-interactive', '--no-auth-cache'] c = ShellCommand(self.builder, command, d, sendRC=False, timeout=self.timeout, keepStdout=True) From warner at users.sourceforge.net Fri Mar 21 01:32:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 01:32:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_run.py,1.53,1.54 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20526/buildbot/test Modified Files: test_run.py Log Message: [project @ clean up scheduler.Triggerable and friends] Original author: warner at lothar.com Date: 2008-03-21 01:30:30+00:00 Index: test_run.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_run.py,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- test_run.py 20 Mar 2008 17:43:09 -0000 1.53 +++ test_run.py 21 Mar 2008 01:32:00 -0000 1.54 @@ -678,7 +678,7 @@ return d def testTriggerBuild(self): - return self.setupTest("schedulers=['triggeree']", + return self.setupTest("schedulerNames=['triggeree']", "Dummy", self._checkTriggerBuild) @@ -689,7 +689,7 @@ self.failIfFlagNotSet('triggerer_finished') def testTriggerBuildWait(self): - return self.setupTest("schedulers=['triggeree'], waitForFinish=1", + return self.setupTest("schedulerNames=['triggeree'], waitForFinish=1", "Dummy", self._checkTriggerBuildWait) From warner at users.sourceforge.net Fri Mar 21 01:32:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 01:32:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps trigger.py,1.2,1.3 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20526/buildbot/steps Modified Files: trigger.py Log Message: [project @ clean up scheduler.Triggerable and friends] Original author: warner at lothar.com Date: 2008-03-21 01:30:30+00:00 Index: trigger.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/trigger.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- trigger.py 20 Mar 2008 19:06:27 -0000 1.2 +++ trigger.py 21 Mar 2008 01:32:00 -0000 1.3 @@ -4,41 +4,48 @@ from twisted.internet import defer class Trigger(LoggingBuildStep): - """ - I trigger a Triggerable. It's fun. + """I trigger a scheduler.Triggerable, to use one or more Builders as if + they were a single buildstep (like a subroutine call). """ name = "trigger" flunkOnFailure = True - def __init__(self, - schedulers=[], - updateSourceStamp=False, - waitForFinish=False, - **kwargs): + def __init__(self, schedulerNames=[], updateSourceStamp=True, + waitForFinish=False, **kwargs): """ Trigger the given schedulers when this step is executed. - @var schedulers: list of schedulers' names that should be triggered. Schedulers - can be specified using WithProperties, if desired. + @param schedulerNames: A list of scheduler names that should be + triggered. Schedulers can be specified using + WithProperties, if desired. - @var updateSourceStamp: should I update the source stamp to - an absolute SourceStamp before triggering a new build? + @param updateSourceStamp: If True (the default), I will try to give + the schedulers an absolute SourceStamp for + their builds, so that a HEAD build will use + the same revision even if more changes have + occurred since my build's update step was + run. If False, I will use the original + SourceStamp unmodified. - @var waitForFinish: should I wait for all of the triggered schedulers to finish - their builds? + @param waitForFinish: If False (the default), this step will finish + as soon as I've started the triggered + schedulers. If True, I will wait until all of + the triggered schedulers have finished their + builds. """ - assert schedulers, "You must specify a scheduler to trigger" - self.schedulers = schedulers + assert schedulerNames, "You must specify a scheduler to trigger" + self.schedulerNames = schedulerNames self.updateSourceStamp = updateSourceStamp self.waitForFinish = waitForFinish self.running = False LoggingBuildStep.__init__(self, **kwargs) - self.addFactoryArguments(schedulers=schedulers, + self.addFactoryArguments(schedulerNames=schedulerNames, updateSourceStamp=updateSourceStamp, waitForFinish=waitForFinish) def interrupt(self, reason): + # TODO: this doesn't actually do anything. if self.running: self.step_status.setColor("red") self.step_status.setText(["interrupted"]) @@ -47,15 +54,22 @@ self.running = True ss = self.build.getSourceStamp() if self.updateSourceStamp: - ss = ss.getAbsoluteSourceStamp(self.build.getProperty('got_revision')) + got = None + try: + got = self.build.getProperty('got_revision') + except KeyError: + pass + if got: + ss = ss.getAbsoluteSourceStamp(got) # (is there an easier way to find the BuildMaster?) all_schedulers = self.build.builder.botmaster.parent.allSchedulers() all_schedulers = dict([(sch.name, sch) for sch in all_schedulers]) unknown_schedulers = [] triggered_schedulers = [] + # TODO: don't fire any schedulers if we discover an unknown one dl = [] - for scheduler in self.schedulers: + for scheduler in self.schedulerNames: if isinstance(scheduler, WithProperties): scheduler = scheduler.render(self.build) if all_schedulers.has_key(scheduler): @@ -85,6 +99,8 @@ else: d = defer.succeed([]) + # TODO: review this shadowed 'rc' value: can the callback modify the + # one that was defined above? def cb(rclist): rc = SUCCESS for was_cb, buildsetstatus in rclist: From warner at users.sourceforge.net Fri Mar 21 01:32:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 01:32:02 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.134,1.135 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20526/docs Modified Files: buildbot.texinfo Log Message: [project @ clean up scheduler.Triggerable and friends] Original author: warner at lothar.com Date: 2008-03-21 01:30:30+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.134 retrieving revision 1.135 diff -u -d -r1.134 -r1.135 --- buildbot.texinfo 20 Mar 2008 18:06:54 -0000 1.134 +++ buildbot.texinfo 21 Mar 2008 01:32:00 -0000 1.135 @@ -2268,54 +2268,49 @@ @code{Scheduler} @emph{instance}, not a name. This makes it impossible to create circular dependencies in the config file. -A more general way to coordinate builds is by ``triggering'' schedulers -from builds. The Triggerable waits to be triggered by a -Trigger step in another build. That step can optionally -wait for the scheduler's builds to complete. This provides two -advantages over Dependent schedulers. First, the same scheduler -can be triggered from multiple builds. Second, the ability to wait -for a Triggerable's builds to complete provides a form of -"subroutine call", where one or more builds can "call" a scheduler -to perform some work for them, perhaps on other buildslaves. +A more general way to coordinate builds is by ``triggering'' +schedulers from builds. The Triggerable waits to be triggered by a +Trigger step (@pxref{Triggering Schedulers}) in another build. That +step can optionally wait for the scheduler's builds to complete. This +provides two advantages over Dependent schedulers. First, the same +scheduler can be triggered from multiple builds. Second, the ability +to wait for a Triggerable's builds to complete provides a form of +"subroutine call", where one or more builds can "call" a scheduler to +perform some work for them, perhaps on other buildslaves. @example from buildbot import scheduler from buildbot.steps import trigger -checkin = scheduler.Scheduler("checkin", None, 5*60, - ["checkin"]) -nightly = scheduler.Scheduler("nightly", ... - ["nightly"]) + +checkin = scheduler.Scheduler("checkin", None, 5*60, ["checkin"]) +nightly = scheduler.Scheduler("nightly", ... , ["nightly"]) + mktarball = scheduler.Triggerable("mktarball", - ["mktarball"]) + ["mktarball"]) build = scheduler.Triggerable("build-all-platforms", ["build-all-platforms"]) test = scheduler.Triggerable("distributed-test", - ["distributed-test"]) + ["distributed-test"]) package = scheduler.Triggerable("package-all-platforms", - ["package-all-platforms"]) + ["package-all-platforms"]) + c['schedulers'] = [checkin, nightly, build, test, package] checkin_factory = factory.BuildFactory() -f.addStep(trigger.TriggerStep('mktarball', - schedulers=['mktarball'], - waitForFinish=1) -f.addStep(trigger.TriggerStep('build', - schedulers=['build-all-platforms'], - waitForFinish=1) -f.addStep(trigger.TriggerStep('test', - schedulers=['distributed-test'], - waitForFinish=1) +f.addStep(trigger.Trigger('mktarball', schedulers=['mktarball'], + waitForFinish=True) +f.addStep(trigger.Trigger('build', schedulers=['build-all-platforms'], + waitForFinish=True) +f.addStep(trigger.Trigger('test', schedulers=['distributed-test'], + waitForFinish=True) nightly_factory = factory.BuildFactory() -f.addStep(trigger.TriggerStep('mktarball', - schedulers=['mktarball'], - waitForFinish=1) -f.addStep(trigger.TriggerStep('build', - schedulers=['build-all-platforms'], - waitForFinish=1) -f.addStep(trigger.TriggerStep('package', - schedulers=['package-all-platforms'], - waitForFinish=1) +f.addStep(trigger.Trigger('mktarball', schedulers=['mktarball'], + waitForFinish=True) +f.addStep(trigger.Trigger('build', schedulers=['build-all-platforms'], + waitForFinish=True) +f.addStep(trigger.Trigger('package', schedulers=['package-all-platforms'], + waitForFinish=True) @end example @node Setting the slaveport, Buildslave Specifiers, Listing Change Sources and Schedulers, Configuration @@ -4833,29 +4828,29 @@ @example from buildbot.steps.trigger import Trigger -f.addStep(Trigger, - schedulers=['build-prep'], - waitForFinish=1, - updateSourceStamp=1) +f.addStep(Trigger, schedulerNames=['build-prep'], + waitForFinish=True, + updateSourceStamp=True) @end example -The @code{schedulers=} argument lists the Triggerables +The @code{schedulerNames=} argument lists the Triggerables that should be triggered when this step is executed. Note that it is possible, but not advisable, to create a cycle where a build continually triggers itself, because the schedulers are specified by name. -If @code{waitForFinish} is true, then the step will not finish until -all of the builds from the triggered schedulers have finished. If this -argument is not given, then the buildstep succeeds immediately after -triggering the schedulers. +If @code{waitForFinish} is True, then the step will not finish until +all of the builds from the triggered schedulers have finished. If this +argument is False (the default) or not given, then the buildstep +succeeds immediately after triggering the schedulers. -If @code{updateSourceStamp} is true, then step updates the SourceStamp -given to the Triggerables to include @code{got_revision} -(the revision actually used in this build) as @code{revision} (the -revision to use in the triggered builds). This is useful to ensure -that all of the builds use exactly the same SourceStamp, even if -other Changes have occurred while the build was running. +If @code{updateSourceStamp} is True (the default), then step updates +the SourceStamp given to the Triggerables to include + at code{got_revision} (the revision actually used in this build) as + at code{revision} (the revision to use in the triggered builds). This is +useful to ensure that all of the builds use exactly the same +SourceStamp, even if other Changes have occurred while the build was +running. @node Writing New BuildSteps, , Triggering Schedulers, Build Steps @subsection Writing New BuildSteps From warner at users.sourceforge.net Fri Mar 21 01:32:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 01:32:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.27,1.28 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20526/buildbot Modified Files: scheduler.py Log Message: [project @ clean up scheduler.Triggerable and friends] Original author: warner at lothar.com Date: 2008-03-21 01:30:30+00:00 Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- scheduler.py 20 Mar 2008 17:43:08 -0000 1.27 +++ scheduler.py 21 Mar 2008 01:32:00 -0000 1.28 @@ -683,9 +683,9 @@ return makeRemote(bs.status) class Triggerable(BaseUpstreamScheduler): - """ - This scheduler doesn't do anything until it is triggered by - a Trigger step in a factory. + """This scheduler doesn't do anything until it is triggered by a Trigger + step in a factory. In general, that step will not complete until all of + the builds that I fire have finished. """ def __init__(self, name, builderNames): @@ -699,9 +699,8 @@ return [] def trigger(self, ss): - """ - Trigger this scheduler. Returns a deferred that will fire when the buildset - is finished. + """Trigger this scheduler. Returns a deferred that will fire when the + buildset is finished. """ bs = buildset.BuildSet(self.builderNames, ss) d = bs.waitUntilFinished() From warner at users.sourceforge.net Fri Mar 21 01:32:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 01:32:02 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1032,1.1033 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20526 Modified Files: ChangeLog Log Message: [project @ clean up scheduler.Triggerable and friends] Original author: warner at lothar.com Date: 2008-03-21 01:30:30+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1032 retrieving revision 1.1033 diff -u -d -r1.1032 -r1.1033 --- ChangeLog 21 Mar 2008 00:07:06 -0000 1.1032 +++ ChangeLog 21 Mar 2008 01:31:59 -0000 1.1033 @@ -1,5 +1,14 @@ 2008-03-20 Brian Warner + * buildbot/scheduler.py (Triggerable): cleanup: wrap docstring + * buildbot/steps/trigger.py (Trigger): cleanup: rename schedulers= + to schedulerNames=, make updateSourceStamp=True by default, tolerate + missing got_revision property (i.e. if updateSourceStamp=True but + there was no checkout/update step run), add TODO notes for further + cleanup. + * buildbot/test/test_run.py (Triggers): update to match + * docs/buildbot.texinfo (Build Dependencies): same + * buildbot/slave/commands.py (SVN.doVCFull): merge Dustin's patch: add --no-auth-cache option to svn invocations to avoid caching buildbot's credentials. This also helps when users run a From warner at users.sourceforge.net Fri Mar 21 01:34:29 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 01:34:29 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.16,1.17 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21723/buildbot/steps Modified Files: shell.py Log Message: [project @ steps.shell: remove redundant definition of render()] Original author: warner at lothar.com Date: 2008-03-21 01:34:01+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- shell.py 20 Mar 2008 23:57:09 -0000 1.16 +++ shell.py 21 Mar 2008 01:34:27 -0000 1.17 @@ -8,19 +8,6 @@ # for existing configurations that import WithProperties from here from buildbot.process.buildstep import WithProperties -def render(s, build): - """Return a string based on s and build that is suitable for use - in a running BuildStep. If s is a string, return s. If s is a - WithProperties object, return the result of s.render(build). - Otherwise, return str(s). - """ - if isinstance(s, (str, unicode)): - return s - elif isinstance(s, WithProperties): - return s.render(build) - else: - return str(s) - class ShellCommand(LoggingBuildStep): """I run a single shell command on the buildslave. I return FAILURE if the exit code of that command is non-zero, SUCCESS otherwise. To change From warner at users.sourceforge.net Fri Mar 21 01:34:29 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 01:34:29 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1033,1.1034 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21723 Modified Files: ChangeLog Log Message: [project @ steps.shell: remove redundant definition of render()] Original author: warner at lothar.com Date: 2008-03-21 01:34:01+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1033 retrieving revision 1.1034 diff -u -d -r1.1033 -r1.1034 --- ChangeLog 21 Mar 2008 01:31:59 -0000 1.1033 +++ ChangeLog 21 Mar 2008 01:34:27 -0000 1.1034 @@ -1,5 +1,8 @@ 2008-03-20 Brian Warner + * buildbot/steps/shell.py (render): oops, remove redundant + definition that probably crept in during a merge conflict + * buildbot/scheduler.py (Triggerable): cleanup: wrap docstring * buildbot/steps/trigger.py (Trigger): cleanup: rename schedulers= to schedulerNames=, make updateSourceStamp=True by default, tolerate From warner at users.sourceforge.net Fri Mar 21 03:53:38 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 03:53:38 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py, 1.17, 1.18 transfer.py, 1.12, 1.13 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7316/buildbot/steps Modified Files: shell.py transfer.py Log Message: [project @ rename 'render' to 'render_properties', more cleanups] Original author: warner at lothar.com Date: 2008-03-21 03:52:21+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- shell.py 21 Mar 2008 01:34:27 -0000 1.17 +++ shell.py 21 Mar 2008 03:53:36 -0000 1.18 @@ -2,7 +2,8 @@ import types, re from twisted.python import log -from buildbot.process.buildstep import LoggingBuildStep, RemoteShellCommand, render +from buildbot.process.buildstep import LoggingBuildStep, RemoteShellCommand, \ + render_properties from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE # for existing configurations that import WithProperties from here @@ -121,7 +122,7 @@ if isinstance(words, types.StringTypes): words = words.split() # render() each word to handle WithProperties objects - words = [render(word, self.build) for word in words] + words = [render_properties(word, self.build) for word in words] if len(words) < 1: return ["???"] if len(words) == 1: @@ -160,7 +161,7 @@ return value.render(self.build) def _interpolateWorkdir(self, workdir): - return render(workdir, self.build) + return render_properties(workdir, self.build) def setupEnvironment(self, cmd): # merge in anything from Build.slaveEnvironment . Earlier steps Index: transfer.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/transfer.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- transfer.py 20 Mar 2008 23:57:04 -0000 1.12 +++ transfer.py 21 Mar 2008 03:53:36 -0000 1.13 @@ -4,7 +4,8 @@ from twisted.internet import reactor from twisted.spread import pb from twisted.python import log -from buildbot.process.buildstep import RemoteCommand, BuildStep, render +from buildbot.process.buildstep import RemoteCommand, BuildStep, \ + render_properties from buildbot.process.buildstep import SUCCESS, FAILURE from buildbot.interfaces import BuildSlaveTooOldError @@ -114,21 +115,20 @@ m = "slave is too old, does not know about uploadFile" raise BuildSlaveTooOldError(m) - source = render(self.slavesrc, self.build) - masterdest = render(self.masterdest, self.build) + source = render_properties(self.slavesrc, self.build) + masterdest = render_properties(self.masterdest, self.build) # we rely upon the fact that the buildmaster runs chdir'ed into its # basedir to make sure that relative paths in masterdest are expanded # properly. TODO: maybe pass the master's basedir all the way down # into the BuildStep so we can do this better. - target = os.path.expanduser(masterdest) + masterdest = os.path.expanduser(masterdest) log.msg("FileUpload started, from slave %r to master %r" - % (source, target)) + % (source, masterdest)) self.step_status.setColor('yellow') self.step_status.setText(['uploading', os.path.basename(source)]) # we use maxsize to limit the amount of data on both sides - # XXX should that be 'masterdest' or 'target'? fileWriter = _FileWriter(masterdest, self.maxsize, self.mode) # default arguments @@ -244,8 +244,9 @@ # we are currently in the buildmaster's basedir, so any non-absolute # paths will be interpreted relative to that - source = os.path.expanduser(render(self.mastersrc, self.build)) - slavedest = render(self.slavedest, self.build) + source = os.path.expanduser(render_properties(self.mastersrc, + self.build)) + slavedest = render_properties(self.slavedest, self.build) log.msg("FileDownload started, from master %r to slave %r" % (source, slavedest)) From warner at users.sourceforge.net Fri Mar 21 03:53:38 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 03:53:38 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1034,1.1035 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7316 Modified Files: ChangeLog Log Message: [project @ rename 'render' to 'render_properties', more cleanups] Original author: warner at lothar.com Date: 2008-03-21 03:52:21+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1034 retrieving revision 1.1035 diff -u -d -r1.1034 -r1.1035 --- ChangeLog 21 Mar 2008 01:34:27 -0000 1.1034 +++ ChangeLog 21 Mar 2008 03:53:35 -0000 1.1035 @@ -1,5 +1,10 @@ 2008-03-20 Brian Warner + * buildbot/process/buildstep.py (render_properties): more cleanup: + rename 'render' to 'render_properties'. + * buildbot/steps/shell.py: same + * buildbot/steps/transfer.py (FileUpload.start): same, other cleanups + * buildbot/steps/shell.py (render): oops, remove redundant definition that probably crept in during a merge conflict From warner at users.sourceforge.net Fri Mar 21 03:53:38 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 03:53:38 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process buildstep.py, 1.9, 1.10 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7316/buildbot/process Modified Files: buildstep.py Log Message: [project @ rename 'render' to 'render_properties', more cleanups] Original author: warner at lothar.com Date: 2008-03-21 03:52:21+00:00 Index: buildstep.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/buildstep.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- buildstep.py 20 Mar 2008 23:56:53 -0000 1.9 +++ buildstep.py 21 Mar 2008 03:53:36 -0000 1.10 @@ -1114,7 +1114,7 @@ s = self.fmtstring % pmap return s -def render(s, build): +def render_properties(s, build): """Return a string based on s and build that is suitable for use in a running BuildStep. If s is a string, return s. If s is a WithProperties object, return the result of s.render(build). From warner at users.sourceforge.net Fri Mar 21 04:25:33 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 04:25:33 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps shell.py,1.18,1.19 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20662/buildbot/steps Modified Files: shell.py Log Message: [project @ shell.py: tolerate None in the value, since build status display was throwing an exception] Original author: warner at lothar.com Date: 2008-03-21 04:22:52+00:00 Index: shell.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/shell.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- shell.py 21 Mar 2008 03:53:36 -0000 1.18 +++ shell.py 21 Mar 2008 04:25:31 -0000 1.19 @@ -1,6 +1,6 @@ # -*- test-case-name: buildbot.test.test_steps,buildbot.test.test_properties -*- -import types, re +import re from twisted.python import log from buildbot.process.buildstep import LoggingBuildStep, RemoteShellCommand, \ render_properties @@ -119,7 +119,7 @@ return self.description words = self.command - if isinstance(words, types.StringTypes): + if isinstance(words, (str, unicode)): words = words.split() # render() each word to handle WithProperties objects words = [render_properties(word, self.build) for word in words] @@ -135,19 +135,16 @@ """ Expand the L{WithProperties} objects in L{value} """ - if isinstance(value, types.StringTypes) or \ - isinstance(value, types.BooleanType) or \ - isinstance(value, types.IntType) or \ - isinstance(value, types.FloatType): + if isinstance(value, (str, unicode, bool, int, float, type(None))): return value - if isinstance(value, types.ListType): + if isinstance(value, list): return [self._interpolateProperties(val) for val in value] - if isinstance(value, types.TupleType): + if isinstance(value, tuple): return tuple([self._interpolateProperties(val) for val in value]) - if isinstance(value, types.DictType): + if isinstance(value, dict): new_dict = { } for key, val in value.iteritems(): new_key = self._interpolateProperties(key) From warner at users.sourceforge.net Fri Mar 21 04:25:33 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 04:25:33 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1035,1.1036 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20662 Modified Files: ChangeLog Log Message: [project @ shell.py: tolerate None in the value, since build status display was throwing an exception] Original author: warner at lothar.com Date: 2008-03-21 04:22:52+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1035 retrieving revision 1.1036 diff -u -d -r1.1035 -r1.1036 --- ChangeLog 21 Mar 2008 03:53:35 -0000 1.1035 +++ ChangeLog 21 Mar 2008 04:25:30 -0000 1.1036 @@ -3,6 +3,9 @@ * buildbot/process/buildstep.py (render_properties): more cleanup: rename 'render' to 'render_properties'. * buildbot/steps/shell.py: same + (ShellCommand._interpolateProperties): tolerate None in the value, + clean up the isinstance checks, stop using the 'types' module + * buildbot/steps/transfer.py (FileUpload.start): same, other cleanups * buildbot/steps/shell.py (render): oops, remove redundant From warner at users.sourceforge.net Fri Mar 21 04:25:37 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 04:25:37 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web waterfall.py, 1.26, 1.27 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20682/buildbot/status/web Modified Files: waterfall.py Log Message: [project @ waterfall: apply patch from Ted Mielczarek to make ETA display prettier, and make next-build-starts-in use the same format. Closes #95.] Original author: warner at lothar.com Date: 2008-03-21 04:24:47+00:00 Index: waterfall.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/waterfall.py,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- waterfall.py 22 Nov 2007 00:20:12 -0000 1.26 +++ waterfall.py 21 Mar 2008 04:25:35 -0000 1.27 @@ -20,13 +20,22 @@ # this provides the "current activity" box, just above the builder name implements(ICurrentBox) - def formatETA(self, eta): + def formatETA(self, prefix, eta): if eta is None: return [] if eta < 0: return ["Soon"] + eta_parts = [] + eta_secs = eta + if eta_secs > 3600: + eta_parts.append("%d hrs" % (eta_secs / 3600)) + eta_secs %= 3600 + if eta_secs > 60: + eta_parts.append("%d mins" % (eta_secs / 60)) + eta_secs %= 60 + eta_parts.append("%d secs" % eta_secs) abstime = time.strftime("%H:%M:%S", time.localtime(util.now()+eta)) - return ["ETA in", "%d secs" % eta, "at %s" % abstime] + return [prefix, ", ".join(eta_parts), "at %s" % abstime] def getBox(self, status): # getState() returns offline, idle, or building @@ -51,8 +60,7 @@ if builds: for b in builds: eta = b.getETA() - if eta: - text.extend(self.formatETA(eta)) + text.extend(self.formatETA("ETA in", eta)) elif state == "offline": color = "red" text = ["offline"] @@ -77,16 +85,8 @@ if pbs: text.append("%d pending" % len(pbs)) for t in upcoming: - text.extend(["next at", - time.strftime("%H:%M:%S", time.localtime(t)), - "[%d secs]" % (t - util.now()), - ]) - # TODO: the upcoming-builds box looks like: - # ['waiting', 'next at', '22:14:15', '[86 secs]'] - # while the currently-building box is reversed: - # ['building', 'ETA in', '2 secs', 'at 22:12:50'] - # consider swapping one of these to make them look the same. also - # consider leaving them reversed to make them look different. + eta = t - util.now() + text.extend(self.formatETA("next in", eta)) return Box(text, color=color, class_="Activity " + state) components.registerAdapter(CurrentBox, builder.BuilderStatus, ICurrentBox) From warner at users.sourceforge.net Fri Mar 21 04:25:37 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 21 Mar 2008 04:25:37 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1036,1.1037 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20682 Modified Files: ChangeLog Log Message: [project @ waterfall: apply patch from Ted Mielczarek to make ETA display prettier, and make next-build-starts-in use the same format. Closes #95.] Original author: warner at lothar.com Date: 2008-03-21 04:24:47+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1036 retrieving revision 1.1037 diff -u -d -r1.1036 -r1.1037 --- ChangeLog 21 Mar 2008 04:25:30 -0000 1.1036 +++ ChangeLog 21 Mar 2008 04:25:35 -0000 1.1037 @@ -1,5 +1,10 @@ 2008-03-20 Brian Warner + * buildbot/status/web/waterfall.py (CurrentBox.formatETA): apply + patch from TedMielczarek to display hours/minutes/seconds in the + ETA display. Thanks Ted! Also make 'next build starts in' box use + the same format. Closes #95. + * buildbot/process/buildstep.py (render_properties): more cleanup: rename 'render' to 'render_properties'. * buildbot/steps/shell.py: same From warner at users.sourceforge.net Sat Mar 22 19:45:35 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 19:45:35 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps python_twisted.py, 1.4, 1.5 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28682/buildbot/steps Modified Files: python_twisted.py Log Message: [project @ python_twisted.py: count doctests too. Closes #196.] Original author: warner at lothar.com Date: 2008-03-22 19:35:16+00:00 Index: python_twisted.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/python_twisted.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- python_twisted.py 18 Jun 2007 02:52:49 -0000 1.4 +++ python_twisted.py 22 Mar 2008 19:45:33 -0000 1.5 @@ -135,7 +135,7 @@ class TrialTestCaseCounter(LogLineObserver): - _line_re = re.compile(r'^([\w\.]+) \.\.\. \[([^\]]+)\]$') + _line_re = re.compile(r'^(?:Doctest: )?([\w\.]+) \.\.\. \[([^\]]+)\]$') numTests = 0 finished = False @@ -146,6 +146,8 @@ # 2.1.0: buildbot.test.test_runner.Create.testSlave ... [OK] # 2.4.0: buildbot.test.test_runner.Create.testSlave ... [OK] # Let's just handle the most recent version, since it's the easiest. + # Note that doctests create lines line this: + # Doctest: viff.field.GF ... [OK] if self.finished: return From warner at users.sourceforge.net Sat Mar 22 19:45:35 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 19:45:35 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1037,1.1038 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28682 Modified Files: ChangeLog Log Message: [project @ python_twisted.py: count doctests too. Closes #196.] Original author: warner at lothar.com Date: 2008-03-22 19:35:16+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1037 retrieving revision 1.1038 diff -u -d -r1.1037 -r1.1038 --- ChangeLog 21 Mar 2008 04:25:35 -0000 1.1037 +++ ChangeLog 22 Mar 2008 19:45:33 -0000 1.1038 @@ -1,3 +1,9 @@ +2008-03-22 Brian Warner + + * buildbot/steps/python_twisted.py (TrialTestCaseCounter): modify + regexp to count "Doctest:" lines as well as normal tests. Thanks to + Martin Geisler for the patch. Closes #196. + 2008-03-20 Brian Warner * buildbot/status/web/waterfall.py (CurrentBox.formatETA): apply From warner at users.sourceforge.net Sat Mar 22 22:14:14 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:14 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.83,1.84 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20427/buildbot/test Modified Files: test_vc.py Log Message: [project @ test_vc.Mercurial: wait for 'hg serve' to get running before starting the test] Original author: warner at lothar.com Date: 2008-03-22 21:51:14+00:00 Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- test_vc.py 18 Mar 2008 19:56:51 -0000 1.83 +++ test_vc.py 22 Mar 2008 22:14:12 -0000 1.84 @@ -5,9 +5,10 @@ from cStringIO import StringIO from twisted.trial import unittest -from twisted.internet import defer, reactor, utils, protocol, error +from twisted.internet import defer, reactor, utils, protocol, task, error from twisted.python import failure from twisted.python.procutils import which +from twisted.web import client #defer.Deferred.debug = True @@ -2445,7 +2446,6 @@ class MercurialServerPP(protocol.ProcessProtocol): def outReceived(self, data): - #print "HG-SERVE-STDOUT:", data log.msg("hg-serve-stdout: %s" % (data,)) def errReceived(self, data): print "HG-SERVE-STDERR:", data @@ -2460,6 +2460,7 @@ vctype_try = "hg" has_got_revision = True _hg_server = None + _wait_for_server_poller = None def testCheckout(self): self.helper.vcargs = { 'repourl': self.helper.rep_trunk } @@ -2495,15 +2496,37 @@ self.httpPort = 8300 + (os.getpid() % 200) args = [self.helper.vcexe, "serve", "--port", str(self.httpPort), "--verbose"] + + # in addition, hg doesn't flush its stdout, so we can't wait for the + # "listening at" message to know when it's safe to start the test. + # Instead, poll every second until a getPage works. + pp = MercurialServerPP() # logs+discards everything # this serves one tree at a time, so we serve trunk. TODO: test hg's # in-repo branches, for which a single tree will hold all branches. self._hg_server = reactor.spawnProcess(pp, self.helper.vcexe, args, os.environ, self.helper.rep_trunk) - time.sleep(1) # give it a moment to get started + log.msg("waiting for hg serve to start") + done_d = defer.Deferred() + def poll(): + d = client.getPage("http://localhost:%d/" % self.httpPort) + def success(res): + log.msg("hg serve appears to have started") + self._wait_for_server_poller.stop() + done_d.callback(None) + def ignore_connection_refused(f): + f.trap(error.ConnectionRefusedError) + d.addCallbacks(success, ignore_connection_refused) + d.addErrback(done_d.errback) + self._wait_for_server_poller = task.LoopingCall(poll) + self._wait_for_server_poller.start(0.5, True) + return done_d def tearDown(self): + if self._wait_for_server_poller: + if self._wait_for_server_poller.running: + self._wait_for_server_poller.stop() if self._hg_server: try: self._hg_server.signalProcess("KILL") @@ -2513,10 +2536,12 @@ return VCBase.tearDown(self) def testCheckoutHTTP(self): - self.serveHTTP() - repourl = "http://localhost:%d/" % self.httpPort - self.helper.vcargs = { 'repourl': repourl } - d = self.do_vctest(testRetry=False) + d = self.serveHTTP() + def _started(res): + repourl = "http://localhost:%d/" % self.httpPort + self.helper.vcargs = { 'repourl': repourl } + return self.do_vctest(testRetry=False) + d.addCallback(_started) return d def testTry(self): From warner at users.sourceforge.net Sat Mar 22 22:14:14 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:14 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1038,1.1039 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20427 Modified Files: ChangeLog Log Message: [project @ test_vc.Mercurial: wait for 'hg serve' to get running before starting the test] Original author: warner at lothar.com Date: 2008-03-22 21:51:14+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1038 retrieving revision 1.1039 diff -u -d -r1.1038 -r1.1039 --- ChangeLog 22 Mar 2008 19:45:33 -0000 1.1038 +++ ChangeLog 22 Mar 2008 22:14:11 -0000 1.1039 @@ -1,5 +1,13 @@ 2008-03-22 Brian Warner + * buildbot/test/test_vc.py (Mercurial.serveHTTP): wait for the 'hg + serve' command to be ready, by polling with twisted.web's + client.getPage . Unfortunately mercurial doesn't flush its stdout + at startup, so we can't just wait for the 'listening at..' line to + be printed. This should fix the sporadic "connection refused" test + failures I've seen on the metabuildbot when the buildslave is + overloaded and 'hg serve' takes a while to start up. + * buildbot/steps/python_twisted.py (TrialTestCaseCounter): modify regexp to count "Doctest:" lines as well as normal tests. Thanks to Martin Geisler for the patch. Closes #196. From warner at users.sourceforge.net Sat Mar 22 22:14:19 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:19 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test runutils.py, 1.25, 1.26 test_vc.py, 1.84, 1.85 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20447/buildbot/test Modified Files: runutils.py test_vc.py Log Message: [project @ hush some pyflakes warnings, factor support code into test/runutils.py] Original author: warner at lothar.com Date: 2008-03-22 21:58:02+00:00 Index: runutils.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/runutils.py,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- runutils.py 20 Mar 2008 18:04:34 -0000 1.25 +++ runutils.py 22 Mar 2008 22:14:16 -0000 1.26 @@ -1,7 +1,8 @@ import signal import shutil, os, errno -from twisted.internet import defer, reactor +from cStringIO import StringIO +from twisted.internet import defer, reactor, protocol from twisted.python import log, util from buildbot import master, interfaces @@ -13,6 +14,42 @@ from buildbot.sourcestamp import SourceStamp from buildbot.status import builder + + +class _PutEverythingGetter(protocol.ProcessProtocol): + def __init__(self, deferred, stdin): + self.deferred = deferred + self.outBuf = StringIO() + self.errBuf = StringIO() + self.outReceived = self.outBuf.write + self.errReceived = self.errBuf.write + self.stdin = stdin + + def connectionMade(self): + if self.stdin is not None: + self.transport.write(self.stdin) + self.transport.closeStdin() + + def processEnded(self, reason): + out = self.outBuf.getvalue() + err = self.errBuf.getvalue() + e = reason.value + code = e.exitCode + if e.signal: + self.deferred.errback((out, err, e.signal)) + else: + self.deferred.callback((out, err, code)) + +def myGetProcessOutputAndValue(executable, args=(), env={}, path='.', + _reactor_ignored=None, stdin=None): + """Like twisted.internet.utils.getProcessOutputAndValue but takes + stdin, too.""" + d = defer.Deferred() + p = _PutEverythingGetter(d, stdin) + reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path) + return d + + class MyBot(bot.Bot): def remote_getSlaveInfo(self): return self.parent.info Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- test_vc.py 22 Mar 2008 22:14:12 -0000 1.84 +++ test_vc.py 22 Mar 2008 22:14:16 -0000 1.85 @@ -2,13 +2,12 @@ import sys, os, time, re from email.Utils import mktime_tz, parsedate_tz -from cStringIO import StringIO from twisted.trial import unittest from twisted.internet import defer, reactor, utils, protocol, task, error from twisted.python import failure from twisted.python.procutils import which -from twisted.web import client +from twisted.web import client, static, server #defer.Deferred.debug = True @@ -24,7 +23,7 @@ from buildbot.changes import changes from buildbot.sourcestamp import SourceStamp from buildbot.scripts import tryclient -from buildbot.test.runutils import SignalMixin +from buildbot.test.runutils import SignalMixin, myGetProcessOutputAndValue #step.LoggedRemoteCommand.debug = True @@ -53,41 +52,6 @@ # use a predetermined Internet-domain port number, unless we want to go # all-out: bind the listen socket ourselves and pretend to be inetd. -class _PutEverythingGetter(protocol.ProcessProtocol): - def __init__(self, deferred, stdin): - self.deferred = deferred - self.outBuf = StringIO() - self.errBuf = StringIO() - self.outReceived = self.outBuf.write - self.errReceived = self.errBuf.write - self.stdin = stdin - - def connectionMade(self): - if self.stdin is not None: - self.transport.write(self.stdin) - self.transport.closeStdin() - - def processEnded(self, reason): - out = self.outBuf.getvalue() - err = self.errBuf.getvalue() - e = reason.value - code = e.exitCode - if e.signal: - self.deferred.errback((out, err, e.signal)) - else: - self.deferred.callback((out, err, code)) - -def myGetProcessOutputAndValue(executable, args=(), env={}, path='.', - reactor=None, stdin=None): - """Like twisted.internet.utils.getProcessOutputAndValue but takes - stdin, too.""" - if reactor is None: - from twisted.internet import reactor - d = defer.Deferred() - p = _PutEverythingGetter(d, stdin) - reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path) - return d - config_vc = """ from buildbot.process import factory from buildbot.steps import source @@ -460,8 +424,6 @@ def serveHTTP(self): # launch an HTTP server to serve the repository files - from twisted.web import static, server - from twisted.internet import reactor self.root = static.File(self.helper.repbase) self.site = server.Site(self.root) self.httpServer = reactor.listenTCP(0, self.site) From warner at users.sourceforge.net Sat Mar 22 22:14:18 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:18 +0000 Subject: [Buildbot-commits] buildbot ChangeLog, 1.1039, 1.1040 Makefile, 1.22, 1.23 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20447 Modified Files: ChangeLog Makefile Log Message: [project @ hush some pyflakes warnings, factor support code into test/runutils.py] Original author: warner at lothar.com Date: 2008-03-22 21:58:02+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1039 retrieving revision 1.1040 diff -u -d -r1.1039 -r1.1040 --- ChangeLog 22 Mar 2008 22:14:11 -0000 1.1039 +++ ChangeLog 22 Mar 2008 22:14:16 -0000 1.1040 @@ -1,5 +1,10 @@ 2008-03-22 Brian Warner + * Makefile (pyflakes): sort+uniqify, since newer pyflakes isn't + smart enough to do this on its own + * buildbot/test/runutils.py (myGetProcessOutputAndValue): move this + method out from test_vc.py, hush pyflakes complaints + * buildbot/test/test_vc.py (Mercurial.serveHTTP): wait for the 'hg serve' command to be ready, by polling with twisted.web's client.getPage . Unfortunately mercurial doesn't flush its stdout Index: Makefile =================================================================== RCS file: /cvsroot/buildbot/buildbot/Makefile,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- Makefile 27 Jan 2007 21:14:12 -0000 1.22 +++ Makefile 22 Mar 2008 22:14:16 -0000 1.23 @@ -54,4 +54,5 @@ FLAKES=buildbot pyflakes: - pyflakes $(FLAKES) + pyflakes $(FLAKES) |sort |uniq + From warner at users.sourceforge.net Sat Mar 22 22:14:23 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:23 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1040,1.1041 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20469 Modified Files: ChangeLog Log Message: [project @ test_run.py: pyflakes caught an old cut-and-paste error.. fix it] Original author: warner at lothar.com Date: 2008-03-22 22:00:20+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1040 retrieving revision 1.1041 diff -u -d -r1.1040 -r1.1041 --- ChangeLog 22 Mar 2008 22:14:16 -0000 1.1040 +++ ChangeLog 22 Mar 2008 22:14:21 -0000 1.1041 @@ -1,5 +1,8 @@ 2008-03-22 Brian Warner + * buildbot/test/test_run.py (Disconnect.testBuild2): fix old + cut-and-paste typo that was causing us to run the wrong callback + * Makefile (pyflakes): sort+uniqify, since newer pyflakes isn't smart enough to do this on its own * buildbot/test/runutils.py (myGetProcessOutputAndValue): move this From warner at users.sourceforge.net Sat Mar 22 22:14:23 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:23 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_run.py,1.54,1.55 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20469/buildbot/test Modified Files: test_run.py Log Message: [project @ test_run.py: pyflakes caught an old cut-and-paste error.. fix it] Original author: warner at lothar.com Date: 2008-03-22 22:00:20+00:00 Index: test_run.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_run.py,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- test_run.py 21 Mar 2008 01:32:00 -0000 1.54 +++ test_run.py 22 Mar 2008 22:14:21 -0000 1.55 @@ -370,11 +370,11 @@ def testBuild2(self): # this next sequence is timing-dependent d = self.submitBuild() - d.addCallback(self._testBuild1_1) + d.addCallback(self._testBuild2_1) return d testBuild2.timeout = 30 - def _testBuild1_1(self, bc): + def _testBuild2_1(self, bc): bs = bc.getStatus() # shutdown the slave while it's running the first step reactor.callLater(0.5, self.shutdownAllSlaves) From warner at users.sourceforge.net Sat Mar 22 22:14:30 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:30 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_web.py,1.52,1.53 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20486/buildbot/test Modified Files: test_web.py Log Message: [project @ test_web.py: hush some pyflakes warnings] Original author: warner at lothar.com Date: 2008-03-22 22:02:48+00:00 Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- test_web.py 22 Nov 2007 00:20:12 -0000 1.52 +++ test_web.py 22 Mar 2008 22:14:25 -0000 1.53 @@ -362,14 +362,14 @@ def _testMissingBase_1(self, res): s = self.status self.assertNoURL(s) - builder = s.getBuilder("b1") - self.assertNoURL(builder) + builder_s = s.getBuilder("b1") + self.assertNoURL(builder_s) def testBase(self): s = self.status self.assertURLEqual(s, "") - builder = s.getBuilder("b1") - self.assertURLEqual(builder, "builders/b1") + builder_s = s.getBuilder("b1") + self.assertURLEqual(builder_s, "builders/b1") def testChange(self): s = self.status @@ -389,11 +389,11 @@ def _testBuild_1(self, res): s = self.status - builder = s.getBuilder("b1") - build = builder.getLastFinishedBuild() - self.assertURLEqual(build, "builders/b1/builds/0") + builder_s = s.getBuilder("b1") + build_s = builder_s.getLastFinishedBuild() + self.assertURLEqual(build_s, "builders/b1/builds/0") # no page for builder.getEvent(-1) - step = build.getSteps()[0] + step = build_s.getSteps()[0] self.assertURLEqual(step, "builders/b1/builds/0/steps/remote%20dummy") # maybe page for build.getTestResults? self.assertURLEqual(step.getLogs()[0], From warner at users.sourceforge.net Sat Mar 22 22:14:27 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:14:27 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1041,1.1042 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20486 Modified Files: ChangeLog Log Message: [project @ test_web.py: hush some pyflakes warnings] Original author: warner at lothar.com Date: 2008-03-22 22:02:48+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1041 retrieving revision 1.1042 diff -u -d -r1.1041 -r1.1042 --- ChangeLog 22 Mar 2008 22:14:21 -0000 1.1041 +++ ChangeLog 22 Mar 2008 22:14:25 -0000 1.1042 @@ -1,5 +1,8 @@ 2008-03-22 Brian Warner + * buildbot/test/test_web.py: fix some pyflakes warnings, caused by + having a variable name shadow a top-level import + * buildbot/test/test_run.py (Disconnect.testBuild2): fix old cut-and-paste typo that was causing us to run the wrong callback From warner at users.sourceforge.net Sat Mar 22 22:15:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:15:02 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps source.py,1.10,1.11 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20511/buildbot/steps Modified Files: source.py Log Message: [project @ source.py: hush pyflakes variable-shadows-import warning] Original author: warner at lothar.com Date: 2008-03-22 22:04:35+00:00 Index: source.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/source.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- source.py 22 Nov 2007 01:04:34 -0000 1.10 +++ source.py 22 Mar 2008 22:15:00 -0000 1.11 @@ -1,6 +1,6 @@ # -*- test-case-name: buildbot.test.test_vc -*- -import warnings +from warnings import warn from email.Utils import formatdate from twisted.python import log from buildbot.process.buildstep import LoggingBuildStep, LoggedRemoteCommand @@ -376,8 +376,7 @@ if not kwargs.has_key('workdir') and directory is not None: # deal with old configs - warnings.warn("Please use workdir=, not directory=", - DeprecationWarning) + warn("Please use workdir=, not directory=", DeprecationWarning) kwargs['workdir'] = directory self.svnurl = svnurl From warner at users.sourceforge.net Sat Mar 22 22:15:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:15:02 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1042,1.1043 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20511 Modified Files: ChangeLog Log Message: [project @ source.py: hush pyflakes variable-shadows-import warning] Original author: warner at lothar.com Date: 2008-03-22 22:04:35+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1042 retrieving revision 1.1043 diff -u -d -r1.1042 -r1.1043 --- ChangeLog 22 Mar 2008 22:14:25 -0000 1.1042 +++ ChangeLog 22 Mar 2008 22:15:00 -0000 1.1043 @@ -1,5 +1,8 @@ 2008-03-22 Brian Warner + * buildbot/steps/source.py (SVN.__init__): fix pyflakes: it + doesn't like a variable named 'warnings' that shadows the import + * buildbot/test/test_web.py: fix some pyflakes warnings, caused by having a variable name shadow a top-level import From warner at users.sourceforge.net Sat Mar 22 22:15:07 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:15:07 +0000 Subject: [Buildbot-commits] buildbot/buildbot locks.py,1.5,1.6 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20798/buildbot Modified Files: locks.py Log Message: [project @ locks.py: hush pyflakes] Original author: warner at lothar.com Date: 2008-03-22 22:06:59+00:00 Index: locks.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/locks.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- locks.py 24 Aug 2006 10:05:16 -0000 1.5 +++ locks.py 22 Mar 2008 22:15:05 -0000 1.6 @@ -5,11 +5,9 @@ from buildbot import util if False: # for debugging - def debuglog(msg): - log.msg(msg) + debuglog = log.msg else: - def debuglog(msg): - pass + debuglog = lambda m: None class BaseLock: description = "" From warner at users.sourceforge.net Sat Mar 22 22:15:07 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:15:07 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1043,1.1044 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20798 Modified Files: ChangeLog Log Message: [project @ locks.py: hush pyflakes] Original author: warner at lothar.com Date: 2008-03-22 22:06:59+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1043 retrieving revision 1.1044 diff -u -d -r1.1043 -r1.1044 --- ChangeLog 22 Mar 2008 22:15:00 -0000 1.1043 +++ ChangeLog 22 Mar 2008 22:15:05 -0000 1.1044 @@ -1,5 +1,7 @@ 2008-03-22 Brian Warner + * buildbot/locks.py (debuglog): hush pyflakes + * buildbot/steps/source.py (SVN.__init__): fix pyflakes: it doesn't like a variable named 'warnings' that shadows the import From warner at users.sourceforge.net Sat Mar 22 22:15:12 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:15:12 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status client.py, 1.30, 1.31 mail.py, 1.36, 1.37 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20913/buildbot/status Modified Files: client.py mail.py Log Message: [project @ hush more pyflakes: log.msg vs other uses of a variable named 'log'] Original author: warner at lothar.com Date: 2008-03-22 22:12:31+00:00 Index: client.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/client.py,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- client.py 1 Nov 2007 08:27:20 -0000 1.30 +++ client.py 22 Mar 2008 22:15:10 -0000 1.31 @@ -1,7 +1,7 @@ # -*- test-case-name: buildbot.test.test_status -*- from twisted.spread import pb -from twisted.python import log, components +from twisted.python import components, log as twlog from twisted.internet import reactor from twisted.application import strports from twisted.cred import portal, checkers @@ -361,17 +361,17 @@ return d def attached(self, mind): - #log.msg("StatusClientPerspective.attached") + #twlog.msg("StatusClientPerspective.attached") return self def detached(self, mind): - log.msg("PB client detached") + twlog.msg("PB client detached") self.client = None for name in self.subscribed_to_builders: - log.msg(" unsubscribing from Builder(%s)" % name) + twlog.msg(" unsubscribing from Builder(%s)" % name) self.status.getBuilder(name).unsubscribe(self) for s in self.subscribed_to: - log.msg(" unsubscribe from %s" % s) + twlog.msg(" unsubscribe from %s" % s) s.unsubscribe(self) self.subscribed = None @@ -397,7 +397,7 @@ assert mode in ("builders", "builds", "steps", "logs", "full") assert target - log.msg("PB subscribe(%s)" % mode) + twlog.msg("PB subscribe(%s)" % mode) self.client = target self.subscribed = mode @@ -409,7 +409,7 @@ return None def perspective_unsubscribe(self): - log.msg("PB unsubscribe") + twlog.msg("PB unsubscribe") self.status.unsubscribe(self) self.subscribed_to.remove(self.status) self.client = None Index: mail.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- mail.py 1 Aug 2007 20:31:43 -0000 1.36 +++ mail.py 22 Mar 2008 22:15:10 -0000 1.37 @@ -15,7 +15,7 @@ from zope.interface import implements from twisted.internet import defer from twisted.mail.smtp import sendmail -from twisted.python import log +from twisted.python import log as twlog from buildbot import interfaces, util from buildbot.status import base @@ -153,7 +153,7 @@ # you should either limit on builders or categories, not both if self.builders != None and self.categories != None: - log.err("Please specify only builders to ignore or categories to include") + twlog.err("Please specify only builders to ignore or categories to include") raise # FIXME: the asserts above do not raise some Exception either def setServiceParent(self, parent): @@ -292,10 +292,10 @@ if patch or self.addLogs: haveAttachments = True if not canDoAttachments: - log.msg("warning: I want to send mail with attachments, " - "but this python is too old to have " - "email.MIMEMultipart . Please upgrade to python-2.3 " - "or newer to enable addLogs=True") + twlog.msg("warning: I want to send mail with attachments, " + "but this python is too old to have " + "email.MIMEMultipart . Please upgrade to python-2.3 " + "or newer to enable addLogs=True") if haveAttachments and canDoAttachments: m = MIMEMultipart() @@ -350,7 +350,7 @@ def sendMessage(self, m, recipients): s = m.as_string() ds = [] - log.msg("sending mail (%d bytes) to" % len(s), recipients) + twlog.msg("sending mail (%d bytes) to" % len(s), recipients) for recip in recipients: ds.append(sendmail(self.relayhost, self.fromaddr, recip, s)) return defer.DeferredList(ds) From warner at users.sourceforge.net Sat Mar 22 22:15:12 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:15:12 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1044,1.1045 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20913 Modified Files: ChangeLog Log Message: [project @ hush more pyflakes: log.msg vs other uses of a variable named 'log'] Original author: warner at lothar.com Date: 2008-03-22 22:12:31+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1044 retrieving revision 1.1045 diff -u -d -r1.1044 -r1.1045 --- ChangeLog 22 Mar 2008 22:15:05 -0000 1.1044 +++ ChangeLog 22 Mar 2008 22:15:10 -0000 1.1045 @@ -1,5 +1,8 @@ 2008-03-22 Brian Warner + * buildbot/status/client.py: hush pyflakes, log.msg vs log + * buildbot/status/mail.py: same + * buildbot/locks.py (debuglog): hush pyflakes * buildbot/steps/source.py (SVN.__init__): fix pyflakes: it From warner at users.sourceforge.net Sat Mar 22 22:50:36 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:50:36 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.94,1.95 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv367/buildbot/slave Modified Files: commands.py Log Message: [project @ slave/commands.py: log more information about stdin and PTYs to the 'headers' section] Original author: warner at lothar.com Date: 2008-03-22 22:49:21+00:00 Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- commands.py 21 Mar 2008 00:07:06 -0000 1.94 +++ commands.py 22 Mar 2008 22:50:34 -0000 1.95 @@ -377,6 +377,22 @@ log.msg(" environment: %s" % (self.environ,)) self.sendStatus({'header': msg}) + if self.initialStdin: + msg = " writing %d bytes to stdin" % len(self.initialStdin) + log.msg(" " + msg) + self.sendStatus({'header': msg+"\n"}) + + if self.keepStdinOpen: + msg = " leaving stdin open" + else: + msg = " closing stdin" + log.msg(" " + msg) + self.sendStatus({'header': msg+"\n"}) + + msg = " using PTY: %s" % bool(self.usePTY) + log.msg(" " + msg) + self.sendStatus({'header': msg+"\n"}) + # this will be buffered until connectionMade is called if self.initialStdin: self.pp.writeStdin(self.initialStdin) From warner at users.sourceforge.net Sat Mar 22 22:50:36 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 22 Mar 2008 22:50:36 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1045,1.1046 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv367 Modified Files: ChangeLog Log Message: [project @ slave/commands.py: log more information about stdin and PTYs to the 'headers' section] Original author: warner at lothar.com Date: 2008-03-22 22:49:21+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1045 retrieving revision 1.1046 diff -u -d -r1.1045 -r1.1046 --- ChangeLog 22 Mar 2008 22:15:10 -0000 1.1045 +++ ChangeLog 22 Mar 2008 22:50:34 -0000 1.1046 @@ -1,5 +1,12 @@ 2008-03-22 Brian Warner + * buildbot/slave/commands.py (ShellCommand): record more + information in the 'header' section: how much we write into stdin, + do we close stdin, are we using a PTY. There are lingering + problems with PTYs and with closing stdin (see #198 and #158). + This doesn't fix those problems, but it should provide more + information to developers. + * buildbot/status/client.py: hush pyflakes, log.msg vs log * buildbot/status/mail.py: same From warner at users.sourceforge.net Sun Mar 23 00:36:58 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 00:36:58 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_buildstep.py, NONE, 1.1 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7272/buildbot/test Added Files: test_buildstep.py Log Message: [project @ allow LogLineObserver to handle longer lines. Closes #201.] Original author: warner at lothar.com Date: 2008-03-23 00:35:51+00:00 --- NEW FILE: test_buildstep.py --- # -*- test-case-name: buildbot.test.test_buildstep -*- # test cases for buildbot.process.buildstep from twisted.trial import unittest from buildbot import interfaces from buildbot.process import buildstep # have to subclass LogObserver in order to test it, since the default # implementations of outReceived() and errReceived() do nothing class MyLogObserver(buildstep.LogObserver): def __init__(self): self._out = [] # list of chunks self._err = [] def outReceived(self, data): self._out.append(data) def errReceived(self, data): self._err.append(data) class ObserverTestCase(unittest.TestCase): observer_cls = None # must be set by subclass def setUp(self): self.observer = self.observer_cls() def _logStdout(self, chunk): # why does LogObserver.logChunk() take 'build', 'step', and # 'log' arguments when it clearly doesn't use them for anything? self.observer.logChunk(None, None, None, interfaces.LOG_CHANNEL_STDOUT, chunk) def _logStderr(self, chunk): self.observer.logChunk(None, None, None, interfaces.LOG_CHANNEL_STDERR, chunk) def _assertStdout(self, expect_lines): self.assertEqual(self.observer._out, expect_lines) def _assertStderr(self, expect_lines): self.assertEqual(self.observer._err, expect_lines) class LogObserver(ObserverTestCase): observer_cls = MyLogObserver def testLogChunk(self): self._logStdout("foo") self._logStderr("argh") self._logStdout(" wubba\n") self._logStderr("!!!\n") self._assertStdout(["foo", " wubba\n"]) self._assertStderr(["argh", "!!!\n"]) # again, have to subclass LogLineObserver in order to test it, because the # default implementations of data-receiving methods are empty class MyLogLineObserver(buildstep.LogLineObserver): def __init__(self): #super(MyLogLineObserver, self).__init__() buildstep.LogLineObserver.__init__(self) self._out = [] # list of lines self._err = [] def outLineReceived(self, line): self._out.append(line) def errLineReceived(self, line): self._err.append(line) class LogLineObserver(ObserverTestCase): observer_cls = MyLogLineObserver def testLineBuffered(self): # no challenge here: we feed it chunks that are already lines # (like a program writing to stdout in line-buffered mode) self._logStdout("stdout line 1\n") self._logStdout("stdout line 2\n") self._logStderr("stderr line 1\n") self._logStdout("stdout line 3\n") self._assertStdout(["stdout line 1", "stdout line 2", "stdout line 3"]) self._assertStderr(["stderr line 1"]) def testShortBrokenLines(self): self._logStdout("stdout line 1 starts ") self._logStderr("an intervening line of error\n") self._logStdout("and continues ") self._logStdout("but finishes here\n") self._logStderr("more error\n") self._logStdout("and another line of stdout\n") self._assertStdout(["stdout line 1 starts and continues but finishes here", "and another line of stdout"]) self._assertStderr(["an intervening line of error", "more error"]) def testLongLine(self): chunk = "." * 1024 self._logStdout(chunk) self._logStdout(chunk) self._logStdout(chunk) self._logStdout(chunk) self._logStdout(chunk) self._logStdout("\n") self._assertStdout([chunk * 5]) self._assertStderr([]) def testBigChunk(self): chunk = "." * 5000 self._logStdout(chunk) self._logStdout("\n") self._assertStdout([chunk]) self._assertStderr([]) def testReallyLongLine(self): # A single line of > 16384 bytes is dropped on the floor (bug #201). # In real life, I observed such a line being broken into chunks of # 4095 bytes, so that's how I'm breaking it here. self.observer.setMaxLineLength(65536) chunk = "." * 4095 self._logStdout(chunk) self._logStdout(chunk) self._logStdout(chunk) self._logStdout(chunk) # now we're up to 16380 bytes self._logStdout("12345\n") self._assertStdout([chunk*4 + "12345"]) self._assertStderr([]) From warner at users.sourceforge.net Sun Mar 23 00:36:58 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 00:36:58 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process buildstep.py, 1.10, 1.11 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7272/buildbot/process Modified Files: buildstep.py Log Message: [project @ allow LogLineObserver to handle longer lines. Closes #201.] Original author: warner at lothar.com Date: 2008-03-23 00:35:51+00:00 Index: buildstep.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/buildstep.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- buildstep.py 21 Mar 2008 03:53:36 -0000 1.10 +++ buildstep.py 23 Mar 2008 00:36:56 -0000 1.11 @@ -400,6 +400,15 @@ self.stderrParser.lineReceived = self.errLineReceived self.stderrParser.transport = self + def setMaxLineLength(self, max_length): + """ + Set the maximum line length: lines longer than max_length are + dropped. Default is 16384 bytes. Use sys.maxint for effective + infinity. + """ + self.stdoutParser.MAX_LENGTH = max_length + self.stderrParser.MAX_LENGTH = max_length + def outReceived(self, data): self.stdoutParser.dataReceived(data) From warner at users.sourceforge.net Sun Mar 23 00:36:58 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 00:36:58 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.135,1.136 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7272/docs Modified Files: buildbot.texinfo Log Message: [project @ allow LogLineObserver to handle longer lines. Closes #201.] Original author: warner at lothar.com Date: 2008-03-23 00:35:51+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- buildbot.texinfo 21 Mar 2008 01:32:00 -0000 1.135 +++ buildbot.texinfo 23 Mar 2008 00:36:56 -0000 1.136 @@ -5021,7 +5021,11 @@ course you can subclass them to add further customization. The @code{LogLineObserver} class handles the grunt work of buffering and scanning for end-of-line delimiters, allowing your parser to operate -on complete stdout/stderr lines. +on complete stdout/stderr lines. (Lines longer than a set maximum +length are dropped; the maximum defaults to 16384 bytes, but you can +change it by calling @code{setMaxLineLength()} on your + at code{LogLineObserver} instance. Use @code{sys.maxint} for effective +infinity.) For example, let's take a look at the @code{TrialTestCaseCounter}, which is used by the Trial step to count test cases as they are run. From warner at users.sourceforge.net Sun Mar 23 00:36:58 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 00:36:58 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1046,1.1047 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv7272 Modified Files: ChangeLog Log Message: [project @ allow LogLineObserver to handle longer lines. Closes #201.] Original author: warner at lothar.com Date: 2008-03-23 00:35:51+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1046 retrieving revision 1.1047 diff -u -d -r1.1046 -r1.1047 --- ChangeLog 22 Mar 2008 22:50:34 -0000 1.1046 +++ ChangeLog 23 Mar 2008 00:36:56 -0000 1.1047 @@ -1,5 +1,12 @@ 2008-03-22 Brian Warner + * buildbot/process/buildstep.py (LogLineObserver.setMaxLineLength): + new method to override the default 16KiB line length. Lines that + are longer than this will cause the rest of the log file to be + ignored. Thanks to Greg Ward for the patch. Closes #201. + * buildbot/test/test_buildstep.py: new tests for log observers + * docs/buildbot.texinfo (Adding LogObservers): document it + * buildbot/slave/commands.py (ShellCommand): record more information in the 'header' section: how much we write into stdin, do we close stdin, are we using a PTY. There are lingering From warner at users.sourceforge.net Sun Mar 23 03:14:49 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 03:14:49 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1047,1.1048 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3555 Modified Files: ChangeLog Log Message: [project @ builder: make it possible to stop builds after a Builder-changing reconfig. Closes #22.] Original author: warner at lothar.com Date: 2008-03-23 03:11:09+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1047 retrieving revision 1.1048 diff -u -d -r1.1047 -r1.1048 --- ChangeLog 23 Mar 2008 00:36:56 -0000 1.1047 +++ ChangeLog 23 Mar 2008 03:14:46 -0000 1.1048 @@ -1,5 +1,15 @@ 2008-03-22 Brian Warner + * buildbot/process/builder.py (Builder): use self.old_building to + track Builds from a previous version of this Builder and are still + running. This makes it possible for IBuilderControl to get at + them, allowing the "Stop Build" button to work after a + Builder-replacing reconfig. Closes #22. + (Builder.consumeTheSoulOfYourPredecessor): grab weakrefs from the + old Builder's self.building attribute, instead of strongrefs, + since there's no good place to explicitly forget about them. + (Builder.getBuild): factor this out of BuilderControl + * buildbot/process/buildstep.py (LogLineObserver.setMaxLineLength): new method to override the default 16KiB line length. Lines that are longer than this will cause the rest of the log file to be From warner at users.sourceforge.net Sun Mar 23 03:14:49 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 03:14:49 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process builder.py,1.52,1.53 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3555/buildbot/process Modified Files: builder.py Log Message: [project @ builder: make it possible to stop builds after a Builder-changing reconfig. Closes #22.] Original author: warner at lothar.com Date: 2008-03-23 03:11:09+00:00 Index: builder.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/builder.py,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- builder.py 18 Mar 2008 22:25:55 -0000 1.52 +++ builder.py 23 Mar 2008 03:14:47 -0000 1.53 @@ -1,5 +1,5 @@ -import random +import random, weakref from zope.interface import implements from twisted.python import log, components from twisted.spread import pb @@ -284,6 +284,8 @@ # build/wannabuild slots: Build objects move along this sequence self.buildable = [] self.building = [] + # old_building holds active builds that were stolen from a predecessor + self.old_building = weakref.WeakKeyDictionary() # buildslaves which have connected but which are not yet available. # These are always in the ATTACHING state. @@ -376,13 +378,21 @@ self.buildable.extend(old.buildable) old.buildable = [] - # old.building is not migrated: it keeps track of builds which were - # in progress in the old Builder. When those builds finish, the old - # Builder will be notified, not us. However, since the old - # SlaveBuilder will point to us, it is our maybeStartBuild() that - # will be triggered. + # old.building (i.e. builds which are still running) is not migrated + # directly: it keeps track of builds which were in progress in the + # old Builder. When those builds finish, the old Builder will be + # notified, not us. However, since the old SlaveBuilder will point to + # us, it is our maybeStartBuild() that will be triggered. if old.building: self.builder_status.setBigState("building") + # however, we do grab a weakref to the active builds, so that our + # BuilderControl can see them and stop them. We use a weakref because + # we aren't the one to get notified, so there isn't a convenient + # place to remove it from self.building . + for b in old.building: + self.old_building[b] = None + for b in old.old_building: + self.old_building[b] = None # Our set of slavenames may be different. Steal any of the old # buildslaves that we want to keep using. @@ -414,6 +424,15 @@ return # all done + def getBuild(self, number): + for b in self.building: + if b.build_status.number == number: + return b + for b in self.old_building.keys(): + if b.build_status.number == number: + return b + return None + def fireTestEvent(self, name, fire_with=None): if fire_with is None: fire_with = self @@ -701,10 +720,7 @@ raise NotImplementedError def getBuild(self, number): - for b in self.original.building: - if b.build_status.number == number: - return b - return None + return self.original.getBuild(number) def ping(self, timeout=30): if not self.original.slaves: From warner at users.sourceforge.net Sun Mar 23 03:14:54 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 03:14:54 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1048,1.1049 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3574 Modified Files: ChangeLog Log Message: [project @ web: fix the label of the 'Stop Build' button] Original author: warner at lothar.com Date: 2008-03-23 03:14:03+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1048 retrieving revision 1.1049 diff -u -d -r1.1048 -r1.1049 --- ChangeLog 23 Mar 2008 03:14:46 -0000 1.1048 +++ ChangeLog 23 Mar 2008 03:14:52 -0000 1.1049 @@ -1,5 +1,11 @@ 2008-03-22 Brian Warner + * buildbot/status/web/base.py (make_stop_form): add a label= + argument so that the button says "Stop Builds" or "Stop Build" as + appropriate. It used to say "Stop Builder", which was wrong. + * buildbot/status/web/baseweb.py (OneLinePerBuild.body): same + (OneBoxPerBuilder.body): same + * buildbot/process/builder.py (Builder): use self.old_building to track Builds from a previous version of this Builder and are still running. This makes it possible for IBuilderControl to get at From warner at users.sourceforge.net Sun Mar 23 03:14:54 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 03:14:54 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web base.py, 1.22, 1.23 baseweb.py, 1.33, 1.34 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3574/buildbot/status/web Modified Files: base.py baseweb.py Log Message: [project @ web: fix the label of the 'Stop Build' button] Original author: warner at lothar.com Date: 2008-03-23 03:14:03+00:00 Index: base.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/base.py,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- base.py 21 Nov 2007 09:24:18 -0000 1.22 +++ base.py 23 Mar 2008 03:14:52 -0000 1.23 @@ -53,7 +53,7 @@ label = html.escape(label) return ROW_TEMPLATE % {"label": label, "field": field} -def make_stop_form(stopURL, on_all=False): +def make_stop_form(stopURL, on_all=False, label="Build"): if on_all: data = """

To stop all builds, fill out the following fields and @@ -66,7 +66,7 @@ "") data += make_row("Reason for stopping build:", "") - data += '

\n' + data += '\n' % label return data def make_force_build_form(forceURL, on_all=False): Index: baseweb.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/baseweb.py,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- baseweb.py 21 Nov 2007 09:25:03 -0000 1.33 +++ baseweb.py 23 Mar 2008 03:14:52 -0000 1.34 @@ -123,7 +123,7 @@ if building: stopURL = "builders/_all/stop" - data += make_stop_form(stopURL, True) + data += make_stop_form(stopURL, True, "Builds") if online: forceURL = "builders/_all/force" data += make_force_build_form(forceURL, True) @@ -232,7 +232,7 @@ if building: stopURL = "builders/_all/stop" - data += make_stop_form(stopURL, True) + data += make_stop_form(stopURL, True, "Builds") if online: forceURL = "builders/_all/force" data += make_force_build_form(forceURL, True) From warner at users.sourceforge.net Sun Mar 23 03:40:56 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 03:40:56 +0000 Subject: [Buildbot-commits] buildbot ChangeLog, 1.1049, 1.1050 NEWS, 1.67, 1.68 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12237 Modified Files: ChangeLog NEWS Log Message: [project @ NEWS: preliminary list of changes for upcoming release] Original author: warner at lothar.com Date: 2008-03-23 03:35:52+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1049 retrieving revision 1.1050 diff -u -d -r1.1049 -r1.1050 --- ChangeLog 23 Mar 2008 03:14:52 -0000 1.1049 +++ ChangeLog 23 Mar 2008 03:40:53 -0000 1.1050 @@ -1,5 +1,8 @@ 2008-03-22 Brian Warner + * NEWS: preliminary list of changes for the upcoming release. + Needs editing and explanations. + * buildbot/status/web/base.py (make_stop_form): add a label= argument so that the button says "Stop Builds" or "Stop Build" as appropriate. It used to say "Stop Builder", which was wrong. Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- NEWS 20 Mar 2008 18:04:40 -0000 1.67 +++ NEWS 23 Mar 2008 03:40:54 -0000 1.68 @@ -10,6 +10,41 @@ "_all" pseudo-builder that the web pages use to allow force-build buttons that start builds on all Builders at once. +** Bugs Fixed + +Many of the URLs generated by the buildbot were wrong. +Display of last-heard-from timestamps on the buildslaves web page were wrong. +Asking an IRC bot about a build waiting on a Lock should no longer crash. +Same for the web viewer. +Stop treating the encouraged info/ directory as leftover. + +Add more force/stop build buttons. +Builder names can no longer start with an underscore: these are reserved. +Timestamps displayed on the waterfall now handle daylight savings properly. +p4poller no longer quits after a single failure +Improved Git support, including 'try', branch, and revisions. Use 'git', not 'cogito' +Make older hg client/servers handle specific-revision builds properly. +Fix twisted.scripts._twistw problem on twisted-2.5.0 and windows. +Fix workdir= and env= on ShellCommands +Fix logfile-watching in 'buildbot start' on OS-X. +Fix ShellCommand crashes when the program emits >640kB of output per chunk. +New WarningCountingShellCommand step +Fix TreeSize step. +Fix transfer.FileUpload/FileDownload crashes for large files. +Make 'buildbor reconfig' on windows tell you that it doesn't work. +Add a To: header to the mail sent by the slave-missing timeout. +Disable usePTY= for most unit tests, it makes some debian systems flunk tests. +Add 'absolute source stamps' +Add 'triggerable schedulers', and a buildstep to trigger them. +Remove buildbot.changes.freshcvsmail +Add new XMLRPC methods: getAllBuilders, getStatus, getLastBuilds. +Accept WithProperties in more places: env=, workdir=, others. +Use --no-auth-cache with SVN commands to avoid clobbering shared svn state. +Add hours/minutes/seconds in the waterfall's ETA display. +Trial: count Doctest lines too. +ShellCommand: record more info in the headers: stdin closing, PTY usage. +Make it possible to stop builds across reconfig boundaries. + ** Deprecation Schedule The changes.freshcvsmail change source was replaced by From warner at users.sourceforge.net Sun Mar 23 03:41:03 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 03:41:03 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.85,1.86 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12252/buildbot/test Modified Files: test_vc.py Log Message: [project @ test_vc: avoid overlapping poll() calls in Mercurial.testCheckoutHTTP to try and fix test failures under heavy load] Original author: warner at lothar.com Date: 2008-03-23 03:40:27+00:00 Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- test_vc.py 22 Mar 2008 22:14:16 -0000 1.85 +++ test_vc.py 23 Mar 2008 03:41:01 -0000 1.86 @@ -2481,6 +2481,7 @@ f.trap(error.ConnectionRefusedError) d.addCallbacks(success, ignore_connection_refused) d.addErrback(done_d.errback) + return d self._wait_for_server_poller = task.LoopingCall(poll) self._wait_for_server_poller.start(0.5, True) return done_d From warner at users.sourceforge.net Sun Mar 23 03:41:03 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 23 Mar 2008 03:41:03 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1050,1.1051 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12252 Modified Files: ChangeLog Log Message: [project @ test_vc: avoid overlapping poll() calls in Mercurial.testCheckoutHTTP to try and fix test failures under heavy load] Original author: warner at lothar.com Date: 2008-03-23 03:40:27+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1050 retrieving revision 1.1051 diff -u -d -r1.1050 -r1.1051 --- ChangeLog 23 Mar 2008 03:40:53 -0000 1.1050 +++ ChangeLog 23 Mar 2008 03:41:01 -0000 1.1051 @@ -1,5 +1,9 @@ 2008-03-22 Brian Warner + * buildbot/test/test_vc.py (Mercurial.serveHTTP): another attempt + to make Mercurial.testCheckoutHTTP not fail on heavily loaded + machines: avoid overlapping poll() calls. + * NEWS: preliminary list of changes for the upcoming release. Needs editing and explanations. From warner at users.sourceforge.net Fri Mar 28 05:55:49 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 28 Mar 2008 05:55:49 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts checkconfig.py, NONE, 1.1 runner.py, 1.59, 1.60 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16808/buildbot/scripts Modified Files: runner.py Added Files: checkconfig.py Log Message: [project @ add 'buildbot checkconfig' command from Ben Hearsum] Original author: warner at lothar.com Date: 2008-03-28 05:50:38+00:00 --- NEW FILE: checkconfig.py --- import sys import os from shutil import copy, rmtree from tempfile import mkdtemp from os.path import isfile import traceback from buildbot import master class ConfigLoader(master.BuildMaster): def __init__(self, configFileName="master.cfg"): master.BuildMaster.__init__(self, ".", configFileName) dir = os.getcwd() # Use a temporary directory since loadConfig() creates a bunch of # directories and compiles .py files tempdir = mkdtemp() try: copy(configFileName, tempdir) for entry in os.listdir("."): # Any code in a subdirectory will _not_ be copied! This is a bug if isfile(entry): copy(entry, tempdir) except: raise try: os.chdir(tempdir) # Add the temp directory to the library path so local modules work sys.path.append(tempdir) configFile = open(configFileName, "r") self.loadConfig(configFile) except: os.chdir(dir) rmtree(tempdir) raise os.chdir(dir) rmtree(tempdir) if __name__ == '__main__': try: if len(sys.argv) > 1: c = ConfigLoader(sys.argv[1]) else: c = ConfigLoader() except IOError: print >> sys.stderr, "Could not open config file" sys.exit(2) except: print >> sys.stderr, "Error in config file:" t, v, tb = sys.exc_info() print >> sys.stderr, traceback.print_exception(t, v, tb) sys.exit(1) Index: runner.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- runner.py 30 Sep 2007 18:03:14 -0000 1.59 +++ runner.py 28 Mar 2008 05:55:46 -0000 1.60 @@ -3,6 +3,7 @@ # N.B.: don't import anything that might pull in a reactor yet. Some of our # subcommands want to load modules that need the gtk reactor. import os, sys, stat, re, time +import traceback from twisted.python import usage, util, runtime # this is mostly just a front-end for mktap, twistd, and kill(1), but in the @@ -809,6 +810,39 @@ os.rename(tmpfile, newfile) +class CheckConfigOptions(usage.Options): + optFlags = [ + ['quiet', 'q', "Don't display error messages or tracebacks"], + ] + + def getSynopsis(self): + return "Usage :buildbot checkconfig [configFile]\n" + \ + " If not specified, 'master.cfg' will be used as 'configFile'" + + def parseArgs(self, *args): + if len(args) >= 1: + self['configFile'] = args[0] + else: + self['configFile'] = 'master.cfg' + + +def doCheckConfig(config): + quiet = config.get('quiet') + configFile = config.get('configFile') + try: + from buildbot.scripts.checkconfig import ConfigLoader + ConfigLoader(configFile) + except: + if not quiet: + # Print out the traceback in a nice format + t, v, tb = sys.exc_info() + traceback.print_exception(t, v, tb) + sys.exit(1) + + if not quiet: + print "Config file is good!" + + class Options(usage.Options): synopsis = "Usage: buildbot [command options]" @@ -847,6 +881,9 @@ ['tryserver', None, TryServerOptions, "buildmaster-side 'try' support function, not for users"], + ['checkconfig', None, CheckConfigOptions, + "test the validity of a master.cfg config file"], + # TODO: 'watch' ] @@ -906,5 +943,7 @@ doTry(so) elif command == "tryserver": doTryServer(so) + elif command == "checkconfig": + doCheckConfig(so) From warner at users.sourceforge.net Fri Mar 28 05:55:49 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 28 Mar 2008 05:55:49 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1051,1.1052 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16808 Modified Files: ChangeLog Log Message: [project @ add 'buildbot checkconfig' command from Ben Hearsum] Original author: warner at lothar.com Date: 2008-03-28 05:50:38+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1051 retrieving revision 1.1052 diff -u -d -r1.1051 -r1.1052 --- ChangeLog 23 Mar 2008 03:41:01 -0000 1.1051 +++ ChangeLog 28 Mar 2008 05:55:47 -0000 1.1052 @@ -1,3 +1,12 @@ +2008-03-27 Brian Warner + + * buildbot/scripts/runner.py (doCheckConfig): patch from Ben + Hearsum to implement 'buildbot checkconfig': validate that your + master.cfg is good without actually touching the buildmaster. + Closes #37. Thanks! + * buildbot/scripts/checkconfig.py: same + * docs/buildbot.texinfo (Testing the Config File): document it + 2008-03-22 Brian Warner * buildbot/test/test_vc.py (Mercurial.serveHTTP): another attempt From warner at users.sourceforge.net Fri Mar 28 05:55:49 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 28 Mar 2008 05:55:49 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.136,1.137 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16808/docs Modified Files: buildbot.texinfo Log Message: [project @ add 'buildbot checkconfig' command from Ben Hearsum] Original author: warner at lothar.com Date: 2008-03-28 05:50:38+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.136 retrieving revision 1.137 diff -u -d -r1.136 -r1.137 --- buildbot.texinfo 23 Mar 2008 00:36:56 -0000 1.136 +++ buildbot.texinfo 28 Mar 2008 05:55:47 -0000 1.137 @@ -128,6 +128,7 @@ * Config File Format:: * Loading the Config File:: +* Testing the Config File:: * Defining the Project:: * Listing Change Sources and Schedulers:: * Setting the slaveport:: @@ -1922,6 +1923,7 @@ @menu * Config File Format:: * Loading the Config File:: +* Testing the Config File:: * Defining the Project:: * Listing Change Sources and Schedulers:: * Setting the slaveport:: @@ -1994,7 +1996,7 @@ @end table - at node Loading the Config File, Defining the Project, Config File Format, Configuration + at node Loading the Config File, Testing the Config File, Config File Format, Configuration @section Loading the Config File The config file is only read at specific points in time. It is first @@ -2028,7 +2030,48 @@ process until it completes. Any previously queued Builds (or Builds which get queued after the reconfig) will use the new process. - at node Defining the Project, Listing Change Sources and Schedulers, Loading the Config File, Configuration + at node Testing the Config File, Defining the Project, Loading the Config File, Configuration + at section Testing the Config File + +To verify that the config file is well-formed and contains no +deprecated or invalid elements, use the ``checkconfig'' command: + + at example +% buildbot checkconfig master.cfg +Config file is good! + at end example + +If the config file has deprecated features (perhaps because you've +upgraded the buildmaster and need to update the config file to match), +they will be announced by checkconfig. In this case, the config file +will work, but you should really remove the deprecated items and use +the recommended replacements instead: + + at example +% buildbot checkconfig master.cfg +/usr/lib/python2.4/site-packages/buildbot/master.py:559: DeprecationWarning: c['sources'] is deprecated as of 0.7.6 and will be removed by 0.8.0 . Please use c['change_source'] instead. + warnings.warn(m, DeprecationWarning) +Config file is good! + at end example + +If the config file is simply broken, that will be caught too: + + at example +% buildbot checkconfig master.cfg +Traceback (most recent call last): + File "/usr/lib/python2.4/site-packages/buildbot/scripts/runner.py", line 834, in doCheckConfig + ConfigLoader(configFile) + File "/usr/lib/python2.4/site-packages/buildbot/scripts/checkconfig.py", line 31, in __init__ + self.loadConfig(configFile) + File "/usr/lib/python2.4/site-packages/buildbot/master.py", line 480, in loadConfig + exec f in localDict + File "/home/warner/BuildBot/master/foolscap/master.cfg", line 90, in ? + c[bogus] = "stuff" +NameError: name 'bogus' is not defined + at end example + + + at node Defining the Project, Listing Change Sources and Schedulers, Testing the Config File, Configuration @section Defining the Project There are a couple of basic settings that you use to tell the buildbot From warner at users.sourceforge.net Sun Mar 30 01:29:54 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 01:29:54 +0000 Subject: [Buildbot-commits] buildbot/buildbot/changes svnpoller.py,1.6,1.7 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/changes In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26583/buildbot/changes Modified Files: svnpoller.py Log Message: [project @ #58:svnpoller-revision-int.patch] Patch from Dan Locks : MailNotifier assumes that revision is a string, but SvnPoller provided an int. Original author: dustin at v.igoro.us Date: 2008-03-23 21:08:10+00:00 Index: svnpoller.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/svnpoller.py,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- svnpoller.py 17 Jun 2007 21:10:39 -0000 1.6 +++ svnpoller.py 30 Mar 2008 01:29:51 -0000 1.7 @@ -385,10 +385,7 @@ for el in new_logentries: branch_files = [] # get oldest change first - # TODO: revisit this, I think I've settled on Change.revision - # being a string everywhere, and leaving the interpretation - # of that string up to b.s.source.SVN methods - revision = int(el.getAttribute("revision")) + revision = str(el.getAttribute("revision")) dbgMsg("Adding change revision %s" % (revision,)) # TODO: the rest of buildbot may not be ready for unicode 'who' # values From warner at users.sourceforge.net Sun Mar 30 01:29:58 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 01:29:58 +0000 Subject: [Buildbot-commits] buildbot/buildbot/steps source.py,1.11,1.12 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/steps In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26602/buildbot/steps Modified Files: source.py Log Message: [project @ #208:source-got_revision-to-str.patch] Patch by Dan Locks : stringify got_revision, too. Original author: dustin at v.igoro.us Date: 2008-03-26 16:01:30+00:00 Index: source.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/steps/source.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- source.py 22 Mar 2008 22:15:00 -0000 1.11 +++ source.py 30 Mar 2008 01:29:56 -0000 1.12 @@ -186,7 +186,7 @@ def commandComplete(self, cmd): got_revision = None if cmd.updates.has_key("got_revision"): - got_revision = cmd.updates["got_revision"][-1] + got_revision = str(cmd.updates["got_revision"][-1]) self.setProperty("got_revision", got_revision) From warner at users.sourceforge.net Sun Mar 30 01:30:03 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 01:30:03 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_svnpoller.py, 1.4, 1.5 test_vc.py, 1.86, 1.87 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26618/buildbot/test Modified Files: test_svnpoller.py test_vc.py Log Message: [project @ #208:update-tests.patch] Update unit tests to expect strings rather than ints for revisions. Original author: dustin at v.igoro.us Date: 2008-03-28 14:28:57+00:00 Index: test_svnpoller.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_svnpoller.py,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- test_svnpoller.py 6 Dec 2006 08:46:11 -0000 1.4 +++ test_svnpoller.py 30 Mar 2008 01:30:00 -0000 1.5 @@ -277,10 +277,10 @@ changes = s.create_changes(logentries) self.failUnlessEqual(len(changes), 2) self.failUnlessEqual(changes[0].branch, "branch") - self.failUnlessEqual(changes[0].revision, 2) + self.failUnlessEqual(changes[0].revision, '2') self.failUnlessEqual(changes[1].branch, "branch") self.failUnlessEqual(changes[1].files, ["main.c"]) - self.failUnlessEqual(changes[1].revision, 3) + self.failUnlessEqual(changes[1].revision, '3') # and now pull in r4 doc = s.parse_logs(make_changes_output(4)) @@ -290,7 +290,7 @@ changes = s.create_changes(logentries) self.failUnlessEqual(len(changes), 1) self.failUnlessEqual(changes[0].branch, None) - self.failUnlessEqual(changes[0].revision, 4) + self.failUnlessEqual(changes[0].revision, '4') self.failUnlessEqual(changes[0].files, ["version.c"]) def testFirstTime(self): @@ -379,7 +379,7 @@ c = s.finished_changes[0] self.failUnlessEqual(c.branch, "branch") - self.failUnlessEqual(c.revision, 2) + self.failUnlessEqual(c.revision, '2') self.failUnlessEqual(c.files, ['']) # TODO: this is what creating the branch looks like: a Change with a # zero-length file. We should decide if we want filenames like this @@ -412,13 +412,13 @@ c3 = s.finished_changes[1] self.failUnlessEqual(c3.branch, "branch") - self.failUnlessEqual(c3.revision, 3) + self.failUnlessEqual(c3.revision, '3') self.failUnlessEqual(c3.files, ["main.c"]) self.failUnlessEqual(c3.comments, "commit_on_branch") c4 = s.finished_changes[2] self.failUnlessEqual(c4.branch, None) - self.failUnlessEqual(c4.revision, 4) + self.failUnlessEqual(c4.revision, '4') self.failUnlessEqual(c4.files, ["version.c"]) self.failUnlessEqual(c4.comments, "revised_to_2") self.failUnless(abs(c4.when - time.time()) < 60) Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- test_vc.py 23 Mar 2008 03:41:01 -0000 1.86 +++ test_vc.py 30 Mar 2008 01:30:00 -0000 1.87 @@ -483,7 +483,7 @@ def checkGotRevision(self, bs, expected): if self.has_got_revision: - self.failUnlessEqual(bs.getProperty("got_revision"), expected) + self.failUnlessEqual(bs.getProperty("got_revision"), str(expected)) def checkGotRevisionIsLatest(self, bs): expected = self.helper.trunk[-1] From warner at users.sourceforge.net Sun Mar 30 01:30:11 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 01:30:11 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1052,1.1053 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26873 Modified Files: ChangeLog Log Message: [project @ changelog for the #208 patch: treat got_revision and SVN revno as a string] Original author: warner at lothar.com Date: 2008-03-30 01:25:23+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1052 retrieving revision 1.1053 diff -u -d -r1.1052 -r1.1053 --- ChangeLog 28 Mar 2008 05:55:47 -0000 1.1052 +++ ChangeLog 30 Mar 2008 01:30:08 -0000 1.1053 @@ -1,3 +1,14 @@ +2008-03-29 Brian Warner + + * buildbot/changes/svnpoller.py (SVNPoller.create_changes): pass + revision as a string, not an int. This fixes a problem in + MailNotifier, which expects a string. Thanks to Dan Locks for the + patch, and Dustin Mitchell for the test fixups. Closes #208. + * buildbot/steps/source.py (Source.commandComplete): treat + got_revision as a string too. + * buildbot/test/test_svnpoller.py: update test to match + * buildbot/test/test_vc.py: same + 2008-03-27 Brian Warner * buildbot/scripts/runner.py (doCheckConfig): patch from Ben From warner at users.sourceforge.net Sun Mar 30 02:27:56 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 02:27:56 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status/web waterfall.py, 1.27, 1.28 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status/web In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19866/buildbot/status/web Modified Files: waterfall.py Log Message: [project @ waterfall: add category= argument, to filter builders by category. Closes #117.] Original author: warner at lothar.com Date: 2008-03-30 02:27:09+00:00 Index: waterfall.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/waterfall.py,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- waterfall.py 21 Mar 2008 04:25:35 -0000 1.27 +++ waterfall.py 30 Mar 2008 02:27:53 -0000 1.28 @@ -453,21 +453,29 @@ phase = request.args.get("phase",["2"]) phase = int(phase[0]) + # we start with all Builders available to this Waterfall: this is + # limited by the config-file -time categories= argument, and defaults + # to all defined Builders. + allBuilderNames = status.getBuilderNames(categories=self.categories) + builders = [status.getBuilder(name) for name in allBuilderNames] + + # but if the URL has one or more builder= arguments (or the old show= + # argument, which is still accepted for backwards compatibility), we + # use that set of builders instead. We still don't show anything + # outside the config-file time set limited by categories=. showBuilders = request.args.get("show", []) showBuilders.extend(request.args.get("builder", [])) - allBuilders = status.getBuilderNames(categories=self.categories) if showBuilders: - builderNames = [] - for b in showBuilders: - if b not in allBuilders: - continue - if b in builderNames: - continue - builderNames.append(b) - else: - builderNames = allBuilders - builders = map(lambda name: status.getBuilder(name), - builderNames) + builders = [b for b in builders if b.name in showBuilders] + + # now, if the URL has one or category= arguments, use them as a + # filter: only show those builders which belong to one of the given + # categories. + showCategories = request.args.get("category", []) + if showCategories: + builders = [b for b in builders if b.category in showCategories] + + builderNames = [b.name for b in builders] if phase == -1: return self.body0(request, builders) From warner at users.sourceforge.net Sun Mar 30 02:27:56 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 02:27:56 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.137,1.138 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19866/docs Modified Files: buildbot.texinfo Log Message: [project @ waterfall: add category= argument, to filter builders by category. Closes #117.] Original author: warner at lothar.com Date: 2008-03-30 02:27:09+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.137 retrieving revision 1.138 diff -u -d -r1.137 -r1.138 --- buildbot.texinfo 28 Mar 2008 05:55:47 -0000 1.137 +++ buildbot.texinfo 30 Mar 2008 02:27:54 -0000 1.138 @@ -6350,7 +6350,10 @@ By adding one or more ``builder='' query arguments, the Waterfall is restricted to only showing information about the given Builders. By adding one or more ``branch='' query arguments, the display is -restricted to showing information about the given branches. +restricted to showing information about the given branches. In +addition, adding one or more ``category='' query arguments to the URL +will limit the display to Builders that were defined with one of the +given categories. A 'show_events=true' query argument causes the display to include non-Build events, like slaves attaching and detaching, as well as From warner at users.sourceforge.net Sun Mar 30 02:27:55 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 02:27:55 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1053,1.1054 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19866 Modified Files: ChangeLog Log Message: [project @ waterfall: add category= argument, to filter builders by category. Closes #117.] Original author: warner at lothar.com Date: 2008-03-30 02:27:09+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1053 retrieving revision 1.1054 diff -u -d -r1.1053 -r1.1054 --- ChangeLog 30 Mar 2008 01:30:08 -0000 1.1053 +++ ChangeLog 30 Mar 2008 02:27:52 -0000 1.1054 @@ -1,5 +1,14 @@ 2008-03-29 Brian Warner + * buildbot/status/web/waterfall.py (WaterfallStatusResource): + accept category= arguments in the query-arg portion of the URL. + These behave like the builder= queryargs: if any category= + queryargs are present, we'll only show Builders that fit into one + of the specified categories. Using multiple category= arguments + will show more Builders. Thanks to Jerome Davann (hollowman) for + the idea and the patch. Closes #117. + * docs/buildbot.texinfo (Buildbot Web Resources): document it + * buildbot/changes/svnpoller.py (SVNPoller.create_changes): pass revision as a string, not an int. This fixes a problem in MailNotifier, which expects a string. Thanks to Dan Locks for the From warner at users.sourceforge.net Sun Mar 30 02:48:02 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 02:48:02 +0000 Subject: [Buildbot-commits] buildbot CREDITS, 1.10, 1.11 ChangeLog, 1.1054, 1.1055 NEWS, 1.68, 1.69 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28779 Modified Files: CREDITS ChangeLog NEWS Log Message: [project @ update NEWS and CREDITS for the upcoming release] Original author: warner at lothar.com Date: 2008-03-30 02:47:25+00:00 Index: CREDITS =================================================================== RCS file: /cvsroot/buildbot/buildbot/CREDITS,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- CREDITS 17 Jun 2007 21:10:39 -0000 1.10 +++ CREDITS 30 Mar 2008 02:48:00 -0000 1.11 @@ -1,62 +1,74 @@ This is a list of everybody who has contributed to Buildbot in some way, in no particular order. Thanks everybody! -Scott Lamb -Olivier Bonnet -Mark Hammond +Aaron Hsieh +Albert Hofkamp +Alexander Lorenz +Alexander Staubo +AllMyData.com +Andrew Bennetts +Anthony Baxter +Baptiste Lepilleur +Bear +Ben Hearsum +Benoit Sigoure +Brad Hards +Brandon Philips +Brett Neely +Charles Lepple +Christian Unger +Clement Stenac +Dan Locks +Dave Liebreich +Dave Peticolas +Dobes Vandermeer +Dustin Mitchell +Elliot Murphy +Fabrice Crestois Gary Granger -Marius Gedminas -Paul Winkler -John O'Duinn +Gerald Combs +Greg Ward +Grig Gheorghiu +Haavard Skinnemoen JP Calderone -Zandr Milewski -Niklaus Giger -Tobi Vollebregt +James Knight +Jerome Davann +John Backstrand +John O'Duinn John Pye -Neal Norwitz -Anthony Baxter -AllMyData.com -Clement Stenac +John Saxton +Jose Dapena Paz Kevin Turner -Steven Walter -Dobes Vandermeer -Brad Hards -Nathaniel Smith +Kirill Lapshin +Marius Gedminas Mark Dillavou -Thomas Vander Stichele -Bear -Brandon Philips +Mark Hammond +Mark Pauley +Mark Rowe +Mateusz Loskot +Nathaniel Smith +Neal Norwitz +Nick Mathewson Nick Trout +Niklaus Giger +Olivier Bonnet +Olly Betts Paul Warren +Paul Winkler +Phil Thompson +Philipp Frauenfelder Rene Rivera -Baptiste Lepilleur -Gerald Combs -Yoz Grahame -Alexander Staubo -Elliot Murphy +Riccardo Magliocchetti +Rob Helmer +Roch Gadsdon +Roy Rapoport +Scott Lamb Stephen Davis -Kirill Lapshin -Dave Peticolas -Andrew Bennetts -Olly Betts -Philipp Frauenfelder -James Knight -Albert Hofkamp -Brett Neely +Steven Walter +Ted Mielczarek +Thomas Vander Stichele +Tobi Vollebregt Wade Brainerd -Nick Mathewson -Roy Rapoport -Mark Rowe -Ben Hearsum -Dave Liebreich -Phil Thompson -Benoit Sigoure -Mark Pauley -Rob Helmer -Grig Gheorghiu -Christian Unger -Mateusz Loskot -Jose Dapena Paz -Riccardo Magliocchetti -Alexander Lorenz -Dustin Mitchell +Yoz Grahame +Zandr Milewski +chops Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1054 retrieving revision 1.1055 diff -u -d -r1.1054 -r1.1055 --- ChangeLog 30 Mar 2008 02:27:52 -0000 1.1054 +++ ChangeLog 30 Mar 2008 02:48:00 -0000 1.1055 @@ -1,5 +1,10 @@ 2008-03-29 Brian Warner + * NEWS: update with all changes since the last release. I left the + bugs-fixed section somewhat terse, but there's a link to the Trac + page with more details. + * CREDITS: update + * buildbot/status/web/waterfall.py (WaterfallStatusResource): accept category= arguments in the query-arg portion of the URL. These behave like the builder= queryargs: if any category= Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- NEWS 23 Mar 2008 03:40:54 -0000 1.68 +++ NEWS 30 Mar 2008 02:48:00 -0000 1.69 @@ -1,6 +1,6 @@ User visible changes in Buildbot. -*- outline -*- -* Release 0.?.? (?) +* Release 0.7.7 (29 Mar 2008) ** Things You Need To Know @@ -10,25 +10,48 @@ "_all" pseudo-builder that the web pages use to allow force-build buttons that start builds on all Builders at once. +** New Features + +*** "buildbot checkconfig" + +The "buildbot checkconfig" command will look at your master.cfg file and tell +you if there are any problems with it. This can be used to test potential +changes to your config file before submitting them to the running +buildmaster. This is particularly useful to run just before doing "buildbot +restart", since the restart will fail if the config file has an error. By +running "buildbot checkconfig master.cfg && buildbot restart", you'll only +perform the restart if the config file was ok. Many thanks to Ben Hearsum for +the patch. + +*** Waterfall "?category=FOO" query-arguments + +The Waterfall page now accepts one or more "category=" query arguments in the +URL, to filter the display by categories. These behave a lot like the +"builder=" query argument. Thanks to Jermo Davann for the patch. + ** Bugs Fixed +Many bugs were fixed, and many minor features were added. Many thanks to +Dustin Mitchell who fixed and coordinated many of these. Here is a terse +list, for more details, please see the Trac page for the 0.7.7 release, at +http://buildbot.net/trac/query?status=closed&milestone=0.7.7 : + Many of the URLs generated by the buildbot were wrong. Display of last-heard-from timestamps on the buildslaves web page were wrong. Asking an IRC bot about a build waiting on a Lock should no longer crash. Same for the web viewer. Stop treating the encouraged info/ directory as leftover. - Add more force/stop build buttons. -Builder names can no longer start with an underscore: these are reserved. Timestamps displayed on the waterfall now handle daylight savings properly. -p4poller no longer quits after a single failure -Improved Git support, including 'try', branch, and revisions. Use 'git', not 'cogito' +p4poller no longer quits after a single failure. +Improved Git support, including 'try', branch, and revisions. +Buildslaves now use 'git', not 'cogito'. Make older hg client/servers handle specific-revision builds properly. Fix twisted.scripts._twistw problem on twisted-2.5.0 and windows. Fix workdir= and env= on ShellCommands Fix logfile-watching in 'buildbot start' on OS-X. Fix ShellCommand crashes when the program emits >640kB of output per chunk. -New WarningCountingShellCommand step +New WarningCountingShellCommand step. Fix TreeSize step. Fix transfer.FileUpload/FileDownload crashes for large files. Make 'buildbor reconfig' on windows tell you that it doesn't work. @@ -44,6 +67,7 @@ Trial: count Doctest lines too. ShellCommand: record more info in the headers: stdin closing, PTY usage. Make it possible to stop builds across reconfig boundaries. +SVN revision numbers are now passed as strings, which was breaking MailNotifier ** Deprecation Schedule @@ -54,7 +78,7 @@ and will be removed by 0.8.0. c['bots'] was replaced by c['buildslaves'] in 0.7.6, and will be removed by -0.8.0 +0.8.0 . c['bots'] only accepts BuildSlave instances, not name/passwd tuples. The html.Waterfall status target was replaced by html.WebStatus in 0.7.6, and will be removed by 0.8.0. From warner at users.sourceforge.net Sun Mar 30 02:59:46 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 02:59:46 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.1055,1.1056 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1528 Modified Files: ChangeLog Log Message: [project @ release buildbot-0.7.7] Original author: warner at lothar.com Date: 2008-03-30 02:57:07+00:00 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.1055 retrieving revision 1.1056 diff -u -d -r1.1055 -r1.1056 --- ChangeLog 30 Mar 2008 02:48:00 -0000 1.1055 +++ ChangeLog 30 Mar 2008 02:59:44 -0000 1.1056 @@ -1,5 +1,10 @@ 2008-03-29 Brian Warner + * buildbot/__init__.py (version): Releasing buildbot-0.7.7 + * docs/buildbot.texinfo: same + +2008-03-29 Brian Warner + * NEWS: update with all changes since the last release. I left the bugs-fixed section somewhat terse, but there's a link to the Trac page with more details. From warner at users.sourceforge.net Sun Mar 30 02:59:47 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 02:59:47 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.138,1.139 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1528/docs Modified Files: buildbot.texinfo Log Message: [project @ release buildbot-0.7.7] Original author: warner at lothar.com Date: 2008-03-30 02:57:07+00:00 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.138 retrieving revision 1.139 diff -u -d -r1.138 -r1.139 --- buildbot.texinfo 30 Mar 2008 02:27:54 -0000 1.138 +++ buildbot.texinfo 30 Mar 2008 02:59:44 -0000 1.139 @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename buildbot.info - at settitle BuildBot Manual 0.7.6+ + at settitle BuildBot Manual 0.7.7 @defcodeindex cs @defcodeindex sl @defcodeindex bf From warner at users.sourceforge.net Sun Mar 30 02:59:46 2008 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 30 Mar 2008 02:59:46 +0000 Subject: [Buildbot-commits] buildbot/buildbot __init__.py,1.31,1.32 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1528/buildbot Modified Files: __init__.py Log Message: [project @ release buildbot-0.7.7] Original author: warner at lothar.com Date: 2008-03-30 02:57:07+00:00 Index: __init__.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/__init__.py,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- __init__.py 10 Oct 2007 08:15:29 -0000 1.31 +++ __init__.py 30 Mar 2008 02:59:44 -0000 1.32 @@ -1,2 +1,2 @@ -version = "0.7.6+" +version = "0.7.7"