From warner at users.sourceforge.net Mon May 1 00:10:59 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 01 May 2006 00:10:59 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.602,1.603 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9344 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-518 Creator: Brian Warner set LC_ALL=C, accomodate non-DNotify platforms in testTryJobdir * buildbot/test/test_vc.py (VCBase.runCommand): set $LC_ALL="C" to make sure child commands emit messages in english, so our regexps will match. Thanks to Nikaus Giger for identifying the problems. (VCBase._do_vctest_export_1): mode="export" is not responsible for setting the "got_revision" property, since in many cases it is not convenient to determine. (SVNSupport.capable): when running 'svn --version' to check for ra_local, we want error messages in english * buildbot/test/test_slavecommand.py (ShellBase.testShellMissingCommand): set $LC_ALL="C" to get bash to emit the error message in english * buildbot/slave/commands.py (SourceBase.setup): stash a copy of the environment with $LC_ALL="C" so that Commands which need to parse the output of their child processes can obtain it in english. (SVN.parseGotRevision): call "svn info" afterwards instead of watching the output of the "svn update" or "svn checkout". (Darcs.parseGotRevision): use $LC_ALL="C" when running the command (Arch.parseGotRevision): same (Bazaar.parseGotRevision): same (Mercurial.parseGotRevision): same * buildbot/scripts/tryclient.py (SourceStampExtractor.dovc): set $LC_ALL="C" when running commands under 'buildbot try', too * buildbot/test/__init__.py: remove the global os.environ() setting, instead we do it just for the tests that run commands and need to parse their output. * buildbot/test/test_scheduler.py (Scheduling.testTryJobdir): remove the overly-short .timeout on this test, because non-DNotify platforms must fall back to polling which happens at 10 second intervals, so a 5 second timeout would never succeed. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.602 retrieving revision 1.603 diff -u -d -r1.602 -r1.603 --- ChangeLog 24 Apr 2006 09:56:19 -0000 1.602 +++ ChangeLog 1 May 2006 00:10:57 -0000 1.603 @@ -1,3 +1,40 @@ +2006-04-30 Brian Warner + + * buildbot/test/test_vc.py (VCBase.runCommand): set $LC_ALL="C" to + make sure child commands emit messages in english, so our regexps + will match. Thanks to Nikaus Giger for identifying the problems. + (VCBase._do_vctest_export_1): mode="export" is not responsible + for setting the "got_revision" property, since in many cases it is + not convenient to determine. + (SVNSupport.capable): when running 'svn --version' to check for + ra_local, we want error messages in english + * buildbot/test/test_slavecommand.py + (ShellBase.testShellMissingCommand): set $LC_ALL="C" to get bash + to emit the error message in english + + * buildbot/slave/commands.py (SourceBase.setup): stash a copy of + the environment with $LC_ALL="C" so that Commands which need to + parse the output of their child processes can obtain it in + english. + (SVN.parseGotRevision): call "svn info" afterwards instead of + watching the output of the "svn update" or "svn checkout". + (Darcs.parseGotRevision): use $LC_ALL="C" when running the command + (Arch.parseGotRevision): same + (Bazaar.parseGotRevision): same + (Mercurial.parseGotRevision): same + + * buildbot/scripts/tryclient.py (SourceStampExtractor.dovc): set + $LC_ALL="C" when running commands under 'buildbot try', too + + * buildbot/test/__init__.py: remove the global os.environ() + setting, instead we do it just for the tests that run commands and + need to parse their output. + + * buildbot/test/test_scheduler.py (Scheduling.testTryJobdir): + remove the overly-short .timeout on this test, because non-DNotify + platforms must fall back to polling which happens at 10 second + intervals, so a 5 second timeout would never succeed. + 2006-04-24 Brian Warner * docs/buildbot.texinfo (Installing the code): update trial From warner at users.sourceforge.net Mon May 1 00:10:59 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 01 May 2006 00:10:59 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts tryclient.py,1.13,1.14 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9344/buildbot/scripts Modified Files: tryclient.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-518 Creator: Brian Warner set LC_ALL=C, accomodate non-DNotify platforms in testTryJobdir * buildbot/test/test_vc.py (VCBase.runCommand): set $LC_ALL="C" to make sure child commands emit messages in english, so our regexps will match. Thanks to Nikaus Giger for identifying the problems. (VCBase._do_vctest_export_1): mode="export" is not responsible for setting the "got_revision" property, since in many cases it is not convenient to determine. (SVNSupport.capable): when running 'svn --version' to check for ra_local, we want error messages in english * buildbot/test/test_slavecommand.py (ShellBase.testShellMissingCommand): set $LC_ALL="C" to get bash to emit the error message in english * buildbot/slave/commands.py (SourceBase.setup): stash a copy of the environment with $LC_ALL="C" so that Commands which need to parse the output of their child processes can obtain it in english. (SVN.parseGotRevision): call "svn info" afterwards instead of watching the output of the "svn update" or "svn checkout". (Darcs.parseGotRevision): use $LC_ALL="C" when running the command (Arch.parseGotRevision): same (Bazaar.parseGotRevision): same (Mercurial.parseGotRevision): same * buildbot/scripts/tryclient.py (SourceStampExtractor.dovc): set $LC_ALL="C" when running commands under 'buildbot try', too * buildbot/test/__init__.py: remove the global os.environ() setting, instead we do it just for the tests that run commands and need to parse their output. * buildbot/test/test_scheduler.py (Scheduling.testTryJobdir): remove the overly-short .timeout on this test, because non-DNotify platforms must fall back to polling which happens at 10 second intervals, so a 5 second timeout would never succeed. Index: tryclient.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/tryclient.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- tryclient.py 24 Apr 2006 09:03:06 -0000 1.13 +++ tryclient.py 1 May 2006 00:10:57 -0000 1.14 @@ -22,7 +22,9 @@ def dovc(self, cmd): """This accepts the arguments of a command, without the actual command itself.""" - return utils.getProcessOutput(self.exe, cmd, env=os.environ, + env = os.environ.copy() + env['LC_ALL'] = "C" + return utils.getProcessOutput(self.exe, cmd, env=env, path=self.treetop) def get(self): From warner at users.sourceforge.net Mon May 1 00:10:59 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 01 May 2006 00:10:59 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test __init__.py,1.2,1.3 test_scheduler.py,1.9,1.10 test_vc.py,1.49,1.50 test_slavecommand.py,1.17,1.18 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9344/buildbot/test Modified Files: __init__.py test_scheduler.py test_vc.py test_slavecommand.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-518 Creator: Brian Warner set LC_ALL=C, accomodate non-DNotify platforms in testTryJobdir * buildbot/test/test_vc.py (VCBase.runCommand): set $LC_ALL="C" to make sure child commands emit messages in english, so our regexps will match. Thanks to Nikaus Giger for identifying the problems. (VCBase._do_vctest_export_1): mode="export" is not responsible for setting the "got_revision" property, since in many cases it is not convenient to determine. (SVNSupport.capable): when running 'svn --version' to check for ra_local, we want error messages in english * buildbot/test/test_slavecommand.py (ShellBase.testShellMissingCommand): set $LC_ALL="C" to get bash to emit the error message in english * buildbot/slave/commands.py (SourceBase.setup): stash a copy of the environment with $LC_ALL="C" so that Commands which need to parse the output of their child processes can obtain it in english. (SVN.parseGotRevision): call "svn info" afterwards instead of watching the output of the "svn update" or "svn checkout". (Darcs.parseGotRevision): use $LC_ALL="C" when running the command (Arch.parseGotRevision): same (Bazaar.parseGotRevision): same (Mercurial.parseGotRevision): same * buildbot/scripts/tryclient.py (SourceStampExtractor.dovc): set $LC_ALL="C" when running commands under 'buildbot try', too * buildbot/test/__init__.py: remove the global os.environ() setting, instead we do it just for the tests that run commands and need to parse their output. * buildbot/test/test_scheduler.py (Scheduling.testTryJobdir): remove the overly-short .timeout on this test, because non-DNotify platforms must fall back to polling which happens at 10 second intervals, so a 5 second timeout would never succeed. Index: __init__.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/__init__.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- __init__.py 5 Apr 2006 18:10:36 -0000 1.2 +++ __init__.py 1 May 2006 00:10:57 -0000 1.3 @@ -1,4 +0,0 @@ -import os - -# We do not want to be bother with output in exotic languages! -os.environ['LANG']='C' Index: test_scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_scheduler.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- test_scheduler.py 27 Nov 2005 03:58:48 -0000 1.9 +++ test_scheduler.py 1 May 2006 00:10:57 -0000 1.10 @@ -249,8 +249,11 @@ self.master.d = d = defer.Deferred() self.pushJob(jobdir_abs, job1) d.addCallback(self._testTryJobdir_1) + # N.B.: if we don't have DNotify, we poll every 10 seconds, so don't + # set a .timeout here shorter than that. TODO: make it possible to + # set the polling interval, so we can make it shorter. return maybeWait(d, 5) - testTryJobdir.timeout = 5 + def _testTryJobdir_1(self, bs): self.failUnlessEqual(bs.builderNames, ["a", "b"]) self.failUnlessEqual(bs.source.branch, "branch1") Index: test_slavecommand.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_slavecommand.py,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- test_slavecommand.py 20 Jul 2005 08:08:24 -0000 1.17 +++ test_slavecommand.py 1 May 2006 00:10:57 -0000 1.18 @@ -156,7 +156,9 @@ def testShellMissingCommand(self): args = {'command': "/bin/EndWorldHungerAndMakePigsFly", - 'workdir': '.', 'timeout': 10} + 'workdir': '.', 'timeout': 10, + 'env': {"LC_ALL": "C"}, + } c = SlaveShellCommand(self.builder, None, args) d = c.start() d.addCallback(self._testShellMissingCommand_1) Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- test_vc.py 24 Apr 2006 09:03:07 -0000 1.49 +++ test_vc.py 1 May 2006 00:10:57 -0000 1.50 @@ -322,8 +322,10 @@ if type(command) not in (list, tuple): command = command.split(" ") #print "do %s" % command + env = os.environ.copy() + env['LC_ALL'] = "C" d = utils.getProcessOutputAndValue(command[0], command[1:], - env=os.environ, path=basedir) + env=env, path=basedir) def check((out, err, code)): #print #print "command: %s" % command @@ -592,7 +594,8 @@ self.shouldNotExist(self.workdir, self.metadir) self.shouldNotExist(self.workdir, "newfile") self.failUnlessEqual(bs.getProperty("revision"), None) - self.checkGotRevisionIsLatest(bs) + #self.checkGotRevisionIsLatest(bs) + # VC 'export' is not required to have a got_revision self.touch(self.workdir, "newfile") d = self.doBuild() # export rebuild clobbers new files @@ -602,7 +605,8 @@ self.shouldNotExist(self.workdir, self.metadir) self.shouldNotExist(self.workdir, "newfile") self.failUnlessEqual(bs.getProperty("revision"), None) - self.checkGotRevisionIsLatest(bs) + #self.checkGotRevisionIsLatest(bs) + # VC 'export' is not required to have a got_revision def do_patch(self): vctype = self.vctype @@ -1093,8 +1097,10 @@ # we need svn to be compiled with the ra_local access # module log.msg("running svn --version..") + env = os.environ.copy() + env['LC_ALL'] = "C" d = utils.getProcessOutput(svnpaths[0], ["--version"], - env=os.environ) + env=env) d.addCallback(self._capable, svnpaths[0], svnadminpaths[0]) return d if not VCS["svn"]: @@ -1109,8 +1115,7 @@ self.svnadmin = svnadmin else: log.msg(("%s found but it does not support 'file:' " + - "schema, skipping svn tests") % - os.path.join(p, "svn")) + "schema, skipping svn tests") % vcexe) VCS['svn'] = None raise unittest.SkipTest("Found SVN, but it can't use file: schema") From warner at users.sourceforge.net Mon May 1 00:11:00 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 01 May 2006 00:11:00 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.45,1.46 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9344/buildbot/slave Modified Files: commands.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-518 Creator: Brian Warner set LC_ALL=C, accomodate non-DNotify platforms in testTryJobdir * buildbot/test/test_vc.py (VCBase.runCommand): set $LC_ALL="C" to make sure child commands emit messages in english, so our regexps will match. Thanks to Nikaus Giger for identifying the problems. (VCBase._do_vctest_export_1): mode="export" is not responsible for setting the "got_revision" property, since in many cases it is not convenient to determine. (SVNSupport.capable): when running 'svn --version' to check for ra_local, we want error messages in english * buildbot/test/test_slavecommand.py (ShellBase.testShellMissingCommand): set $LC_ALL="C" to get bash to emit the error message in english * buildbot/slave/commands.py (SourceBase.setup): stash a copy of the environment with $LC_ALL="C" so that Commands which need to parse the output of their child processes can obtain it in english. (SVN.parseGotRevision): call "svn info" afterwards instead of watching the output of the "svn update" or "svn checkout". (Darcs.parseGotRevision): use $LC_ALL="C" when running the command (Arch.parseGotRevision): same (Bazaar.parseGotRevision): same (Mercurial.parseGotRevision): same * buildbot/scripts/tryclient.py (SourceStampExtractor.dovc): set $LC_ALL="C" when running commands under 'buildbot try', too * buildbot/test/__init__.py: remove the global os.environ() setting, instead we do it just for the tests that run commands and need to parse their output. * buildbot/test/test_scheduler.py (Scheduling.testTryJobdir): remove the overly-short .timeout on this test, because non-DNotify platforms must fall back to polling which happens at 10 second intervals, so a 5 second timeout would never succeed. Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- commands.py 24 Apr 2006 06:45:37 -0000 1.45 +++ commands.py 1 May 2006 00:10:57 -0000 1.46 @@ -632,6 +632,12 @@ sourcedata = "" def setup(self, args): + # if we need to parse the output, use this environment. Otherwise + # command output will be in whatever the buildslave's native language + # has been set to. + self.env = os.environ.copy() + self.env['LC_ALL'] = "C" + self.workdir = args['workdir'] self.mode = args.get('mode', "update") self.revision = args.get('revision') @@ -1001,12 +1007,25 @@ def parseGotRevision(self): # svn checkout operations finish with 'Checked out revision 16657.' # svn update operations finish the line 'At revision 16654.' - lines = self.command.stdout.rstrip().split("\n") - lastline = lines[-1] - r = re.search(r'revision (\d+)\.', lastline) - if r: - return int(r.group(1)) - return None + # But we don't use those. Instead, run 'svn info'. + if self.mode == "export": + # without the .svn metadir, svn info won't work + return None + command = ["svn", "info"] + c = ShellCommand(self.builder, command, + os.path.join(self.builder.basedir, self.srcdir), + environ=self.env, + sendStdout=False, sendStderr=False, sendRC=False, + keepStdout=True) + c.usePTY = False + d = c.start() + def _parse(res): + r = re.search(r'^Revision: (\d+)$', c.stdout, re.M) + if r: + return int(r.group(1)) + return None + d.addCallback(_parse) + return d registerSlaveCommand("svn", SVN, cvs_ver) @@ -1079,6 +1098,7 @@ command = ["darcs", "changes", "--context"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), + environ=self.env, sendStdout=False, sendStderr=False, sendRC=False, keepStdout=True) c.usePTY = False @@ -1245,6 +1265,7 @@ command = ["tla", "logs", "--full", "--reverse"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), + environ=self.env, sendStdout=False, sendStderr=False, sendRC=False, keepStdout=True) c.usePTY = False @@ -1306,6 +1327,7 @@ command = ["baz", "tree-id"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), + environ=self.env, sendStdout=False, sendStderr=False, sendRC=False, keepStdout=True) c.usePTY = False @@ -1389,6 +1411,7 @@ command = ["hg", "identify"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), + environ=self.env, sendStdout=False, sendStderr=False, sendRC=False, keepStdout=True) d = c.start() From warner at users.sourceforge.net Sun May 7 00:44:30 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 00:44:30 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.605,1.606 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12732 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-524 Creator: Brian Warner test_slavecommand.py: TODOify testInterrupt1 under windows * buildbot/test/test_slavecommand.py (ShellBase.testInterrupt1): mark this test as TODO under windows, since process-killing seems dodgy there. We'll come back to this later and try to fix it properly. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.605 retrieving revision 1.606 diff -u -d -r1.605 -r1.606 --- ChangeLog 7 May 2006 00:20:21 -0000 1.605 +++ ChangeLog 7 May 2006 00:44:28 -0000 1.606 @@ -1,5 +1,10 @@ 2006-05-06 Brian Warner + * buildbot/test/test_slavecommand.py (ShellBase.testInterrupt1): + mark this test as TODO under windows, since process-killing seems + dodgy there. We'll come back to this later and try to fix it + properly. + * buildbot/test/test_vc.py (CVSSupport.getdate): use localtime, and don't include a timezone (CVSSupport.vc_try_checkout): stop trying to strip the timezone. From warner at users.sourceforge.net Sun May 7 00:44:30 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 00:44:30 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_slavecommand.py,1.19,1.20 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12732/buildbot/test Modified Files: test_slavecommand.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-524 Creator: Brian Warner test_slavecommand.py: TODOify testInterrupt1 under windows * buildbot/test/test_slavecommand.py (ShellBase.testInterrupt1): mark this test as TODO under windows, since process-killing seems dodgy there. We'll come back to this later and try to fix it properly. Index: test_slavecommand.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_slavecommand.py,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- test_slavecommand.py 6 May 2006 23:51:28 -0000 1.19 +++ test_slavecommand.py 7 May 2006 00:44:28 -0000 1.20 @@ -204,6 +204,8 @@ self.failUnlessIn("command interrupted", got) if runtime.platformType == "posix": self.failUnlessIn("process killed by signal", got) + if runtime.platformType != 'posix': + testInterrupt1.todo = "interrupt doesn't appear to work under windows" # todo: twisted-specific command tests From warner at users.sourceforge.net Sun May 7 00:20:24 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 00:20:24 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.51,1.52 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2208/buildbot/test Modified Files: test_vc.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-522 Creator: Brian Warner add a test-patch-only testcase to isolate a windows failure * buildbot/test/test_vc.py (Patch.testPatch): add a test which runs 'patch' with less overhead than the full VCBase.do_patch sequence, to try to isolate a windows test failure. This one uses slave.commands.ShellCommand and 'patch', but none of the VC code. Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- test_vc.py 6 May 2006 23:51:27 -0000 1.51 +++ test_vc.py 7 May 2006 00:20:22 -0000 1.52 @@ -14,7 +14,7 @@ #log.startLogging(sys.stderr) from buildbot import master, interfaces -from buildbot.slave import bot +from buildbot.slave import bot, commands from buildbot.slave.commands import rmdirRecursive from buildbot.status.builder import SUCCESS, FAILURE from buildbot.process import step, base @@ -2036,3 +2036,35 @@ b = base.Build([r]) s = step.SVN(svnurl="dummy", workdir=None, build=b) self.failUnlessEqual(s.computeSourceRevision(b.allChanges()), 67) + +class Patch(VCBase, unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + pass + + def testPatch(self): + # invoke 'patch' all by itself, to see if it works the way we think + # it should. This is intended to ferret out some windows test + # failures. + self.workdir = os.path.join("test_vc", "testPatch") + self.populate(self.workdir) + patch = which("patch")[0] + + command = [patch, "-p0"] + class FakeBuilder: + usePTY = False + def sendUpdate(self, status): + pass + c = commands.ShellCommand(FakeBuilder(), command, self.workdir, + sendRC=False, stdin=p0_diff) + d = c.start() + d.addCallback(self._testPatch_1) + return maybeWait(d) + + def _testPatch_1(self, res): + # make sure the file actually got patched + subdir_c = os.path.join(self.workdir, "subdir", "subdir.c") + data = open(subdir_c, "r").read() + self.failUnlessIn("Hello patched subdir.\\n", data) From warner at users.sourceforge.net Sun May 7 04:35:07 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 04:35:07 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.608,1.609 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23669 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-530 Creator: Brian Warner step_twisted.py: fix another typo * buildbot/process/step_twisted.py (Trial.setupEnvironment): more bugs in twisted-specific code not covered by my unit tests, this time use 'cmd' argument instead of self.cmd Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.608 retrieving revision 1.609 diff -u -d -r1.608 -r1.609 --- ChangeLog 7 May 2006 04:21:58 -0000 1.608 +++ ChangeLog 7 May 2006 04:35:04 -0000 1.609 @@ -1,5 +1,9 @@ 2006-05-06 Brian Warner + * buildbot/process/step_twisted.py (Trial.setupEnvironment): more + bugs in twisted-specific code not covered by my unit tests, this + time use 'cmd' argument instead of self.cmd + * buildbot/process/process_twisted.py (TwistedBuild.isFileImportant): fix stupid braino: either use startwith or find()==0, not both. (TwistedReactorsBuildFactory.__init__): another dumb typo From warner at users.sourceforge.net Sun May 7 04:22:00 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 04:22:00 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process process_twisted.py,1.44,1.45 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17356/buildbot/process Modified Files: process_twisted.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-528 Creator: Brian Warner fix another dumb typo * buildbot/process/process_twisted.py (TwistedReactorsBuildFactory.__init__): another dumb typo Index: process_twisted.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/process_twisted.py,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- process_twisted.py 7 May 2006 04:08:05 -0000 1.44 +++ process_twisted.py 7 May 2006 04:21:58 -0000 1.45 @@ -113,7 +113,7 @@ # # these are buggy, so tolerate failures for now # flunkOnFailure = 0 # warnOnFailure = 1 - self.stepaddStep(RemovePYCs) # TODO: why? + self.addStep(RemovePYCs) # TODO: why? self.addStep(TwistedTrial, name=reactor, python=python, reactor=reactor, flunkOnFailure=flunkOnFailure, warnOnFailure=warnOnFailure) From warner at users.sourceforge.net Sun May 7 04:22:00 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 04:22:00 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.607,1.608 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17356 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-528 Creator: Brian Warner fix another dumb typo * buildbot/process/process_twisted.py (TwistedReactorsBuildFactory.__init__): another dumb typo Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.607 retrieving revision 1.608 diff -u -d -r1.607 -r1.608 --- ChangeLog 7 May 2006 04:08:04 -0000 1.607 +++ ChangeLog 7 May 2006 04:21:58 -0000 1.608 @@ -2,6 +2,7 @@ * buildbot/process/process_twisted.py (TwistedBuild.isFileImportant): fix stupid braino: either use startwith or find()==0, not both. + (TwistedReactorsBuildFactory.__init__): another dumb typo * buildbot/test/test_slavecommand.py (ShellBase.testInterrupt1): mark this test as TODO under windows, since process-killing seems From warner at users.sourceforge.net Sun May 7 04:35:07 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 04:35:07 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process step_twisted.py,1.75,1.76 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23669/buildbot/process Modified Files: step_twisted.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-530 Creator: Brian Warner step_twisted.py: fix another typo * buildbot/process/step_twisted.py (Trial.setupEnvironment): more bugs in twisted-specific code not covered by my unit tests, this time use 'cmd' argument instead of self.cmd Index: step_twisted.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step_twisted.py,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- step_twisted.py 24 Apr 2006 06:45:37 -0000 1.75 +++ step_twisted.py 7 May 2006 04:35:04 -0000 1.76 @@ -370,9 +370,9 @@ def setupEnvironment(self, cmd): ShellCommand.setupEnvironment(self, cmd) if self.testpath != None: - e = self.cmd.args['env'] + e = cmd.args['env'] if e is None: - self.cmd.args['env'] = {'PYTHONPATH': self.testpath} + cmd.args['env'] = {'PYTHONPATH': self.testpath} else: # TODO: somehow, each build causes another copy of # self.testpath to get prepended @@ -381,7 +381,7 @@ else: e['PYTHONPATH'] = self.testpath + ":" + e['PYTHONPATH'] try: - p = self.cmd.args['env']['PYTHONPATH'] + p = cmd.args['env']['PYTHONPATH'] if type(p) is not str: log.msg("hey, not a string:", p) assert False From warner at users.sourceforge.net Sun May 7 04:08:07 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 04:08:07 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.606,1.607 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10173 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-526 Creator: Brian Warner fix stupid mistake in TwistedBuild.isFileImportant * buildbot/process/process_twisted.py (TwistedBuild.isFileImportant): fix stupid braino: either use startwith or find()==0, not both. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.606 retrieving revision 1.607 diff -u -d -r1.606 -r1.607 --- ChangeLog 7 May 2006 00:44:28 -0000 1.606 +++ ChangeLog 7 May 2006 04:08:04 -0000 1.607 @@ -1,5 +1,8 @@ 2006-05-06 Brian Warner + * buildbot/process/process_twisted.py (TwistedBuild.isFileImportant): + fix stupid braino: either use startwith or find()==0, not both. + * buildbot/test/test_slavecommand.py (ShellBase.testInterrupt1): mark this test as TODO under windows, since process-killing seems dodgy there. We'll come back to this later and try to fix it From warner at users.sourceforge.net Sun May 7 18:36:43 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 18:36:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process base.py,1.63,1.64 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26989/buildbot/process Modified Files: base.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-532 Creator: Brian Warner Try_Jobdir: windows fix, add logging to Build.setupBuild * buildbot/scheduler.py (Try_Jobdir.messageReceived): when operating under windows, move the file before opening it, since you can't rename a file that somebody has open. * buildbot/process/base.py (Build.setupBuild): if something goes wrong while creating a Step, log the name and arguments, since the error message when you get the number of arguments wrong is really opaque. Index: base.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/base.py,v retrieving revision 1.63 retrieving revision 1.64 diff -u -d -r1.63 -r1.64 --- base.py 24 Apr 2006 06:45:36 -0000 1.63 +++ base.py 7 May 2006 18:36:40 -0000 1.64 @@ -351,7 +351,12 @@ args = args.copy() if not args.has_key("workdir"): args['workdir'] = self.workdir - step = factory(build=self, **args) + try: + step = factory(build=self, **args) + except: + log.msg("error while creating step, factory=%s, args=%s" + % (factory, args)) + raise name = step.name count = 1 while name in stepnames and count < 100: From warner at users.sourceforge.net Sun May 7 18:36:43 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 18:36:43 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.609,1.610 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26989 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-532 Creator: Brian Warner Try_Jobdir: windows fix, add logging to Build.setupBuild * buildbot/scheduler.py (Try_Jobdir.messageReceived): when operating under windows, move the file before opening it, since you can't rename a file that somebody has open. * buildbot/process/base.py (Build.setupBuild): if something goes wrong while creating a Step, log the name and arguments, since the error message when you get the number of arguments wrong is really opaque. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.609 retrieving revision 1.610 diff -u -d -r1.609 -r1.610 --- ChangeLog 7 May 2006 04:35:04 -0000 1.609 +++ ChangeLog 7 May 2006 18:36:41 -0000 1.610 @@ -1,3 +1,14 @@ +2006-05-07 Brian Warner + + * buildbot/scheduler.py (Try_Jobdir.messageReceived): when + operating under windows, move the file before opening it, since + you can't rename a file that somebody has open. + + * buildbot/process/base.py (Build.setupBuild): if something goes + wrong while creating a Step, log the name and arguments, since the + error message when you get the number of arguments wrong is really + opaque. + 2006-05-06 Brian Warner * buildbot/process/step_twisted.py (Trial.setupEnvironment): more From warner at users.sourceforge.net Sun May 7 18:36:43 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 18:36:43 +0000 Subject: [Buildbot-commits] buildbot/buildbot scheduler.py,1.16,1.17 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26989/buildbot Modified Files: scheduler.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-532 Creator: Brian Warner Try_Jobdir: windows fix, add logging to Build.setupBuild * buildbot/scheduler.py (Try_Jobdir.messageReceived): when operating under windows, move the file before opening it, since you can't rename a file that somebody has open. * buildbot/process/base.py (Build.setupBuild): if something goes wrong while creating a Step, log the name and arguments, since the error message when you get the number of arguments wrong is really opaque. Index: scheduler.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scheduler.py,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- scheduler.py 17 Apr 2006 19:22:34 -0000 1.16 +++ scheduler.py 7 May 2006 18:36:41 -0000 1.17 @@ -4,7 +4,7 @@ from twisted.internet import reactor from twisted.application import service, internet, strports -from twisted.python import log +from twisted.python import log, runtime from twisted.protocols import basic from twisted.cred import portal, checkers from twisted.spread import pb @@ -587,10 +587,22 @@ def messageReceived(self, filename): md = os.path.join(self.parent.basedir, self.jobdir) - path = os.path.join(md, "new", filename) - f = open(path, "r") - os.rename(os.path.join(md, "new", filename), - os.path.join(md, "cur", filename)) + if runtime.platformType == "posix": + # open the file before moving it, because I'm afraid that once + # it's in cur/, someone might delete it at any moment + path = os.path.join(md, "new", filename) + f = open(path, "r") + os.rename(os.path.join(md, "new", filename), + os.path.join(md, "cur", filename)) + else: + # do this backwards under windows, because you can't move a file + # that somebody is holding open. This was causing a Permission + # Denied error on bear's win32-twisted1.3 buildslave. + os.rename(os.path.join(md, "new", filename), + os.path.join(md, "cur", filename)) + path = os.path.join(md, "cur", filename) + f = open(path, "r") + try: builderNames, ss, bsid = self.parseJob(f) except BadJobfile: From warner at users.sourceforge.net Sun May 7 04:08:08 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 04:08:08 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process process_twisted.py,1.43,1.44 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10173/buildbot/process Modified Files: process_twisted.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-526 Creator: Brian Warner fix stupid mistake in TwistedBuild.isFileImportant * buildbot/process/process_twisted.py (TwistedBuild.isFileImportant): fix stupid braino: either use startwith or find()==0, not both. Index: process_twisted.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/process_twisted.py,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- process_twisted.py 17 Apr 2006 19:22:34 -0000 1.43 +++ process_twisted.py 7 May 2006 04:08:05 -0000 1.44 @@ -11,9 +11,9 @@ class TwistedBuild(Build): workdir = "Twisted" # twisted's bin/trial expects to live in here def isFileImportant(self, filename): - if filename.startswith("doc/fun/") == 0: + if filename.startswith("doc/fun/"): return 0 - if filename.startswith("sandbox/") == 0: + if filename.startswith("sandbox/"): return 0 return 1 From warner at users.sourceforge.net Sat May 6 23:51:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 06 May 2006 23:51:29 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.603,1.604 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21248 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-520 Creator: Brian Warner windows compat: improve test_vc, test_slavecommand, and commands * buildbot/test/test_vc.py (CVSSupport.getdate): use localtime, and don't include a timezone (CVSSupport.vc_try_checkout): stop trying to strip the timezone. This should avoid the windows-with-verbose-timezone-name problem altogether. * buildbot/slave/commands.py (getCommand): use which() to find the executables for 'cvs', 'svn', etc. This ought to help under windows. * buildbot/test/test_vc.py (VCBase.do_getpatch): Delete the working directory before starting. If an earlier test failed, the leftover directory would mistakenly flunk a later test. (ArchCommon.registerRepository): fix some tla-vs-baz problems. Make sure that we use the right commandlines if which("tla") picks up "tla.exe" (as it does under windows). (TlaSupport.do_get): factor out this tla-vs-baz difference (TlaSupport.vc_create): more tla-vs-baz differences * buildbot/test/test_slavecommand.py (ShellBase.testShellMissingCommand): stop trying to assert anything about the error message: different shells on different OSes with different languages makes it hard, and it really isn't that interesting of a thing to test anyway. * buildbot/test/test_vc.py (CVSSupport.capable): skip CVS tests if we detect cvs-1.10 (which is the version shipped with OS-X 10.3 "Panther"), because it has a bug which flunks a couple tests in weird ways. I've checked that cvs-1.12.9 (as shipped with debian) is ok. OS-X 10.4 "Tiger" ships with cvs-1.11, but I haven't been able to test that yet. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.603 retrieving revision 1.604 diff -u -d -r1.603 -r1.604 --- ChangeLog 1 May 2006 00:10:57 -0000 1.603 +++ ChangeLog 6 May 2006 23:51:27 -0000 1.604 @@ -1,3 +1,37 @@ +2006-05-06 Brian Warner + + * buildbot/test/test_vc.py (CVSSupport.getdate): use localtime, + and don't include a timezone + (CVSSupport.vc_try_checkout): stop trying to strip the timezone. + This should avoid the windows-with-verbose-timezone-name problem + altogether. + + * buildbot/slave/commands.py (getCommand): use which() to find the + executables for 'cvs', 'svn', etc. This ought to help under + windows. + + * buildbot/test/test_vc.py (VCBase.do_getpatch): Delete the + working directory before starting. If an earlier test failed, the + leftover directory would mistakenly flunk a later test. + (ArchCommon.registerRepository): fix some tla-vs-baz problems. + Make sure that we use the right commandlines if which("tla") picks + up "tla.exe" (as it does under windows). + (TlaSupport.do_get): factor out this tla-vs-baz difference + (TlaSupport.vc_create): more tla-vs-baz differences + + * buildbot/test/test_slavecommand.py + (ShellBase.testShellMissingCommand): stop trying to assert + anything about the error message: different shells on different + OSes with different languages makes it hard, and it really isn't + that interesting of a thing to test anyway. + + * buildbot/test/test_vc.py (CVSSupport.capable): skip CVS tests if + we detect cvs-1.10 (which is the version shipped with OS-X 10.3 + "Panther"), because it has a bug which flunks a couple tests in + weird ways. I've checked that cvs-1.12.9 (as shipped with debian) + is ok. OS-X 10.4 "Tiger" ships with cvs-1.11, but I haven't been + able to test that yet. + 2006-04-30 Brian Warner * buildbot/test/test_vc.py (VCBase.runCommand): set $LC_ALL="C" to From warner at users.sourceforge.net Sun May 7 00:20:24 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 07 May 2006 00:20:24 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.604,1.605 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2208 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-522 Creator: Brian Warner add a test-patch-only testcase to isolate a windows failure * buildbot/test/test_vc.py (Patch.testPatch): add a test which runs 'patch' with less overhead than the full VCBase.do_patch sequence, to try to isolate a windows test failure. This one uses slave.commands.ShellCommand and 'patch', but none of the VC code. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.604 retrieving revision 1.605 diff -u -d -r1.604 -r1.605 --- ChangeLog 6 May 2006 23:51:27 -0000 1.604 +++ ChangeLog 7 May 2006 00:20:21 -0000 1.605 @@ -5,6 +5,10 @@ (CVSSupport.vc_try_checkout): stop trying to strip the timezone. This should avoid the windows-with-verbose-timezone-name problem altogether. + (Patch.testPatch): add a test which runs 'patch' with less + overhead than the full VCBase.do_patch sequence, to try to isolate + a windows test failure. This one uses slave.commands.ShellCommand + and 'patch', but none of the VC code. * buildbot/slave/commands.py (getCommand): use which() to find the executables for 'cvs', 'svn', etc. This ought to help under From warner at users.sourceforge.net Sat May 6 23:51:30 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 06 May 2006 23:51:30 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.46,1.47 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21248/buildbot/slave Modified Files: commands.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-520 Creator: Brian Warner windows compat: improve test_vc, test_slavecommand, and commands * buildbot/test/test_vc.py (CVSSupport.getdate): use localtime, and don't include a timezone (CVSSupport.vc_try_checkout): stop trying to strip the timezone. This should avoid the windows-with-verbose-timezone-name problem altogether. * buildbot/slave/commands.py (getCommand): use which() to find the executables for 'cvs', 'svn', etc. This ought to help under windows. * buildbot/test/test_vc.py (VCBase.do_getpatch): Delete the working directory before starting. If an earlier test failed, the leftover directory would mistakenly flunk a later test. (ArchCommon.registerRepository): fix some tla-vs-baz problems. Make sure that we use the right commandlines if which("tla") picks up "tla.exe" (as it does under windows). (TlaSupport.do_get): factor out this tla-vs-baz difference (TlaSupport.vc_create): more tla-vs-baz differences * buildbot/test/test_slavecommand.py (ShellBase.testShellMissingCommand): stop trying to assert anything about the error message: different shells on different OSes with different languages makes it hard, and it really isn't that interesting of a thing to test anyway. * buildbot/test/test_vc.py (CVSSupport.capable): skip CVS tests if we detect cvs-1.10 (which is the version shipped with OS-X 10.3 "Panther"), because it has a bug which flunks a couple tests in weird ways. I've checked that cvs-1.12.9 (as shipped with debian) is ok. OS-X 10.4 "Tiger" ships with cvs-1.11, but I haven't been able to test that yet. Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- commands.py 1 May 2006 00:10:57 -0000 1.46 +++ commands.py 6 May 2006 23:51:28 -0000 1.47 @@ -6,7 +6,7 @@ from twisted.internet import reactor, defer from twisted.python import log, failure, runtime -from buildbot.twcompat import implements +from buildbot.twcompat import implements, which from buildbot.slave.interfaces import ISlaveCommand from buildbot.slave.registry import registerSlaveCommand @@ -34,6 +34,12 @@ def __repr__(self): return "" % self.args[0] +def getCommand(name): + possibles = which(name) + if not possibles: + raise RuntimeError("Couldn't find executable for '%s'" % name) + return possibles[0] + def rmdirRecursive(dir): """This is a replacement for shutil.rmtree that works better under windows. Thanks to Bear at the OSAF for the code.""" @@ -851,7 +857,7 @@ def doPatch(self, res): patchlevel, diff = self.patch - command = ['patch', '-p%d' % patchlevel] + command = [getCommand("patch"), '-p%d' % patchlevel] dir = os.path.join(self.builder.basedir, self.workdir) # mark the directory so we don't try to update it later open(os.path.join(dir, ".buildbot-patched"), "w").write("patched\n") @@ -880,6 +886,7 @@ def setup(self, args): SourceBase.setup(self, args) + self.vcexe = getCommand("cvs") self.cvsroot = args['cvsroot'] self.cvsmodule = args['cvsmodule'] self.global_options = args.get('global_options', []) @@ -899,7 +906,7 @@ if self.login is not None: # need to do a 'cvs login' command first d = self.builder.basedir - command = (['cvs', '-d', self.cvsroot] + self.global_options + command = ([self.vcexe, '-d', self.cvsroot] + self.global_options + ['login']) c = ShellCommand(self.builder, command, d, sendRC=False, timeout=self.timeout, @@ -918,7 +925,7 @@ def doVCUpdate(self): d = os.path.join(self.builder.basedir, self.srcdir) - command = ['cvs', '-z3'] + self.global_options + ['update', '-dP'] + command = [self.vcexe, '-z3'] + self.global_options + ['update', '-dP'] if self.branch: command += ['-r', self.branch] if self.revision: @@ -934,7 +941,7 @@ verb = "export" else: verb = "checkout" - command = (['cvs', '-d', self.cvsroot, '-z3'] + + command = ([self.vcexe, '-d', self.cvsroot, '-z3'] + self.global_options + [verb, '-d', self.srcdir]) if self.branch: @@ -967,6 +974,7 @@ def setup(self, args): SourceBase.setup(self, args) + self.vcexe = getCommand("svn") self.svnurl = args['svnurl'] self.sourcedata = "%s\n" % self.svnurl @@ -981,7 +989,7 @@ revision = self.args['revision'] or 'HEAD' # update: possible for mode in ('copy', 'update') d = os.path.join(self.builder.basedir, self.srcdir) - command = ['svn', 'update', '--revision', str(revision)] + command = [self.vcexe, 'update', '--revision', str(revision)] c = ShellCommand(self.builder, command, d, sendRC=False, timeout=self.timeout, keepStdout=True) @@ -992,11 +1000,11 @@ revision = self.args['revision'] or 'HEAD' d = self.builder.basedir if self.mode == "export": - command = ['svn', 'export', '--revision', str(revision), + command = [self.vcexe, 'export', '--revision', str(revision), self.svnurl, self.srcdir] else: # mode=='clobber', or copy/update on a broken workspace - command = ['svn', 'checkout', '--revision', str(revision), + command = [self.vcexe, 'checkout', '--revision', str(revision), self.svnurl, self.srcdir] c = ShellCommand(self.builder, command, d, sendRC=False, timeout=self.timeout, @@ -1011,7 +1019,7 @@ if self.mode == "export": # without the .svn metadir, svn info won't work return None - command = ["svn", "info"] + command = [self.vcexe, "info"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), environ=self.env, @@ -1041,6 +1049,7 @@ def setup(self, args): SourceBase.setup(self, args) + self.vcexe = getCommand("darcs") self.repourl = args['repourl'] self.sourcedata = "%s\n" % self.repourl self.revision = self.args.get('revision') @@ -1059,7 +1068,7 @@ assert not self.revision # update: possible for mode in ('copy', 'update') d = os.path.join(self.builder.basedir, self.srcdir) - command = ['darcs', 'pull', '--all', '--verbose'] + command = [self.vcexe, 'pull', '--all', '--verbose'] c = ShellCommand(self.builder, command, d, sendRC=False, timeout=self.timeout) self.command = c @@ -1068,7 +1077,7 @@ def doVCFull(self): # checkout or export d = self.builder.basedir - command = ['darcs', 'get', '--verbose', '--partial', + command = [self.vcexe, 'get', '--verbose', '--partial', '--repo-name', self.srcdir] if self.revision: # write the context to a file @@ -1095,7 +1104,7 @@ def parseGotRevision(self): # we use 'darcs context' to find out what we wound up with - command = ["darcs", "changes", "--context"] + command = [self.vcexe, "changes", "--context"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), environ=self.env, @@ -1159,12 +1168,12 @@ ['build-config']: if present, give to 'tla build-config' after checkout """ - arch_command = "tla" header = "arch operation" buildconfig = None def setup(self, args): SourceBase.setup(self, args) + self.vcexe = getCommand("tla") self.archive = args.get('archive') self.url = args['url'] self.version = args['version'] @@ -1190,7 +1199,7 @@ def doVCUpdate(self): # update: possible for mode in ('copy', 'update') d = os.path.join(self.builder.basedir, self.srcdir) - command = [self.arch_command, 'replay'] + command = [self.vcexe, 'replay'] if self.revision: command.append(self.revision) c = ShellCommand(self.builder, command, d, @@ -1204,7 +1213,7 @@ # figure out the archive name. tla will tell you the archive name # when it is done, and all further actions must refer to this name. - command = [self.arch_command, 'register-archive', '--force', self.url] + command = [self.vcexe, 'register-archive', '--force', self.url] c = ShellCommand(self.builder, command, self.builder.basedir, sendRC=False, keepStdout=True, timeout=self.timeout) @@ -1236,7 +1245,7 @@ ver = self.version if self.revision: ver += "--%s" % self.revision - command = [self.arch_command, 'get', '--archive', self.archive, + command = [self.vcexe, 'get', '--archive', self.archive, '--no-pristine', ver, self.srcdir] c = ShellCommand(self.builder, command, self.builder.basedir, @@ -1250,7 +1259,7 @@ def _didGet(self, res): d = os.path.join(self.builder.basedir, self.srcdir) - command = [self.arch_command, 'build-config', self.buildconfig] + command = [self.vcexe, 'build-config', self.buildconfig] c = ShellCommand(self.builder, command, d, sendRC=False, timeout=self.timeout) self.command = c @@ -1262,7 +1271,7 @@ # using code from tryclient.TlaExtractor # 'tla logs --full' gives us ARCHIVE/BRANCH--REVISION # 'tla logs' gives us REVISION - command = ["tla", "logs", "--full", "--reverse"] + command = [self.vcexe, "logs", "--full", "--reverse"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), environ=self.env, @@ -1290,10 +1299,9 @@ ['archive'] (required): the name of the archive being used """ - arch_command = "baz" - def setup(self, args): Arch.setup(self, args) + self.vcexe = getCommand("baz") # baz doesn't emit the repository name after registration (and # grepping through the output of 'baz archives' is too hard), so we # require that the buildmaster configuration to provide both the @@ -1311,7 +1319,7 @@ ver = self.archive + "/" + self.version if self.revision: ver += "--%s" % self.revision - command = [self.arch_command, 'get', '--no-pristine', + command = [self.vcexe, 'get', '--no-pristine', ver, self.srcdir] c = ShellCommand(self.builder, command, self.builder.basedir, sendRC=False, timeout=self.timeout) @@ -1324,7 +1332,7 @@ def parseGotRevision(self): # using code from tryclient.BazExtractor - command = ["baz", "tree-id"] + command = [self.vcexe, "tree-id"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), environ=self.env, @@ -1356,6 +1364,7 @@ def setup(self, args): SourceBase.setup(self, args) + self.vcexe = getCommand("hg") self.repourl = args['repourl'] self.sourcedata = "%s\n" % self.repourl self.stdout = "" @@ -1374,7 +1383,7 @@ def doVCUpdate(self): d = os.path.join(self.builder.basedir, self.srcdir) - command = ['hg', 'pull', '--update', '--verbose'] + command = [self.vcexe, 'pull', '--update', '--verbose'] if self.args['revision']: command.extend(['--rev', self.args['revision']]) c = ShellCommand(self.builder, command, d, @@ -1397,7 +1406,7 @@ def doVCFull(self): d = os.path.join(self.builder.basedir, self.srcdir) - command = ['hg', 'clone'] + command = [self.vcexe, 'clone'] if self.args['revision']: command.extend(['--rev', self.args['revision']]) command.extend([self.repourl, d]) @@ -1408,7 +1417,7 @@ def parseGotRevision(self): # we use 'hg identify' to find out what we wound up with - command = ["hg", "identify"] + command = [self.vcexe, "identify"] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), environ=self.env, @@ -1439,17 +1448,18 @@ def setup(self, args): SourceBase.setup(self, args) + self.vcexe = getCommand("p4") self.p4port = args['p4port'] self.p4user = args['p4user'] self.p4passwd = args['p4passwd'] self.p4client = args['p4client'] - + def sourcedirIsUpdateable(self): return True def doVCUpdate(self): d = os.path.join(self.builder.basedir, self.srcdir) - command = ['p4'] + command = [self.vcexe] if self.p4port: command.extend(['-p', self.p4port]) if self.p4user: From warner at users.sourceforge.net Sat May 6 23:51:30 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 06 May 2006 23:51:30 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.50,1.51 test_slavecommand.py,1.18,1.19 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21248/buildbot/test Modified Files: test_vc.py test_slavecommand.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-520 Creator: Brian Warner windows compat: improve test_vc, test_slavecommand, and commands * buildbot/test/test_vc.py (CVSSupport.getdate): use localtime, and don't include a timezone (CVSSupport.vc_try_checkout): stop trying to strip the timezone. This should avoid the windows-with-verbose-timezone-name problem altogether. * buildbot/slave/commands.py (getCommand): use which() to find the executables for 'cvs', 'svn', etc. This ought to help under windows. * buildbot/test/test_vc.py (VCBase.do_getpatch): Delete the working directory before starting. If an earlier test failed, the leftover directory would mistakenly flunk a later test. (ArchCommon.registerRepository): fix some tla-vs-baz problems. Make sure that we use the right commandlines if which("tla") picks up "tla.exe" (as it does under windows). (TlaSupport.do_get): factor out this tla-vs-baz difference (TlaSupport.vc_create): more tla-vs-baz differences * buildbot/test/test_slavecommand.py (ShellBase.testShellMissingCommand): stop trying to assert anything about the error message: different shells on different OSes with different languages makes it hard, and it really isn't that interesting of a thing to test anyway. * buildbot/test/test_vc.py (CVSSupport.capable): skip CVS tests if we detect cvs-1.10 (which is the version shipped with OS-X 10.3 "Panther"), because it has a bug which flunks a couple tests in weird ways. I've checked that cvs-1.12.9 (as shipped with debian) is ok. OS-X 10.4 "Tiger" ships with cvs-1.11, but I haven't been able to test that yet. Index: test_slavecommand.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_slavecommand.py,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- test_slavecommand.py 1 May 2006 00:10:57 -0000 1.18 +++ test_slavecommand.py 6 May 2006 23:51:28 -0000 1.19 @@ -165,15 +165,10 @@ return maybeWait(d) def _testShellMissingCommand_1(self, res): self.failIfEqual(self.getrc(), 0) - got = self.getfile('stdout') + self.getfile('stderr') - self.failUnless(re.search(r'no such file', got, re.I) # unix - or re.search(r'cannot find the path specified', - got, re.I) # win32 - or re.search(r'is not recognized as', - got, re.I), # other win32 - "bogus command didn't create the expected error " - "message, got '%s'" % got - ) + # we used to check the error message to make sure it said something + # about a missing command, but there are a variety of shells out + # there, and they emit message sin a variety of languages, so we + # stopped trying. def testTimeout(self): args = {'command': [sys.executable, "sleep.py", "10"], Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- test_vc.py 1 May 2006 00:10:57 -0000 1.50 +++ test_vc.py 6 May 2006 23:51:27 -0000 1.51 @@ -814,6 +814,7 @@ # head of the trunk tmpdir = "try_workdir" self.trydir = os.path.join(self.repbase, tmpdir) + rmdirRecursive(self.trydir) d.addCallback(self.do_getpatch_trunkhead) d.addCallback(self.do_getpatch_trunkold) if doBranch: @@ -968,16 +969,44 @@ VCS["cvs"] = None cvspaths = which('cvs') if cvspaths: - VCS["cvs"] = cvspaths[0] + # cvs-1.10 (as shipped with OS-X 10.3 "Panther") is too old + # for this test. There is a situation where we check out a + # tree, make a change, then commit it back, and CVS refuses + # to believe that we're operating in a CVS tree. I tested + # cvs-1.12.9 and it works ok, OS-X 10.4 "Tiger" comes with + # cvs-1.11, but I haven't tested that yet. For now, skip the + # tests if we've got 1.10 . + log.msg("running %s --version.." % (cvspaths[0],)) + d = utils.getProcessOutput(cvspaths[0], ["--version"], + env=os.environ) + d.addCallback(self._capable, cvspaths[0]) + return d if not VCS["cvs"]: raise unittest.SkipTest("CVS is not installed") self.vcexe = VCS["cvs"] + def _capable(self, v, vcexe): + m = re.search(r'\(CVS\) ([\d\.]+) ', v) + if not m: + log.msg("couldn't identify CVS version number in output:") + log.msg("'''%s'''" % v) + log.msg("skipping tests") + VCS["cvs"] = None + raise unittest.SkipTest("Found CVS, but can't identify version") + ver = m.group(1) + log.msg("found CVS version '%s'" % ver) + if ver == "1.10": + VCS["cvs"] = None + raise unittest.SkipTest("Found CVS, but it is too old") + VCS["cvs"] = vcexe + self.vcexe = VCS["cvs"] + + def postCreate(self, res): self.vcargs = { 'cvsroot': self.cvsrep, 'cvsmodule': "sample" } def getdate(self): - return time.strftime("%Y-%m-%d %H:%M:%S %z", time.gmtime()) + return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) def vc_create(self): self.cvsrep = cvsrep = os.path.join(self.repbase, "CVS-Repository") @@ -1035,15 +1064,6 @@ def vc_try_checkout(self, workdir, rev, branch=None): # 'workdir' is an absolute path assert os.path.abspath(workdir) == workdir - - # get rid of non-numeric timezone info, which might not be parsed. - # This is in response to a non-US windows box which reports timezones - # in German like "Westeuropeische Normalzeit". We retain any numeric - # timezones present. TODO: I'm not convinced this won't result in a - # multi-hour offset for such a system. Where does the timezone name - # come from anyway? - rev = re.sub(r'[^0-9 :\-+]',"",rev) - rev = re.sub(" ","",rev) cmd = [self.vcexe, "-d", self.cvsrep, "checkout", "-d", workdir, "-D", rev] @@ -1369,24 +1389,21 @@ def registerRepository(self, coordinates): a = self.archname - w = self.do(self.repbase, "%s archives %s" % (self.archcmd, a)) + w = self.dovc(self.repbase, "archives %s" % a) yield w; out = w.getResult() if out: - w = self.do(self.repbase, - "%s register-archive -d %s" % (self.archcmd, a)) + w = self.dovc(self.repbase, "register-archive -d %s" % a) yield w; w.getResult() - w = self.do(self.repbase, - "%s register-archive %s" % (self.archcmd, coordinates)) + w = self.dovc(self.repbase, "register-archive %s" % coordinates) yield w; w.getResult() registerRepository = deferredGenerator(registerRepository) def unregisterRepository(self): a = self.archname - w = self.do(self.repbase, "%s archives %s" % (self.archcmd, a)) + w = self.dovc(self.repbase, "archives %s" % a) yield w; out = w.getResult() if out: - w = self.do(self.repbase, - "%s register-archive -d %s" % (self.archcmd, a)) + w = self.dovc(self.repbase, "register-archive -d %s" % a) yield w; out = w.getResult() unregisterRepository = deferredGenerator(unregisterRepository) @@ -1447,6 +1464,18 @@ d = self.unregisterRepository() return d + def do_get(self, basedir, archive, branch, newdir): + # the 'get' syntax is different between tla and baz. baz, while + # claiming to honor an --archive argument, in fact ignores it. The + # correct invocation is 'baz get archive/revision newdir'. + if self.archcmd == "tla": + w = self.dovc(basedir, + "get -A %s %s %s" % (archive, branch, newdir)) + else: + w = self.dovc(basedir, + "get %s/%s %s" % (archive, branch, newdir)) + return w + def vc_create(self): # pick a hopefully unique string for the archive name, in the form # test-%d at buildbot.sf.net--testvc, since otherwise multiple copies of @@ -1465,11 +1494,11 @@ self.populate(tmp) - w = self.do(tmp, "tla my-id", failureIsOk=True) + w = self.dovc(tmp, "my-id", failureIsOk=True) yield w; res = w.getResult() if not res: # tla will fail a lot of operations if you have not set an ID - w = self.do(tmp, ["tla", "my-id", + w = self.do(tmp, [self.vcexe, "my-id", "Buildbot Test Suite "]) yield w; w.getResult() @@ -1481,7 +1510,7 @@ # the same UID as one which uses baz on a regular basis, but # bazaar doesn't give us a way to disable the cache just for this # one archive. - cmd = "baz cache-config --disable" + cmd = "%s cache-config --disable" % VCS['baz'] w = self.do(tmp, cmd) yield w; w.getResult() @@ -1489,43 +1518,49 @@ yield w; w.getResult() # these commands can be run in any directory - w = self.do(tmp, "tla make-archive -l %s %s" % (a, self.archrep)) - yield w; w.getResult() - w = self.do(tmp, "tla archive-setup -A %s %s" % (a, trunk)) - yield w; w.getResult() - w = self.do(tmp, "tla archive-setup -A %s %s" % (a, branch)) + w = self.dovc(tmp, "make-archive -l %s %s" % (a, self.archrep)) yield w; w.getResult() + if self.archcmd == "tla": + w = self.dovc(tmp, "archive-setup -A %s %s" % (a, trunk)) + yield w; w.getResult() + w = self.dovc(tmp, "archive-setup -A %s %s" % (a, branch)) + yield w; w.getResult() + else: + # baz does not require an 'archive-setup' step + pass # these commands must be run in the directory that is to be imported - w = self.do(tmp, "tla init-tree --nested %s/%s" % (a, trunk)) + w = self.dovc(tmp, "init-tree --nested %s/%s" % (a, trunk)) yield w; w.getResult() files = " ".join(["main.c", "version.c", "subdir", os.path.join("subdir", "subdir.c")]) - w = self.do(tmp, "tla add-id %s" % files) + w = self.dovc(tmp, "add-id %s" % files) yield w; w.getResult() - w = self.do(tmp, "tla import %s/%s" % (a, trunk)) + w = self.dovc(tmp, "import %s/%s" % (a, trunk)) yield w; out = w.getResult() self.addTrunkRev("base-0") # create the branch - branchstart = "%s--base-0" % trunk - w = self.do(tmp, - "tla tag -A %s %s %s" % (a, branchstart, branch)) - yield w; w.getResult() + if self.archcmd == "tla": + branchstart = "%s--base-0" % trunk + w = self.dovc(tmp, "tag -A %s %s %s" % (a, branchstart, branch)) + yield w; w.getResult() + else: + w = self.dovc(tmp, "branch %s" % branch) + yield w; w.getResult() rmdirRecursive(tmp) # check out the branch - w = self.do(self.repbase, - "tla get -A %s %s archtmp" % (a, branch)) + w = self.do_get(self.repbase, a, branch, "archtmp") yield w; w.getResult() # and edit the file self.populate_branch(tmp) logfile = "++log.%s--%s" % (branch, a) logmsg = "Summary: commit on branch\nKeywords:\n\n" open(os.path.join(tmp, logfile), "w").write(logmsg) - w = self.do(tmp, "tla commit") + w = self.dovc(tmp, "commit") yield w; out = w.getResult() m = re.search(r'committed %s/%s--([\S]+)' % (a, branch), out) @@ -1558,8 +1593,7 @@ tmp = os.path.join(self.repbase, "archtmp") a = self.archname - cmd = "%s archives %s" % (self.archcmd, a) - w = self.do(self.repbase, cmd) + w = self.dovc(self.repbase, "archives %s" % a) yield w; out = w.getResult() assert out lines = out.split("\n") @@ -1571,15 +1605,7 @@ trunk = self.defaultbranch - # the 'get' syntax is different between tla and baz. baz, while - # claiming to honor an --archive argument, in fact ignores it. The - # correct invocation is 'baz get archive/revision newdir'. - if self.archcmd == 'tla': - cmd = "tla get -A %s %s archtmp" % (a, trunk) - else: - cmd = "baz get %s/%s archtmp" % (a, trunk) - w = self.do(self.repbase, cmd) - + w = self.do_get(self.repbase, a, trunk, "archtmp") yield w; w.getResult() # tla appears to use timestamps to determine which files have @@ -1593,7 +1619,7 @@ logfile = "++log.%s--%s" % (trunk, a) logmsg = "Summary: revised_to_%d\nKeywords:\n\n" % self.version open(os.path.join(tmp, logfile), "w").write(logmsg) - w = self.do(tmp, "%s commit" % self.archcmd) + w = self.dovc(tmp, "commit") yield w; out = w.getResult() m = re.search(r'committed %s/%s--([\S]+)' % (a, trunk), out) @@ -1617,14 +1643,7 @@ w = waitForDeferred(self.registerRepository(self.archrep)) yield w; w.getResult() - # the 'get' syntax is different between tla and baz. baz, while - # claiming to honor an --archive argument, in fact ignores it. The - # correct invocation is 'baz get archive/revision newdir'. - if self.archcmd == 'tla': - cmd = "tla get -A %s testvc--mainline--1 %s" % (a, workdir) - else: - cmd = "baz get %s/testvc--mainline--1 %s" % (a, workdir) - w = self.do(self.repbase, cmd) + w = self.do_get(self.repbase, a, "testvc--mainline--1", workdir) yield w; w.getResult() # timestamps. ick. From warner at users.sourceforge.net Fri May 19 06:20:03 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 06:20:03 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.610,1.611 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27413 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-535 Creator: Brian Warner use 'hg add' instead of deprecated 'hg addremove' * buildbot/test/test_vc.py (MercurialSupport.vc_create): 'hg addremove' has been deprecated in recent versions of mercurial, so use 'hg add' instead Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.610 retrieving revision 1.611 diff -u -d -r1.610 -r1.611 --- ChangeLog 7 May 2006 18:36:41 -0000 1.610 +++ ChangeLog 19 May 2006 06:20:00 -0000 1.611 @@ -1,3 +1,9 @@ +2006-05-18 Brian Warner + + * buildbot/test/test_vc.py (MercurialSupport.vc_create): 'hg + addremove' has been deprecated in recent versions of mercurial, so + use 'hg add' instead + 2006-05-07 Brian Warner * buildbot/scheduler.py (Try_Jobdir.messageReceived): when From warner at users.sourceforge.net Fri May 19 06:20:03 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 06:20:03 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.52,1.53 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27413/buildbot/test Modified Files: test_vc.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-535 Creator: Brian Warner use 'hg add' instead of deprecated 'hg addremove' * buildbot/test/test_vc.py (MercurialSupport.vc_create): 'hg addremove' has been deprecated in recent versions of mercurial, so use 'hg add' instead Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- test_vc.py 7 May 2006 00:20:22 -0000 1.52 +++ test_vc.py 19 May 2006 06:20:01 -0000 1.53 @@ -1856,7 +1856,7 @@ self.populate(tmp) w = self.dovc(tmp, "init") yield w; w.getResult() - w = self.dovc(tmp, "addremove") + w = self.dovc(tmp, "add") yield w; w.getResult() w = self.dovc(tmp, "commit -m initial_import") yield w; w.getResult() From warner at users.sourceforge.net Fri May 19 06:28:12 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 06:28:12 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.611,1.612 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30101 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-537 Creator: Brian Warner test_vc.py: refactor repository-setup stuff out into helper classes * buildbot/test/test_vc.py (VCS_Helper): factor out all the setup-repository and do-we-have-the-vc-tools code into a separate "helper" class, which sticks around in a single module-level object. This seems more likely to continue to work in the future than having it hide in the TestCase and hope that TestCases stick around for a long time. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.611 retrieving revision 1.612 diff -u -d -r1.611 -r1.612 --- ChangeLog 19 May 2006 06:20:00 -0000 1.611 +++ ChangeLog 19 May 2006 06:28:10 -0000 1.612 @@ -1,5 +1,12 @@ 2006-05-18 Brian Warner + * buildbot/test/test_vc.py (VCS_Helper): factor out all the + setup-repository and do-we-have-the-vc-tools code into a separate + "helper" class, which sticks around in a single module-level + object. This seems more likely to continue to work in the future + than having it hide in the TestCase and hope that TestCases stick + around for a long time. + * buildbot/test/test_vc.py (MercurialSupport.vc_create): 'hg addremove' has been deprecated in recent versions of mercurial, so use 'hg add' instead From warner at users.sourceforge.net Fri May 19 06:28:12 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 06:28:12 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.53,1.54 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30101/buildbot/test Modified Files: test_vc.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-537 Creator: Brian Warner test_vc.py: refactor repository-setup stuff out into helper classes * buildbot/test/test_vc.py (VCS_Helper): factor out all the setup-repository and do-we-have-the-vc-tools code into a separate "helper" class, which sticks around in a single module-level object. This seems more likely to continue to work in the future than having it hide in the TestCase and hope that TestCases stick around for a long time. Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- test_vc.py 19 May 2006 06:20:01 -0000 1.53 +++ test_vc.py 19 May 2006 06:28:10 -0000 1.54 @@ -48,9 +48,6 @@ # is running). -VCS = {} # maps VC name to pathname of the executable - - config_vc = """ from buildbot.process import factory, step s = factory.s @@ -159,6 +156,65 @@ } [...1347 lines suppressed...] d = self.do_getpatch() return maybeWait(d) - + +VCS.registerVC(Mercurial.vc_name, MercurialHelper()) + class Sources(unittest.TestCase): # TODO: this needs serious rethink @@ -2048,8 +2132,9 @@ # invoke 'patch' all by itself, to see if it works the way we think # it should. This is intended to ferret out some windows test # failures. + helper = BaseHelper() self.workdir = os.path.join("test_vc", "testPatch") - self.populate(self.workdir) + helper.populate(self.workdir) patch = which("patch")[0] command = [patch, "-p0"] From warner at users.sourceforge.net Fri May 19 06:51:39 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 06:51:39 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.612,1.613 NEWS,1.53,1.54 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5565 Modified Files: ChangeLog NEWS Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-539 Creator: Brian Warner update NEWS in preparation for next release * NEWS: update in preparation for next release Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.612 retrieving revision 1.613 diff -u -d -r1.612 -r1.613 --- ChangeLog 19 May 2006 06:28:10 -0000 1.612 +++ ChangeLog 19 May 2006 06:51:37 -0000 1.613 @@ -1,5 +1,7 @@ 2006-05-18 Brian Warner + * NEWS: update in preparation for next release + * buildbot/test/test_vc.py (VCS_Helper): factor out all the setup-repository and do-we-have-the-vc-tools code into a separate "helper" class, which sticks around in a single module-level Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- NEWS 17 Feb 2006 08:04:32 -0000 1.53 +++ NEWS 19 May 2006 06:51:37 -0000 1.54 @@ -1,5 +1,78 @@ User visible changes in Buildbot. +* Release ?? (??) + +** compatibility + +This release is compatible with Twisted-1.3.0, but the next one will not be. +Please upgrade to at least Twisted-2.0.x soon, as the next buildbot release +will require it. + +** new features + +*** Mercurial support + +Support for Mercurial version control system (http://selenic.com/mercurial) +has been added. This adds a buildbot.process.step.Mercurial BuildStep. A +suitable hook script to deliver changes to the buildmaster is still missing. + +*** 'buildbot restart' command + +The 'buildbot restart BASEDIR' command will perform a 'buildbot stop' and +'buildbot start', and will attempt to wait for the buildbot process to shut +down in between. This is useful when you need to upgrade the code on your +buildmaster or buildslave and want to take it down for a minimum amount of +time. + +*** build properties + +Each build now has a set of named "Build Properties", which can be set by +steps and interpolated into ShellCommands. The 'revision' and 'got_revision' +properties are the most interesting ones available at this point, and can be +used e.g. to get the VC revision number into the filename of a generated +tarball. See the user's manual section entited "Build Properties" for more +details. + +** minor features + +*** IRC now takes password= argument + +Useful for letting your bot claim a persistent identity. + +*** svn_buildbot.py is easier to modify to understand branches +*** BuildFactory has a new .addStep method +*** p4poller has new arguments +*** new contrib scripts: viewcvspoll, svnpoller, svn_watcher + +These poll an external VC repository to watch for changes, as opposed to +adding a hook script to the repository that pushes changes into the +buildmaster. This means higher latency but may be easier to configure, +especially if you do not have authority on the repository host. + +*** VC build property 'got_revision' + +The 'got_revision' property reports what revision a VC step actually +acquired, which may be useful to know when building from HEAD. + +*** improved CSS in Waterfall + +The Waterfall display has a few new class= tags, which may make it easier to +write custom CSS to make it look prettier. + +** bugfixes + +*** tests more likely to pass on non-English systems + +The unit test suite now sets $LANG='C' to make subcommands emit error +messages in english instead of whatever native language is in use on the +host. This improves the chances that the unit tests will pass on such +systems. This affects certain VC-related subcommands too. + +test_vc was assuming that the system time was expressed with a numeric +timezone, which is not always the case, especially under windows. This +probably works better now than it did before. + + * Release 0.7.2 (17 Feb 2006) ** new features From warner at users.sourceforge.net Fri May 19 07:44:24 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 07:44:24 +0000 Subject: [Buildbot-commits] buildbot/buildbot/scripts tryclient.py,1.14,1.15 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/scripts In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23702/buildbot/scripts Modified Files: tryclient.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-541 Creator: Brian Warner clean up timezone-string usage * buildbot/scripts/tryclient.py (CVSExtractor.getBaseRevision): use a timezone string of +0000 and gmtime, since this timestamp is sent to a buildmaster and %z is broken. * buildbot/test/test_vc.py (CVSHelper.getdate): use no timezone string and localtime, since this timestamp will only be consumed locally, and %z is broken. * buildbot/slave/commands.py (CVS.parseGotRevision): use +0000 and gmtime, since this timestamp is returned to the buildmaster, and %z is broken. Index: tryclient.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/tryclient.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- tryclient.py 1 May 2006 00:10:57 -0000 1.14 +++ tryclient.py 19 May 2006 07:44:21 -0000 1.15 @@ -44,9 +44,11 @@ patchlevel = 0 vcexe = "cvs" def getBaseRevision(self): - # this depends upon our local clock and the repository's clock pretty - # in reasonable sync with each other - self.baserev = time.strftime("%Y-%m-%d %H:%M:%S %z", + # this depends upon our local clock and the repository's clock being + # reasonably synchronized with each other. We express everything in + # UTC because the '%z' format specifier for strftime doesn't always + # work. + self.baserev = time.strftime("%Y-%m-%d %H:%M:%S +0000", time.gmtime(now())) return defer.succeed(None) From warner at users.sourceforge.net Fri May 19 07:44:24 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 07:44:24 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.613,1.614 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23702 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-541 Creator: Brian Warner clean up timezone-string usage * buildbot/scripts/tryclient.py (CVSExtractor.getBaseRevision): use a timezone string of +0000 and gmtime, since this timestamp is sent to a buildmaster and %z is broken. * buildbot/test/test_vc.py (CVSHelper.getdate): use no timezone string and localtime, since this timestamp will only be consumed locally, and %z is broken. * buildbot/slave/commands.py (CVS.parseGotRevision): use +0000 and gmtime, since this timestamp is returned to the buildmaster, and %z is broken. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.613 retrieving revision 1.614 diff -u -d -r1.613 -r1.614 --- ChangeLog 19 May 2006 06:51:37 -0000 1.613 +++ ChangeLog 19 May 2006 07:44:22 -0000 1.614 @@ -1,3 +1,17 @@ +2006-05-19 Brian Warner + + * buildbot/scripts/tryclient.py (CVSExtractor.getBaseRevision): + use a timezone string of +0000 and gmtime, since this timestamp is + sent to a buildmaster and %z is broken. + + * buildbot/test/test_vc.py (CVSHelper.getdate): use no timezone + string and localtime, since this timestamp will only be consumed + locally, and %z is broken. + + * buildbot/slave/commands.py (CVS.parseGotRevision): use +0000 and + gmtime, since this timestamp is returned to the buildmaster, and + %z is broken. + 2006-05-18 Brian Warner * NEWS: update in preparation for next release From warner at users.sourceforge.net Fri May 19 07:44:24 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 07:44:24 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_vc.py,1.54,1.55 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23702/buildbot/test Modified Files: test_vc.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-541 Creator: Brian Warner clean up timezone-string usage * buildbot/scripts/tryclient.py (CVSExtractor.getBaseRevision): use a timezone string of +0000 and gmtime, since this timestamp is sent to a buildmaster and %z is broken. * buildbot/test/test_vc.py (CVSHelper.getdate): use no timezone string and localtime, since this timestamp will only be consumed locally, and %z is broken. * buildbot/slave/commands.py (CVS.parseGotRevision): use +0000 and gmtime, since this timestamp is returned to the buildmaster, and %z is broken. Index: test_vc.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- test_vc.py 19 May 2006 06:28:10 -0000 1.54 +++ test_vc.py 19 May 2006 07:44:22 -0000 1.55 @@ -1049,6 +1049,13 @@ return (True, None) def getdate(self): + # this timestamp is eventually passed to CVS in a -D argument, and + # strftime's %z specifier doesn't seem to work reliably (I get +0000 + # where I should get +0700 under linux sometimes, and windows seems + # to want to put a verbose 'Eastern Standard Time' in there), so + # leave off the timezone specifier and treat this as localtime. A + # valid alternative would be to use a hard-coded +0000 and + # time.gmtime(). return time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) def createRepository(self): From warner at users.sourceforge.net Fri May 19 07:44:24 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Fri, 19 May 2006 07:44:24 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.47,1.48 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23702/buildbot/slave Modified Files: commands.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-541 Creator: Brian Warner clean up timezone-string usage * buildbot/scripts/tryclient.py (CVSExtractor.getBaseRevision): use a timezone string of +0000 and gmtime, since this timestamp is sent to a buildmaster and %z is broken. * buildbot/test/test_vc.py (CVSHelper.getdate): use no timezone string and localtime, since this timestamp will only be consumed locally, and %z is broken. * buildbot/slave/commands.py (CVS.parseGotRevision): use +0000 and gmtime, since this timestamp is returned to the buildmaster, and %z is broken. Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- commands.py 6 May 2006 23:51:28 -0000 1.47 +++ commands.py 19 May 2006 07:44:22 -0000 1.48 @@ -959,7 +959,7 @@ # the current timestamp as a best-effort guess, but this depends upon # the local system having a clock that is # reasonably-well-synchronized with the repository. - return time.strftime("%Y-%m-%d %H:%M:%S %z", time.gmtime()) + return time.strftime("%Y-%m-%d %H:%M:%S +0000", time.gmtime()) registerSlaveCommand("cvs", CVS, cvs_ver) From warner at users.sourceforge.net Sat May 20 22:15:06 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 20 May 2006 22:15:06 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.614,1.615 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19768 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-543 Creator: Brian Warner slave.commands.Darcs: use binary-mode for context file, for windows * buildbot/slave/commands.py (Darcs.doVCFull): when writing the .darcs-context file, use binary mode. I think this was causing a Darcs failure under windows. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.614 retrieving revision 1.615 diff -u -d -r1.614 -r1.615 --- ChangeLog 19 May 2006 07:44:22 -0000 1.614 +++ ChangeLog 20 May 2006 22:15:03 -0000 1.615 @@ -1,3 +1,9 @@ +2006-05-20 Brian Warner + + * buildbot/slave/commands.py (Darcs.doVCFull): when writing the + .darcs-context file, use binary mode. I think this was causing a + Darcs failure under windows. + 2006-05-19 Brian Warner * buildbot/scripts/tryclient.py (CVSExtractor.getBaseRevision): From warner at users.sourceforge.net Sat May 20 22:15:06 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sat, 20 May 2006 22:15:06 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.48,1.49 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19768/buildbot/slave Modified Files: commands.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-543 Creator: Brian Warner slave.commands.Darcs: use binary-mode for context file, for windows * buildbot/slave/commands.py (Darcs.doVCFull): when writing the .darcs-context file, use binary mode. I think this was causing a Darcs failure under windows. Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- commands.py 19 May 2006 07:44:22 -0000 1.48 +++ commands.py 20 May 2006 22:15:04 -0000 1.49 @@ -1082,7 +1082,7 @@ if self.revision: # write the context to a file n = os.path.join(self.builder.basedir, ".darcs-context") - f = open(n, "w") # TODO: should this be 'wt'? + f = open(n, "wb") f.write(self.revision) f.close() # tell Darcs to use that context From warner at users.sourceforge.net Sun May 21 19:07:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 19:07:29 +0000 Subject: [Buildbot-commits] buildbot/contrib hg_buildbot.py,NONE,1.1 Message-ID: Update of /cvsroot/buildbot/buildbot/contrib In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21027/contrib Added Files: hg_buildbot.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-545 Creator: Brian Warner added a mercurial commit script * contrib/hg_buildbot.py: wrote a commit script for mercurial, to be placed in the [hooks] section of the central repository (the one that everybody pushes changes to). --- NEW FILE: hg_buildbot.py --- #! /usr/bin/python # This is a script which delivers Change events from Mercurial to the # buildmaster each time a changeset is pushed into a repository. Add it to # the 'incoming' commit hook on your canonical "central" repository, by # putting something like the following in the .hg/hgrc file of that # repository: # # [hooks] # incoming.buildbot = /PATH/TO/hg_buildbot.py BUILDMASTER:PORT # # Note that both Buildbot and Mercurial must be installed on the repository # machine. import os, sys, commands from StringIO import StringIO from buildbot.scripts import runner MASTER = sys.argv[1] CHANGESET_ID = os.environ["HG_NODE"] # TODO: consider doing 'import mercurial.hg' and extract this information # using the native python out = commands.getoutput("hg -v log -r %s" % CHANGESET_ID) # TODO: or maybe use --template instead of trying hard to parse everything #out = commands.getoutput("hg --template SOMETHING log -r %s" % CHANGESET_ID) s = StringIO(out) while True: line = s.readline() if not line: break if line.startswith("user:"): user = line[line.find(":")+1:].strip() elif line.startswith("files:"): files = line[line.find(":")+1:].strip().split() elif line.startswith("description:"): comments = "".join(s.readlines()) if comments[-1] == "\n": # this removes the additional newline that hg emits comments = comments[:-1] break change = { 'master': MASTER, # note: this is more likely to be a full email address, which would make # the left-hand "Changes" column kind of wide. The buildmaster should # probably be improved to display an abbreviation of the username. 'username': user, 'revision': CHANGESET_ID, 'comments': comments, 'files': files, } runner.sendchange(c, True) From warner at users.sourceforge.net Sun May 21 19:07:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 19:07:29 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.615,1.616 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21027 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-545 Creator: Brian Warner added a mercurial commit script * contrib/hg_buildbot.py: wrote a commit script for mercurial, to be placed in the [hooks] section of the central repository (the one that everybody pushes changes to). Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.615 retrieving revision 1.616 diff -u -d -r1.615 -r1.616 --- ChangeLog 20 May 2006 22:15:03 -0000 1.615 +++ ChangeLog 21 May 2006 19:07:27 -0000 1.616 @@ -1,3 +1,9 @@ +2006-05-21 Brian Warner + + * contrib/hg_buildbot.py: wrote a commit script for mercurial, to + be placed in the [hooks] section of the central repository (the + one that everybody pushes changes to). + 2006-05-20 Brian Warner * buildbot/slave/commands.py (Darcs.doVCFull): when writing the From warner at users.sourceforge.net Sun May 21 19:51:37 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 19:51:37 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process process_twisted.py,1.45,1.46 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4874/buildbot/process Modified Files: process_twisted.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-547 Creator: Brian Warner fix twisted build process: setup.py no longer takes 'all' * buildbot/process/process_twisted.py (QuickTwistedBuildFactory.__init__): recent versions of Twisted changed the build process. The new setup.py no longer takes the 'all' argument. (FullTwistedBuildFactory.__init__): same (TwistedReactorsBuildFactory.__init__): same Index: process_twisted.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/process_twisted.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- process_twisted.py 7 May 2006 04:21:58 -0000 1.45 +++ process_twisted.py 21 May 2006 19:51:35 -0000 1.46 @@ -46,7 +46,7 @@ self.addStep(HLint, python=python[0]) self.addStep(RemovePYCs) for p in python: - cmd = [p, "setup.py", "all", "build_ext", "-i"] + cmd = [p, "setup.py", "build_ext", "-i"] self.addStep(step.Compile, command=cmd, flunkOnFailure=True) self.addStep(TwistedTrial, python=p, testChanges=True) @@ -64,7 +64,7 @@ python = [python] assert isinstance(compileOpts, list) assert isinstance(compileOpts2, list) - cmd = (python + compileOpts + ["setup.py", "all", "build_ext"] + cmd = (python + compileOpts + ["setup.py", "build_ext"] + compileOpts2 + ["-i"]) self.addStep(step.Compile, command=cmd, flunkOnFailure=True) @@ -91,7 +91,7 @@ python = [python] assert isinstance(compileOpts, list) assert isinstance(compileOpts2, list) - cmd = (python + compileOpts + ["setup.py", "all", "build_ext"] + cmd = (python + compileOpts + ["setup.py", "build_ext"] + compileOpts2 + ["-i"]) self.addStep(step.Compile, command=cmd, warnOnFailure=True) From warner at users.sourceforge.net Sun May 21 19:51:37 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 19:51:37 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.616,1.617 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4874 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-547 Creator: Brian Warner fix twisted build process: setup.py no longer takes 'all' * buildbot/process/process_twisted.py (QuickTwistedBuildFactory.__init__): recent versions of Twisted changed the build process. The new setup.py no longer takes the 'all' argument. (FullTwistedBuildFactory.__init__): same (TwistedReactorsBuildFactory.__init__): same Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.616 retrieving revision 1.617 diff -u -d -r1.616 -r1.617 --- ChangeLog 21 May 2006 19:07:27 -0000 1.616 +++ ChangeLog 21 May 2006 19:51:34 -0000 1.617 @@ -1,5 +1,12 @@ 2006-05-21 Brian Warner + * buildbot/process/process_twisted.py + (QuickTwistedBuildFactory.__init__): recent versions of Twisted + changed the build process. The new setup.py no longer takes the + 'all' argument. + (FullTwistedBuildFactory.__init__): same + (TwistedReactorsBuildFactory.__init__): same + * contrib/hg_buildbot.py: wrote a commit script for mercurial, to be placed in the [hooks] section of the central repository (the one that everybody pushes changes to). From warner at users.sourceforge.net Sun May 21 21:28:28 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 21:28:28 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.617,1.618 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10213 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-549 Creator: Brian Warner add robots_txt= to Waterfall, thanks to Tobi Vollebregt * buildbot/status/html.py (Waterfall): add 'robots_txt=' argument, a filename to be served as 'robots.txt' to discourage web spiders. Adapted from a patch by Tobi Vollebregt, thanks! * buildbot/test/test_web.py (Waterfall._test_waterfall_5): test it * docs/buildbot.texinfo (HTML Waterfall): document it Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.617 retrieving revision 1.618 diff -u -d -r1.617 -r1.618 --- ChangeLog 21 May 2006 19:51:34 -0000 1.617 +++ ChangeLog 21 May 2006 21:28:26 -0000 1.618 @@ -1,5 +1,11 @@ 2006-05-21 Brian Warner + * buildbot/status/html.py (Waterfall): add 'robots_txt=' argument, + a filename to be served as 'robots.txt' to discourage web spiders. + Adapted from a patch by Tobi Vollebregt, thanks! + * buildbot/test/test_web.py (Waterfall._test_waterfall_5): test it + * docs/buildbot.texinfo (HTML Waterfall): document it + * buildbot/process/process_twisted.py (QuickTwistedBuildFactory.__init__): recent versions of Twisted changed the build process. The new setup.py no longer takes the From warner at users.sourceforge.net Sun May 21 21:28:28 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 21:28:28 +0000 Subject: [Buildbot-commits] buildbot/buildbot/status html.py,1.83,1.84 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/status In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10213/buildbot/status Modified Files: html.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-549 Creator: Brian Warner add robots_txt= to Waterfall, thanks to Tobi Vollebregt * buildbot/status/html.py (Waterfall): add 'robots_txt=' argument, a filename to be served as 'robots.txt' to discourage web spiders. Adapted from a patch by Tobi Vollebregt, thanks! * buildbot/test/test_web.py (Waterfall._test_waterfall_5): test it * docs/buildbot.texinfo (HTML Waterfall): document it Index: html.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/status/html.py,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- html.py 24 Apr 2006 07:47:02 -0000 1.83 +++ html.py 21 May 2006 21:28:26 -0000 1.84 @@ -1537,6 +1537,7 @@ status = None control = None favicon = None + robots_txt = None def __init__(self, status, control, changemaster, categories, css): """ @@ -1559,6 +1560,8 @@ request.finish() def getChild(self, path, request): + if path == "robots.txt" and self.robots_txt: + return static.File(self.robots_txt) if path == "buildbot.css" and self.css: return static.File(self.css) if path == "changes": @@ -1623,10 +1626,11 @@ """ compare_attrs = ["http_port", "distrib_port", "allowForce", - "categories", "css", "favicon"] + "categories", "css", "favicon", "robots_txt"] def __init__(self, http_port=None, distrib_port=None, allowForce=True, - categories=None, css=buildbot_css, favicon=buildbot_icon): + categories=None, css=buildbot_css, favicon=buildbot_icon, + robots_txt=None): """To have the buildbot run its own web server, pass a port number to C{http_port}. To have it run a web.distrib server @@ -1675,8 +1679,17 @@ Defaults to the buildbot/buildbot.png image provided in the distribution. Can be set to None to avoid using a favicon at all. - + + @type robots_txt: string + @param robots_txt: if set, provide the pathname of a robots.txt file. + Many search engines request this file and obey the + rules in it. E.g. to disallow them to crawl the + status page, put the following two lines in + robots.txt: + User-agent: * + Disallow: / """ + base.StatusReceiverMultiService.__init__(self) assert allowForce in (True, False) # TODO: implement others if type(http_port) is int: @@ -1692,6 +1705,7 @@ self.categories = categories self.css = css self.favicon = favicon + self.robots_txt = robots_txt def __repr__(self): if self.http_port is None: @@ -1718,6 +1732,7 @@ sr = StatusResource(status, control, change_svc, self.categories, self.css) sr.favicon = self.favicon + sr.robots_txt = self.robots_txt self.site = server.Site(sr) if self.http_port is not None: From warner at users.sourceforge.net Sun May 21 21:28:28 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 21:28:28 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.47,1.48 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10213/docs Modified Files: buildbot.texinfo Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-549 Creator: Brian Warner add robots_txt= to Waterfall, thanks to Tobi Vollebregt * buildbot/status/html.py (Waterfall): add 'robots_txt=' argument, a filename to be served as 'robots.txt' to discourage web spiders. Adapted from a patch by Tobi Vollebregt, thanks! * buildbot/test/test_web.py (Waterfall._test_waterfall_5): test it * docs/buildbot.texinfo (HTML Waterfall): document it Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- buildbot.texinfo 24 Apr 2006 09:56:19 -0000 1.47 +++ buildbot.texinfo 21 May 2006 21:28:26 -0000 1.48 @@ -3922,8 +3922,41 @@ appear at @code{http://host/buildbot/}, and the right virtual host setup can even place it at @code{http://buildbot.host/} . -In addition, the HTML page can have a favicon and custom CSS: see the -docstring for details. +Other arguments: + + at table @code + at item allowForce +If set to True (the default), then the web page will provide a ``Force +Build'' button that allows visitors to manually trigger builds. This +is useful for developers to re-run builds that have failed because of +intermittent problems in the test suite, or because of libraries that +were not installed at the time of the previous build. You may not wish +to allow strangers to cause a build to run: in that case, set this to +False to remove these buttons. + + at item favicon +If set to a string, this will be interpreted as a filename containing +a ``favicon'': a small image that contains an icon for the web site. +This is returned to browsers that request the @code{favicon.ico} file, +and should point to a .png or .ico image file. The default value uses +the buildbot/buildbot.png image (a small hex nut) contained in the +buildbot distribution. You can set this to None to avoid using a +favicon at all. + + at item robots_txt +If set to a string, this will be interpreted as a filename containing +the contents of ``robots.txt''. Many search engine spiders request +this file before indexing the site. Setting it to a file which +contains: + at example +User-agent: * +Disallow: / + at end example +will prevent most search engines from trawling the (voluminous) +generated status pages. + + at end table + @node IRC Bot, PBListener, HTML Waterfall, Status Delivery @subsection IRC Bot From warner at users.sourceforge.net Sun May 21 21:28:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 21:28:29 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_web.py,1.26,1.27 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10213/buildbot/test Modified Files: test_web.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-549 Creator: Brian Warner add robots_txt= to Waterfall, thanks to Tobi Vollebregt * buildbot/status/html.py (Waterfall): add 'robots_txt=' argument, a filename to be served as 'robots.txt' to discourage web spiders. Adapted from a patch by Tobi Vollebregt, thanks! * buildbot/test/test_web.py (Waterfall._test_waterfall_5): test it * docs/buildbot.texinfo (HTML Waterfall): document it Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- test_web.py 23 Jan 2006 23:03:27 -0000 1.26 +++ test_web.py 21 May 2006 21:28:26 -0000 1.27 @@ -187,26 +187,33 @@ class Waterfall(BaseWeb, unittest.TestCase): def test_waterfall(self): - # this is the right way to configure the Waterfall status - config1 = \ - (base_config + \ - "from buildbot.changes import mail\n" + - "c['sources'] = [mail.SyncmailMaildirSource('my-maildir')]\n" - + "c['status'] = [html.Waterfall(http_port=0)]\n") os.mkdir("test_web4") os.mkdir("my-maildir"); os.mkdir("my-maildir/new") + self.robots_txt_contents = "User-agent: *\nDisallow: /\n" + self.robots_txt = os.path.join("test_web4", "robots.txt") + f = open(self.robots_txt, "w") + f.write(self.robots_txt_contents) + f.close() + # this is the right way to configure the Waterfall status + config1 = base_config + """ +from buildbot.changes import mail +c['sources'] = [mail.SyncmailMaildirSource('my-maildir')] +c['status'] = [html.Waterfall(http_port=0, robots_txt='%s')] +""" % self.robots_txt + self.master = m = ConfiguredMaster("test_web4", config1) m.startService() # hack to find out what randomly-assigned port it is listening on port = list(self.find_waterfall(m)[0])[0]._port.getHost().port + self.port = port # insert an event m.change_svc.addChange(Change("user", ["foo.c"], "comments")) d = client.getPage("http://localhost:%d/" % port) - d.addCallback(self._test_waterfall_1, port) + d.addCallback(self._test_waterfall_1) return maybeWait(d) test_waterfall.timeout = 10 - def _test_waterfall_1(self, page, port): + def _test_waterfall_1(self, page): self.failUnless(page) self.failUnlessIn("current activity", page) self.failUnlessIn("Syncmail mailing list in maildir " + "my-maildir", changes) + d = client.getPage("http://localhost:%d/robots.txt" % self.port) + d.addCallback(self._test_waterfall_5) + return d + def _test_waterfall_5(self, robotstxt): + self.failUnless(robotstxt == self.robots_txt_contents) + geturl_config = """ from buildbot.status import html From warner at users.sourceforge.net Sun May 21 22:11:18 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 22:11:18 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_web.py,1.27,1.28 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27976/buildbot/test Modified Files: test_web.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-551 Creator: Brian Warner tweak test_web to see if it makes windows happier Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- test_web.py 21 May 2006 21:28:26 -0000 1.27 +++ test_web.py 21 May 2006 22:11:15 -0000 1.28 @@ -189,8 +189,9 @@ def test_waterfall(self): os.mkdir("test_web4") os.mkdir("my-maildir"); os.mkdir("my-maildir/new") + self.robots_txt = os.path.abspath(os.path.join("test_web4", + "robots.txt")) self.robots_txt_contents = "User-agent: *\nDisallow: /\n" - self.robots_txt = os.path.join("test_web4", "robots.txt") f = open(self.robots_txt, "w") f.write(self.robots_txt_contents) f.close() From warner at users.sourceforge.net Sun May 21 22:38:21 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 22:38:21 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.618,1.619 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5674 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-553 Creator: Brian Warner use repr(filename) in test_web.py, to try and fix a windows failure (Waterfall.test_waterfall): tweak the way that filenames are put into the config file, to accomodate windows pathnames better. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.618 retrieving revision 1.619 diff -u -d -r1.618 -r1.619 --- ChangeLog 21 May 2006 21:28:26 -0000 1.618 +++ ChangeLog 21 May 2006 22:38:19 -0000 1.619 @@ -4,6 +4,9 @@ a filename to be served as 'robots.txt' to discourage web spiders. Adapted from a patch by Tobi Vollebregt, thanks! * buildbot/test/test_web.py (Waterfall._test_waterfall_5): test it + (Waterfall.test_waterfall): tweak the way that filenames are put + into the config file, to accomodate windows pathnames better. + * docs/buildbot.texinfo (HTML Waterfall): document it * buildbot/process/process_twisted.py From warner at users.sourceforge.net Sun May 21 22:38:21 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 22:38:21 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_web.py,1.28,1.29 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5674/buildbot/test Modified Files: test_web.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-553 Creator: Brian Warner use repr(filename) in test_web.py, to try and fix a windows failure (Waterfall.test_waterfall): tweak the way that filenames are put into the config file, to accomodate windows pathnames better. Index: test_web.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- test_web.py 21 May 2006 22:11:15 -0000 1.28 +++ test_web.py 21 May 2006 22:38:19 -0000 1.29 @@ -199,8 +199,8 @@ config1 = base_config + """ from buildbot.changes import mail c['sources'] = [mail.SyncmailMaildirSource('my-maildir')] -c['status'] = [html.Waterfall(http_port=0, robots_txt='%s')] -""" % self.robots_txt +c['status'] = [html.Waterfall(http_port=0, robots_txt=%s)] +""" % repr(self.robots_txt) self.master = m = ConfiguredMaster("test_web4", config1) m.startService() From warner at users.sourceforge.net Sun May 21 23:12:49 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 23:12:49 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test__versions.py,NONE,1.1 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19282/buildbot/test Added Files: test__versions.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-555 Creator: Brian Warner add a pseudo-testcase to record versions of twisted/python/buildbot * buildbot/test/test__versions.py: add a pseudo-test to record what version of Twisted/Python/Buildbot are running. This should show up at the beginning of _trial_tmp/test.log, and exists to help debug other problems. --- NEW FILE: test__versions.py --- # This is a fake test which just logs the version of Twisted, to make it # easier to track down failures in other tests. from twisted.trial import unittest from twisted.python import log from twisted import copyright import sys import buildbot class Versions(unittest.TestCase): def test_versions(self): log.msg("Python Version: %s" % sys.version) log.msg("Twisted Version: %s" % copyright.version) log.msg("Buildbot Version: %s" % buildbot.version) From warner at users.sourceforge.net Sun May 21 23:12:49 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Sun, 21 May 2006 23:12:49 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.619,1.620 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19282 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-555 Creator: Brian Warner add a pseudo-testcase to record versions of twisted/python/buildbot * buildbot/test/test__versions.py: add a pseudo-test to record what version of Twisted/Python/Buildbot are running. This should show up at the beginning of _trial_tmp/test.log, and exists to help debug other problems. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.619 retrieving revision 1.620 diff -u -d -r1.619 -r1.620 --- ChangeLog 21 May 2006 22:38:19 -0000 1.619 +++ ChangeLog 21 May 2006 23:12:46 -0000 1.620 @@ -1,5 +1,10 @@ 2006-05-21 Brian Warner + * buildbot/test/test__versions.py: add a pseudo-test to record + what version of Twisted/Python/Buildbot are running. This should + show up at the beginning of _trial_tmp/test.log, and exists to help + debug other problems. + * buildbot/status/html.py (Waterfall): add 'robots_txt=' argument, a filename to be served as 'robots.txt' to discourage web spiders. Adapted from a patch by Tobi Vollebregt, thanks! From warner at users.sourceforge.net Mon May 22 00:35:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 00:35:29 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process step.py,1.84,1.85 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22712/buildbot/process Modified Files: step.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-557 Creator: Brian Warner fix (and add test for) a serious build-properties bug in ShellCommand * buildbot/process/step.py (ShellCommand.start): make testInterpolate pass. I was passing the uninterpolated command to the RemoteShellCommand constructor * buildbot/test/test_properties.py (Run.testInterpolate): new test to actually try to use build properties in a real build. This test fails. * buildbot/test/runutils.py (RunMixin.requestBuild): utility methods to start and evaluate builds Index: step.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- step.py 24 Apr 2006 06:45:36 -0000 1.84 +++ step.py 22 May 2006 00:35:27 -0000 1.85 @@ -995,7 +995,7 @@ command = self._interpolateProperties(self.command) # create the actual RemoteShellCommand instance now kwargs = self.remote_kwargs - kwargs['command'] = self.command + kwargs['command'] = command cmd = RemoteShellCommand(**kwargs) self.setupEnvironment(cmd) self.startCommand(cmd) From warner at users.sourceforge.net Mon May 22 00:35:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 00:35:29 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.620,1.621 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22712 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-557 Creator: Brian Warner fix (and add test for) a serious build-properties bug in ShellCommand * buildbot/process/step.py (ShellCommand.start): make testInterpolate pass. I was passing the uninterpolated command to the RemoteShellCommand constructor * buildbot/test/test_properties.py (Run.testInterpolate): new test to actually try to use build properties in a real build. This test fails. * buildbot/test/runutils.py (RunMixin.requestBuild): utility methods to start and evaluate builds Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.620 retrieving revision 1.621 diff -u -d -r1.620 -r1.621 --- ChangeLog 21 May 2006 23:12:46 -0000 1.620 +++ ChangeLog 22 May 2006 00:35:27 -0000 1.621 @@ -1,5 +1,15 @@ 2006-05-21 Brian Warner + * buildbot/process/step.py (ShellCommand.start): make + testInterpolate pass. I was passing the uninterpolated command to + the RemoteShellCommand constructor + + * buildbot/test/test_properties.py (Run.testInterpolate): new test + to actually try to use build properties in a real build. This test + fails. + * buildbot/test/runutils.py (RunMixin.requestBuild): utility methods + to start and evaluate builds + * buildbot/test/test__versions.py: add a pseudo-test to record what version of Twisted/Python/Buildbot are running. This should show up at the beginning of _trial_tmp/test.log, and exists to help From warner at users.sourceforge.net Mon May 22 00:35:29 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 00:35:29 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test runutils.py,1.3,1.4 test_properties.py,1.1,1.2 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22712/buildbot/test Modified Files: runutils.py test_properties.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-557 Creator: Brian Warner fix (and add test for) a serious build-properties bug in ShellCommand * buildbot/process/step.py (ShellCommand.start): make testInterpolate pass. I was passing the uninterpolated command to the RemoteShellCommand constructor * buildbot/test/test_properties.py (Run.testInterpolate): new test to actually try to use build properties in a real build. This test fails. * buildbot/test/runutils.py (RunMixin.requestBuild): utility methods to start and evaluate builds Index: runutils.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/runutils.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- runutils.py 14 Oct 2005 19:42:39 -0000 1.3 +++ runutils.py 22 May 2006 00:35:26 -0000 1.4 @@ -6,6 +6,9 @@ from buildbot import master, interfaces from buildbot.twcompat import maybeWait from buildbot.slave import bot +from buildbot.process.base import BuildRequest +from buildbot.sourcestamp import SourceStamp +from buildbot.status.builder import SUCCESS class MyBot(bot.Bot): def remote_getSlaveInfo(self): @@ -94,6 +97,18 @@ d = self.master.botmaster.waitUntilBuilderAttached("dummy") return d + # things to start builds + def requestBuild(self, builder): + # returns a Deferred that fires with an IBuildStatus object when the + # build is finished + req = BuildRequest("forced build", SourceStamp()) + self.control.getBuilder(builder).requestBuild(req) + return req.waitUntilFinished() + + def failUnlessBuildSucceeded(self, bs): + self.failUnless(bs.getResults() == SUCCESS) + return bs # useful for chaining + def tearDown(self): log.msg("doing tearDown") d = self.shutdownAllSlaves() Index: test_properties.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_properties.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- test_properties.py 24 Apr 2006 06:45:36 -0000 1.1 +++ test_properties.py 22 May 2006 00:35:26 -0000 1.2 @@ -4,11 +4,13 @@ from twisted.trial import unittest +from buildbot.twcompat import maybeWait from buildbot.sourcestamp import SourceStamp from buildbot.process import base from buildbot.process.step import ShellCommand, WithProperties from buildbot.status import builder from buildbot.slave.commands import rmdirRecursive +from buildbot.test.runutils import RunMixin class MyBuildStep(ShellCommand): def _interpolateProperties(self, command): @@ -105,4 +107,36 @@ ["touch", "bot12-slave"]) +run_config = """ +from buildbot.process import step, factory +from buildbot.process.step import ShellCommand, WithProperties +s = factory.s + +BuildmasterConfig = c = {} +c['bots'] = [('bot1', 'sekrit')] +c['sources'] = [] +c['schedulers'] = [] +c['slavePortnum'] = 0 + +f1 = factory.BuildFactory([s(step.ShellCommand, + command=['touch', + WithProperties('%s-slave', 'slavename'), + ])]) + +b1 = {'name': 'full1', 'slavename': 'bot1', 'builddir': 'bd1', 'factory': f1} +c['builders'] = [b1] + +""" + +class Run(RunMixin, unittest.TestCase): + def testInterpolate(self): + # run an actual build with a step that interpolates a build property + d = self.master.loadConfig(run_config) + d.addCallback(lambda res: self.master.startService()) + d.addCallback(lambda res: self.connectOneSlave("bot1")) + d.addCallback(lambda res: self.requestBuild("full1")) + d.addCallback(self.failUnlessBuildSucceeded) + return maybeWait(d) + + # we test got_revision in test_vc From warner at users.sourceforge.net Mon May 22 00:50:33 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 00:50:33 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process step.py,1.85,1.86 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28737/buildbot/process Modified Files: step.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-559 Creator: Brian Warner fix another ShellCommand bug, where non-list commands were broken (ShellCommand._interpolateProperties): oops, handle non-list commands (i.e. strings with multiple words separated by spaces in them) properly, instead of forgetting about them. Index: step.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step.py,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- step.py 22 May 2006 00:35:27 -0000 1.85 +++ step.py 22 May 2006 00:50:31 -0000 1.86 @@ -969,7 +969,7 @@ def _interpolateProperties(self, command): # interpolate any build properties into our command if not isinstance(command, (list, tuple)): - return + return command command_argv = [] for argv in command: if isinstance(argv, WithProperties): From warner at users.sourceforge.net Mon May 22 00:50:33 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 00:50:33 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.621,1.622 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28737 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-559 Creator: Brian Warner fix another ShellCommand bug, where non-list commands were broken (ShellCommand._interpolateProperties): oops, handle non-list commands (i.e. strings with multiple words separated by spaces in them) properly, instead of forgetting about them. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.621 retrieving revision 1.622 diff -u -d -r1.621 -r1.622 --- ChangeLog 22 May 2006 00:35:27 -0000 1.621 +++ ChangeLog 22 May 2006 00:50:31 -0000 1.622 @@ -3,6 +3,9 @@ * buildbot/process/step.py (ShellCommand.start): make testInterpolate pass. I was passing the uninterpolated command to the RemoteShellCommand constructor + (ShellCommand._interpolateProperties): oops, handle non-list + commands (i.e. strings with multiple words separated by spaces in + them) properly, instead of forgetting about them. * buildbot/test/test_properties.py (Run.testInterpolate): new test to actually try to use build properties in a real build. This test From warner at users.sourceforge.net Mon May 22 08:16:27 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 08:16:27 +0000 Subject: [Buildbot-commits] buildbot/buildbot interfaces.py,1.40,1.41 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3999/buildbot Modified Files: interfaces.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-561 Creator: Brian Warner remove 'self' from IChangeSource argument list * buildbot/interfaces.py (IChangeSource): methods in Interfaces aren't supposed to have 'self' in their argument list Index: interfaces.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/interfaces.py,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- interfaces.py 24 Apr 2006 06:45:36 -0000 1.40 +++ interfaces.py 22 May 2006 08:16:25 -0000 1.41 @@ -24,15 +24,15 @@ self.changemaster.addChange(change) """ - def start(self): + def start(): """Called when the buildmaster starts. Can be used to establish connections to VC daemons or begin polling.""" - def stop(self): + def stop(): """Called when the buildmaster shuts down. Connections should be terminated, polling timers should be canceled.""" - def describe(self): + def describe(): """Should return a string which briefly describes this source. This string will be displayed in an HTML status page.""" From warner at users.sourceforge.net Mon May 22 08:16:27 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 08:16:27 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.622,1.623 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3999 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-561 Creator: Brian Warner remove 'self' from IChangeSource argument list * buildbot/interfaces.py (IChangeSource): methods in Interfaces aren't supposed to have 'self' in their argument list Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.622 retrieving revision 1.623 diff -u -d -r1.622 -r1.623 --- ChangeLog 22 May 2006 00:50:31 -0000 1.622 +++ ChangeLog 22 May 2006 08:16:25 -0000 1.623 @@ -1,3 +1,8 @@ +2006-05-22 Brian Warner + + * buildbot/interfaces.py (IChangeSource): methods in Interfaces + aren't supposed to have 'self' in their argument list + 2006-05-21 Brian Warner * buildbot/process/step.py (ShellCommand.start): make From warner at users.sourceforge.net Mon May 22 17:34:44 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 17:34:44 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.623,1.624 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17786 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-563 Creator: Brian Warner use 'svnversion' isntead of grepping 'svn info' for got_revision * buildbot/slave/commands.py (SVN.parseGotRevision._parse): use 'svnversion' instead of grepping the output of 'svn info', much simpler and avoids CR/LF problems on windows. Thanks to Olivier Bonnet for the suggestion. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.623 retrieving revision 1.624 diff -u -d -r1.623 -r1.624 --- ChangeLog 22 May 2006 08:16:25 -0000 1.623 +++ ChangeLog 22 May 2006 17:34:42 -0000 1.624 @@ -1,5 +1,10 @@ 2006-05-22 Brian Warner + * buildbot/slave/commands.py (SVN.parseGotRevision._parse): use + 'svnversion' instead of grepping the output of 'svn info', much + simpler and avoids CR/LF problems on windows. Thanks to Olivier + Bonnet for the suggestion. + * buildbot/interfaces.py (IChangeSource): methods in Interfaces aren't supposed to have 'self' in their argument list From warner at users.sourceforge.net Mon May 22 17:34:44 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 17:34:44 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.49,1.50 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17786/buildbot/slave Modified Files: commands.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-563 Creator: Brian Warner use 'svnversion' isntead of grepping 'svn info' for got_revision * buildbot/slave/commands.py (SVN.parseGotRevision._parse): use 'svnversion' instead of grepping the output of 'svn info', much simpler and avoids CR/LF problems on windows. Thanks to Olivier Bonnet for the suggestion. Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- commands.py 20 May 2006 22:15:04 -0000 1.49 +++ commands.py 22 May 2006 17:34:42 -0000 1.50 @@ -1015,11 +1015,9 @@ def parseGotRevision(self): # svn checkout operations finish with 'Checked out revision 16657.' # svn update operations finish the line 'At revision 16654.' - # But we don't use those. Instead, run 'svn info'. - if self.mode == "export": - # without the .svn metadir, svn info won't work - return None - command = [self.vcexe, "info"] + # But we don't use those. Instead, run 'svnversion'. + svnversion_command = getCommand("svnversion") + command = [svnversion_command] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), environ=self.env, @@ -1028,10 +1026,16 @@ c.usePTY = False d = c.start() def _parse(res): - r = re.search(r'^Revision: (\d+)$', c.stdout, re.M) - if r: - return int(r.group(1)) - return None + r = c.stdout.strip() + got_version = None + try: + got_version = int(r) + except ValueError: + msg =("SVN.parseGotRevision unable to parse output " + "of svnversion: '%s'" % r) + log.msg(msg) + self.sendStatus({'header': msg + "\n"}) + return got_version d.addCallback(_parse) return d From warner at users.sourceforge.net Mon May 22 18:02:34 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 18:02:34 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.624,1.625 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28104 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-565 Creator: Brian Warner give the WC_PATH option to svnversion, for older versions of SVN (SVN.parseGotRevision): oops, older verisons of 'svnversion' require the WC_PATH argument, so run 'svnversion .' instead. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.624 retrieving revision 1.625 diff -u -d -r1.624 -r1.625 --- ChangeLog 22 May 2006 17:34:42 -0000 1.624 +++ ChangeLog 22 May 2006 18:02:31 -0000 1.625 @@ -4,6 +4,8 @@ 'svnversion' instead of grepping the output of 'svn info', much simpler and avoids CR/LF problems on windows. Thanks to Olivier Bonnet for the suggestion. + (SVN.parseGotRevision): oops, older verisons of 'svnversion' + require the WC_PATH argument, so run 'svnversion .' instead. * buildbot/interfaces.py (IChangeSource): methods in Interfaces aren't supposed to have 'self' in their argument list From warner at users.sourceforge.net Mon May 22 18:02:34 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Mon, 22 May 2006 18:02:34 +0000 Subject: [Buildbot-commits] buildbot/buildbot/slave commands.py,1.50,1.51 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/slave In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28104/buildbot/slave Modified Files: commands.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-565 Creator: Brian Warner give the WC_PATH option to svnversion, for older versions of SVN (SVN.parseGotRevision): oops, older verisons of 'svnversion' require the WC_PATH argument, so run 'svnversion .' instead. Index: commands.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/slave/commands.py,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- commands.py 22 May 2006 17:34:42 -0000 1.50 +++ commands.py 22 May 2006 18:02:32 -0000 1.51 @@ -1017,7 +1017,9 @@ # svn update operations finish the line 'At revision 16654.' # But we don't use those. Instead, run 'svnversion'. svnversion_command = getCommand("svnversion") - command = [svnversion_command] + # older versions of 'svnversion' (1.1.4) require the WC_PATH + # argument, newer ones (1.3.1) do not. + command = [svnversion_command, "."] c = ShellCommand(self.builder, command, os.path.join(self.builder.basedir, self.srcdir), environ=self.env, From warner at users.sourceforge.net Tue May 23 11:46:23 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 11:46:23 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.48,1.49 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17713/docs Modified Files: buildbot.texinfo Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-567 Creator: Brian Warner update some docs * docs/buildbot.texinfo (Build Properties): explain the syntax of property interpolation better * README (INSTALLATION): remove old '-v' argument from recommended trial command line * docs/buildbot.texinfo (ShellCommand): add docs for description= and descriptionDone= arguments. Thanks to Niklaus Giger for the patch. SF#1475494. Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- buildbot.texinfo 21 May 2006 21:28:26 -0000 1.48 +++ buildbot.texinfo 23 May 2006 11:46:21 -0000 1.49 @@ -3001,6 +3001,21 @@ @item timeout if the command fails to produce any output for this many seconds, it is assumed to be locked up and will be killed. + + at item description +This will be used to describe the command (on the Waterfall display) +while the command is still running. It should be a single +imperfect-tense verb, like ``compiling'' or ``testing''. + + at item descriptionDone +This will be used to describe the command once it has finished. A +simple noun like ``compile'' or ``tests'' should be used. + +If neither @code{description} nor @code{descriptionDone} are set, the +actual command arguments will be used to construct the description. +This may be a bit too wide to fit comfortably on the Waterfall +display. + @end table @node Simple ShellCommand Subclasses, , ShellCommand, Build Steps @@ -3090,7 +3105,7 @@ arbitrary at footnote{Build properties are serialized along with the build results, so they must be serializable. For this reason, the value of any build property should be simple inert data: strings, -numbers, lists, tuples, and dictionaries. They should not include +numbers, lists, tuples, and dictionaries. They should not contain class instances.} object. For example: @example @@ -3124,9 +3139,15 @@ The @code{WithProperties} function does @code{printf}-style string interpolation, using strings obtained by calling - at code{build.getProperty(propname)}. You can also use python -dictionary-style string interpolation by using the @code{%(propname)s} -syntax: + at code{build.getProperty(propname)}. Note that for every @code{%s} (or + at code{%d}, etc), you must have exactly one additional argument to +indicate which build property you want to insert. + + +You can also use python dictionary-style string interpolation by using +the @code{%(propname)s} syntax. In this form, the property name goes +in the parentheses, and WithProperties takes @emph{no} additional +arguments: @example s(ShellCommand, @@ -3136,6 +3157,9 @@ ) @end example +Don't forget the extra ``s'' after the closing parenthesis! This is +the cause of many confusing errors. + Note that, like python, you can either do positional-argument interpolation @emph{or} keyword-argument interpolation, not both. Thus you cannot use a string like From warner at users.sourceforge.net Tue May 23 11:46:23 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 11:46:23 +0000 Subject: [Buildbot-commits] buildbot README,1.29,1.30 ChangeLog,1.625,1.626 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17713 Modified Files: README ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-567 Creator: Brian Warner update some docs * docs/buildbot.texinfo (Build Properties): explain the syntax of property interpolation better * README (INSTALLATION): remove old '-v' argument from recommended trial command line * docs/buildbot.texinfo (ShellCommand): add docs for description= and descriptionDone= arguments. Thanks to Niklaus Giger for the patch. SF#1475494. Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.625 retrieving revision 1.626 diff -u -d -r1.625 -r1.626 --- ChangeLog 22 May 2006 18:02:31 -0000 1.625 +++ ChangeLog 23 May 2006 11:46:21 -0000 1.626 @@ -1,5 +1,15 @@ 2006-05-22 Brian Warner + * docs/buildbot.texinfo (Build Properties): explain the syntax of + property interpolation better + + * README (INSTALLATION): remove old '-v' argument from recommended + trial command line + + * docs/buildbot.texinfo (ShellCommand): add docs for description= + and descriptionDone= arguments. Thanks to Niklaus Giger for the + patch. SF#1475494. + * buildbot/slave/commands.py (SVN.parseGotRevision._parse): use 'svnversion' instead of grepping the output of 'svn info', much simpler and avoids CR/LF problems on windows. Thanks to Olivier Index: README =================================================================== RCS file: /cvsroot/buildbot/buildbot/README,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- README 5 Apr 2006 18:10:34 -0000 1.29 +++ README 23 May 2006 11:46:20 -0000 1.30 @@ -89,7 +89,7 @@ If you would like to run the unit test suite, use a command like this: - PYTHONPATH=. trial -v buildbot.test + PYTHONPATH=. trial buildbot.test This should run up to 175 tests, depending upon what VC tools you have installed. On my desktop machine it takes about four minutes to complete. From warner at users.sourceforge.net Tue May 23 11:46:45 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 11:46:45 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.626,1.627 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17754 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-568 Creator: Brian Warner add docs on ChangeSources, including hg_buildbot.py * docs/buildbot.texinfo (Change Sources): mention hg_buildbot.py, give a quick mapping from VC system to possible ChangeSources Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.626 retrieving revision 1.627 diff -u -d -r1.626 -r1.627 --- ChangeLog 23 May 2006 11:46:21 -0000 1.626 +++ ChangeLog 23 May 2006 11:46:43 -0000 1.627 @@ -1,3 +1,8 @@ +2006-05-23 Brian Warner + + * docs/buildbot.texinfo (Change Sources): mention hg_buildbot.py, + give a quick mapping from VC system to possible ChangeSources + 2006-05-22 Brian Warner * docs/buildbot.texinfo (Build Properties): explain the syntax of From warner at users.sourceforge.net Tue May 23 11:46:45 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 11:46:45 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.49,1.50 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17754/docs Modified Files: buildbot.texinfo Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-568 Creator: Brian Warner add docs on ChangeSources, including hg_buildbot.py * docs/buildbot.texinfo (Change Sources): mention hg_buildbot.py, give a quick mapping from VC system to possible ChangeSources Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- buildbot.texinfo 23 May 2006 11:46:21 -0000 1.49 +++ buildbot.texinfo 23 May 2006 11:46:43 -0000 1.50 @@ -2212,6 +2212,90 @@ provides a description of all available ChangeSource types and explains how to set up each of them. +There are a variety of ChangeSources available, some of which are +meant to be used in conjunction with other tools to deliver Change +events from the VC repository to the buildmaster. + + at itemize @bullet + + at item CVSToys +This ChangeSource opens a TCP connection from the buildmaster to a +waiting FreshCVS daemon that lives on the repository machine, and +subscribes to hear about Changes. + + at item MaildirSource +This one watches a local maildir-format inbox for email sent out by +the repository when a change is made. When a message arrives, it is +parsed to create the Change object. A variety of parsing functions are +available to accomodate different email-sending tools. + + at item PBChangeSource +This ChangeSource listens on a local TCP socket for inbound +connections from a separate tool. Usually, this tool would be run on +the VC repository machine in a commit hook. It is expected to connect +to the TCP socket and send a Change message over the network +connection. The @command{buildbot sendchange} command is one example +of a tool that knows how to send these messages, so you can write a +commit script for your VC system that calls it to deliver the Change. +There are other tools in the contrib/ directory that use the same +protocol. + + at end itemize + +As a quick guide, here is a list of VC systems and the ChangeSources +that might be useful with them. All of these ChangeSources are in the + at code{buildbot.changes} module. + + at table @code + at item CVS + + at itemize @bullet + at item freshcvs.FreshCVSSource (connected via TCP to the freshcvs daemon) + at item mail.FCMaildirSource (watching for email sent by a freshcvs daemon) + at item mail.BonsaiMaildirSource (watching for email sent by Bonsai) + at item mail.SyncmailMaildirSource (watching for email sent by syncmail) + at item pb.PBChangeSource (listening for connections from @code{buildbot +sendchange} run in a loginfo script) + at item pb.PBChangeSource (listening for connections from a long-running + at code{contrib/viewcvspoll.py} polling process which examines the ViewCVS +database directly + at end itemize + + at item SVN + at itemize @bullet + at item pb.PBChangeSource (listening for connections from + at code{contrib/svn_buildbot.py} run in a postcommit script) + at item pb.PBChangeSource (listening for connections from a long-running + at code{contrib/svn_watcher.py} or @code{contrib/svnpoller.py} polling +process + at end itemize + + at item Darcs + at itemize @bullet + at item pb.PBChangeSource (listening for connections from @code{buildbot +sendchange} in a commit script + at end itemize + + at item Mercurial + at itemize @bullet + at item pb.PBChangeSource (listening for connections from + at code{contrib/hg_buildbot.py} run in an 'incoming' hook) + at end itemize + + at item Arch/Bazaar + at itemize @bullet + at item pb.PBChangeSource (listening for connections from + at code{contrib/arch_buildbot.py} run in a commit hook) + at end itemize + + at end table + +All VC systems can be driven by a PBChangeSource and the + at code{buildbot sendchange} tool run from some form of commit script. +If you write an email parsing function, they can also all be driven by +a suitable @code{MaildirSource}. + + @menu * Choosing ChangeSources:: * CVSToys - PBService:: @@ -2245,6 +2329,7 @@ ignored by the changesource: it does not generate Changes for those files. + @node CVSToys - PBService, CVSToys - mail notification, Choosing ChangeSources, Change Sources @subsection CVSToys - PBService From warner at users.sourceforge.net Tue May 23 16:30:01 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 16:30:01 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.627,1.628 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29493 Modified Files: ChangeLog Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-570 Creator: Brian Warner fix 'buildnumber' property, add 'buildername' property * docs/buildbot.texinfo (Build Properties): add 'buildername' * buildbot/process/base.py (Build.setupStatus): oops, set 'buildername' and 'buildnumber' properties * buildbot/test/test_properties.py (Interpolate.testBuildNumber): test them Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.627 retrieving revision 1.628 diff -u -d -r1.627 -r1.628 --- ChangeLog 23 May 2006 11:46:43 -0000 1.627 +++ ChangeLog 23 May 2006 16:29:56 -0000 1.628 @@ -2,6 +2,12 @@ * docs/buildbot.texinfo (Change Sources): mention hg_buildbot.py, give a quick mapping from VC system to possible ChangeSources + (Build Properties): add 'buildername' + + * buildbot/process/base.py (Build.setupStatus): oops, set + 'buildername' and 'buildnumber' properties + * buildbot/test/test_properties.py (Interpolate.testBuildNumber): + test them 2006-05-22 Brian Warner From warner at users.sourceforge.net Tue May 23 16:29:58 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 16:29:58 +0000 Subject: [Buildbot-commits] buildbot/buildbot/process base.py,1.64,1.65 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/process In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29493/buildbot/process Modified Files: base.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-570 Creator: Brian Warner fix 'buildnumber' property, add 'buildername' property * docs/buildbot.texinfo (Build Properties): add 'buildername' * buildbot/process/base.py (Build.setupStatus): oops, set 'buildername' and 'buildnumber' properties * buildbot/test/test_properties.py (Interpolate.testBuildNumber): test them Index: base.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/process/base.py,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- base.py 7 May 2006 18:36:40 -0000 1.64 +++ base.py 23 May 2006 16:29:56 -0000 1.65 @@ -266,6 +266,8 @@ def setupStatus(self, build_status): self.build_status = build_status + self.setProperty("buildername", self.builder.name) + self.setProperty("buildnumber", self.build_status.number) self.setProperty("branch", self.source.branch) self.setProperty("revision", self.source.revision) From warner at users.sourceforge.net Tue May 23 16:29:58 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 16:29:58 +0000 Subject: [Buildbot-commits] buildbot/buildbot/test test_properties.py,1.2,1.3 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29493/buildbot/test Modified Files: test_properties.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-570 Creator: Brian Warner fix 'buildnumber' property, add 'buildername' property * docs/buildbot.texinfo (Build Properties): add 'buildername' * buildbot/process/base.py (Build.setupStatus): oops, set 'buildername' and 'buildnumber' properties * buildbot/test/test_properties.py (Interpolate.testBuildNumber): test them Index: test_properties.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_properties.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_properties.py 22 May 2006 00:35:26 -0000 1.2 +++ test_properties.py 23 May 2006 16:29:55 -0000 1.3 @@ -37,7 +37,7 @@ self.builder = FakeBuilder() self.builder_status = builder.BuilderStatus("fakebuilder") self.builder_status.basedir = "test_properties" - self.builder_status.nextBuildNumber = 0 + self.builder_status.nextBuildNumber = 5 rmdirRecursive(self.builder_status.basedir) os.mkdir(self.builder_status.basedir) self.build_status = self.builder_status.newBuild() @@ -71,11 +71,11 @@ self.failUnlessEqual(cmd, ["tar", "czf", "build-foo.tar.gz", "source"]) - def testWithPropertiesMissing(self): - self.build.setProperty("missing", None) + def testWithPropertiesEmpty(self): + self.build.setProperty("empty", None) c = ShellCommand(workdir=dir, build=self.build, command=["tar", "czf", - WithProperties("build-%(missing)s.tar.gz"), + WithProperties("build-%(empty)s.tar.gz"), "source"]) cmd = c._interpolateProperties(c.command) self.failUnlessEqual(cmd, @@ -106,6 +106,16 @@ self.failUnlessEqual(cmd, ["touch", "bot12-slave"]) + def testBuildNumber(self): + c = ShellCommand(workdir=dir, build=self.build, + command=["touch", + WithProperties("build-%d", "buildnumber"), + WithProperties("builder-%s", "buildername"), + ]) + cmd = c._interpolateProperties(c.command) + self.failUnlessEqual(cmd, + ["touch", "build-5", "builder-fakebuilder"]) + run_config = """ from buildbot.process import step, factory From warner at users.sourceforge.net Tue May 23 16:49:09 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 16:49:09 +0000 Subject: [Buildbot-commits] buildbot ChangeLog,1.628,1.629 NEWS,1.54,1.55 Message-ID: Update of /cvsroot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5255 Modified Files: ChangeLog NEWS Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-572 Creator: Brian Warner release buildbot-0.7.3 * buildbot/__init__.py (version): Releasing buildbot-0.7.3 * docs/buildbot.texinfo: set version to match * NEWS: update for 0.7.3 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v retrieving revision 1.628 retrieving revision 1.629 diff -u -d -r1.628 -r1.629 --- ChangeLog 23 May 2006 16:29:56 -0000 1.628 +++ ChangeLog 23 May 2006 16:49:07 -0000 1.629 @@ -1,5 +1,9 @@ 2006-05-23 Brian Warner + * buildbot/__init__.py (version): Releasing buildbot-0.7.3 + * docs/buildbot.texinfo: set version to match + * NEWS: update for 0.7.3 + * docs/buildbot.texinfo (Change Sources): mention hg_buildbot.py, give a quick mapping from VC system to possible ChangeSources (Build Properties): add 'buildername' Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/buildbot/NEWS,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- NEWS 19 May 2006 06:51:37 -0000 1.54 +++ NEWS 23 May 2006 16:49:07 -0000 1.55 @@ -1,6 +1,6 @@ User visible changes in Buildbot. -* Release ?? (??) +* Release 0.7.3 (23 May 2006) ** compatibility @@ -59,6 +59,12 @@ The Waterfall display has a few new class= tags, which may make it easier to write custom CSS to make it look prettier. +*** robots_txt= argument in Waterfall + +You can now pass a filename to the robots_txt= argument, which will be served +as the "robots.txt" file. This can be used to discourage search engine +spiders from crawling through the numerous build-status pages. + ** bugfixes *** tests more likely to pass on non-English systems @@ -70,7 +76,12 @@ test_vc was assuming that the system time was expressed with a numeric timezone, which is not always the case, especially under windows. This -probably works better now than it did before. +probably works better now than it did before. This only affects the CVS +tests. + +'buildbot try' (for CVS) now uses UTC instead of the local timezone. The +'got_revision' property is also expressed in UTC. Both should help deal with +buggy versions of CVS that don't parse numeric timezones properly. * Release 0.7.2 (17 Feb 2006) From warner at users.sourceforge.net Tue May 23 16:49:09 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 16:49:09 +0000 Subject: [Buildbot-commits] buildbot/buildbot __init__.py,1.22,1.23 Message-ID: Update of /cvsroot/buildbot/buildbot/buildbot In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5255/buildbot Modified Files: __init__.py Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-572 Creator: Brian Warner release buildbot-0.7.3 * buildbot/__init__.py (version): Releasing buildbot-0.7.3 * docs/buildbot.texinfo: set version to match * NEWS: update for 0.7.3 Index: __init__.py =================================================================== RCS file: /cvsroot/buildbot/buildbot/buildbot/__init__.py,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- __init__.py 12 Mar 2006 10:27:02 -0000 1.22 +++ __init__.py 23 May 2006 16:49:06 -0000 1.23 @@ -1,3 +1,3 @@ #! /usr/bin/python -version = "0.7.2+" +version = "0.7.3" From warner at users.sourceforge.net Tue May 23 16:49:09 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 16:49:09 +0000 Subject: [Buildbot-commits] buildbot/docs buildbot.texinfo,1.50,1.51 Message-ID: Update of /cvsroot/buildbot/buildbot/docs In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5255/docs Modified Files: buildbot.texinfo Log Message: Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-572 Creator: Brian Warner release buildbot-0.7.3 * buildbot/__init__.py (version): Releasing buildbot-0.7.3 * docs/buildbot.texinfo: set version to match * NEWS: update for 0.7.3 Index: buildbot.texinfo =================================================================== RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- buildbot.texinfo 23 May 2006 11:46:43 -0000 1.50 +++ buildbot.texinfo 23 May 2006 16:49:07 -0000 1.51 @@ -1,7 +1,7 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename buildbot.info - at settitle BuildBot Manual 0.7.2+ + at settitle BuildBot Manual 0.7.3 @c %**end of header @copying @@ -3296,10 +3296,11 @@ large string containing newlines, and is not suitable for interpolation into a filename. - at item slavename + at item buildername -This is a string which identifies which buildslave the build is -running on. +This is a string that indicates which Builder the build was a part of. +The combination of buildername and buildnumber uniquely identify a +build. @item buildnumber @@ -3307,6 +3308,11 @@ performed on any given Builder will have a build number of 0). This integer property contains the build's number. + at item slavename + +This is a string which identifies which buildslave the build is +running on. + @end table From warner at users.sourceforge.net Tue May 23 17:30:39 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 17:30:39 +0000 Subject: [Buildbot-commits] site ChangeLog,1.32,1.33 index.html,1.61,1.62 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22877 Modified Files: ChangeLog index.html Log Message: add Xenomai Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- ChangeLog 5 Apr 2006 18:55:42 -0000 1.32 +++ ChangeLog 23 May 2006 17:30:37 -0000 1.33 @@ -1,3 +1,7 @@ +2006-05-23 Brian Warner + + * index.html (Success Stories): add Xenomai + 2006-04-05 Brian Warner * index.html (Success Stories): add Logicalware, and CodeSourcery Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- index.html 5 Apr 2006 18:55:42 -0000 1.61 +++ index.html 23 May 2006 17:30:37 -0000 1.62 @@ -446,6 +446,19 @@ + Xenomai + + + + home page + + + Niklaus Giger has set up a buildbot for the Xenomai project. + + + + @@ -497,5 +510,5 @@ href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution Share-Alike license.

-Last modified: Wed Apr 5 14:52:00 EDT 2006 +Last modified: Tue May 23 10:29:49 PDT 2006 From warner at users.sourceforge.net Tue May 23 17:45:22 2006 From: warner at users.sourceforge.net (Brian Warner) Date: Tue, 23 May 2006 17:45:22 +0000 Subject: [Buildbot-commits] site bb-ChangeLog,NONE,1.1 manual-0.7.3.html,NONE,1.1 ChangeLog,1.33,1.34 NEWS,1.11,1.12 index.html,1.62,1.63 Message-ID: Update of /cvsroot/buildbot/site In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28851 Modified Files: ChangeLog NEWS index.html Added Files: bb-ChangeLog manual-0.7.3.html Log Message: updated for buildbot-0.7.3 Index: ChangeLog =================================================================== RCS file: /cvsroot/buildbot/site/ChangeLog,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- ChangeLog 23 May 2006 17:30:37 -0000 1.33 +++ ChangeLog 23 May 2006 17:45:19 -0000 1.34 @@ -1,5 +1,10 @@ 2006-05-23 Brian Warner + * all: updated for buildbot-0.7.3 + * bb-ChangeLog: oops, I've been publishing this ChangeLog for years + instead of the buildbot's ChangeLog. Fixed. + * manual-0.7.3.html: copied from new release + * index.html (Success Stories): add Xenomai 2006-04-05 Brian Warner Index: NEWS =================================================================== RCS file: /cvsroot/buildbot/site/NEWS,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- NEWS 17 Feb 2006 08:35:30 -0000 1.11 +++ NEWS 23 May 2006 17:45:19 -0000 1.12 @@ -1,5 +1,89 @@ User visible changes in Buildbot. +* Release 0.7.3 (23 May 2006) + +** compatibility + +This release is compatible with Twisted-1.3.0, but the next one will not be. +Please upgrade to at least Twisted-2.0.x soon, as the next buildbot release +will require it. + +** new features + +*** Mercurial support + +Support for Mercurial version control system (http://selenic.com/mercurial) +has been added. This adds a buildbot.process.step.Mercurial BuildStep. A +suitable hook script to deliver changes to the buildmaster is still missing. + +*** 'buildbot restart' command + +The 'buildbot restart BASEDIR' command will perform a 'buildbot stop' and +'buildbot start', and will attempt to wait for the buildbot process to shut +down in between. This is useful when you need to upgrade the code on your +buildmaster or buildslave and want to take it down for a minimum amount of +time. + +*** build properties + +Each build now has a set of named "Build Properties", which can be set by +steps and interpolated into ShellCommands. The 'revision' and 'got_revision' +properties are the most interesting ones available at this point, and can be +used e.g. to get the VC revision number into the filename of a generated +tarball. See the user's manual section entited "Build Properties" for more +details. + +** minor features + +*** IRC now takes password= argument + +Useful for letting your bot claim a persistent identity. + +*** svn_buildbot.py is easier to modify to understand branches +*** BuildFactory has a new .addStep method +*** p4poller has new arguments +*** new contrib scripts: viewcvspoll, svnpoller, svn_watcher + +These poll an external VC repository to watch for changes, as opposed to +adding a hook script to the repository that pushes changes into the +buildmaster. This means higher latency but may be easier to configure, +especially if you do not have authority on the repository host. + +*** VC build property 'got_revision' + +The 'got_revision' property reports what revision a VC step actually +acquired, which may be useful to know when building from HEAD. + +*** improved CSS in Waterfall + +The Waterfall display has a few new class= tags, which may make it easier to +write custom CSS to make it look prettier. + +*** robots_txt= argument in Waterfall + +You can now pass a filename to the robots_txt= argument, which will be served +as the "robots.txt" file. This can be used to discourage search engine +spiders from crawling through the numerous build-status pages. + +** bugfixes + +*** tests more likely to pass on non-English systems + +The unit test suite now sets $LANG='C' to make subcommands emit error +messages in english instead of whatever native language is in use on the +host. This improves the chances that the unit tests will pass on such +systems. This affects certain VC-related subcommands too. + +test_vc was assuming that the system time was expressed with a numeric +timezone, which is not always the case, especially under windows. This +probably works better now than it did before. This only affects the CVS +tests. + +'buildbot try' (for CVS) now uses UTC instead of the local timezone. The +'got_revision' property is also expressed in UTC. Both should help deal with +buggy versions of CVS that don't parse numeric timezones properly. + + * Release 0.7.2 (17 Feb 2006) ** new features --- NEW FILE: bb-ChangeLog --- 2006-05-23 Brian Warner * buildbot/__init__.py (version): Releasing buildbot-0.7.3 * docs/buildbot.texinfo: set version to match * NEWS: update for 0.7.3 * docs/buildbot.texinfo (Change Sources): mention hg_buildbot.py, give a quick mapping from VC system to possible ChangeSources (Build Properties): add 'buildername' * buildbot/process/base.py (Build.setupStatus): oops, set 'buildername' and 'buildnumber' properties * buildbot/test/test_properties.py (Interpolate.testBuildNumber): test them 2006-05-22 Brian Warner * docs/buildbot.texinfo (Build Properties): explain the syntax of property interpolation better [...6090 lines suppressed...] with 'bin/lore --output lint'. Use 'bin/trial -o' to remove ansi-color markup. Remove GenerateLore step. Count hlint warnings in GenerateDocs now that they are prefixed with WARNING:. * buildbot/status/html.py (StatusResource.body): Fix Builder link, use manual href target instead of request.childLink * buildbot/clients/gtkPanes.py: Fix progress countdown: update the display every second, but update the ETA every 5 seconds (or whenever) as remote_progress messages arrive. 2003-02-12 Brian Warner * *: import current sources from home CVS repository # Local Variables: # add-log-time-format: add-log-iso8601-time-string # End: Index: index.html =================================================================== RCS file: /cvsroot/buildbot/site/index.html,v retrieving revision 1.62 retrieving revision 1.63 diff -u -d -r1.62 -r1.63 --- index.html 23 May 2006 17:30:37 -0000 1.62 +++ index.html 23 May 2006 17:45:19 -0000 1.63 @@ -44,7 +44,7 @@

Current contents:

    -
  • The current release is buildbot-0.7.2 . You can download the source +
  • The current release is buildbot-0.7.3 . You can download the source from the sf.net download page here. The release is signed with my GPG public key, available here.
  • The README file contains an overview, while the User's Manual contains complete documentation. - The API Reference may be useful when + href="manual-0.7.3.html">User's Manual contains complete documentation. + The API Reference may be useful when writing the configuration file: the various Steps and Schedulers are documented there.
  • Recent changes are summarized in the NEWS file, while the complete details are in the ChangeLog.
  • + href="bb-ChangeLog">ChangeLog.
  • The paper delivered at PyCon-2003, along with the Please join the buildbot-devel mailing - list to be notified about new releases. + list to be notified about new releases, discuss how to configure and + use the buildbot, and to hear about new development. This is both a user + and a developer mailing list.
  • You can also join the buildbot-commits @@ -510,5 +512,5 @@ href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution Share-Alike license.

    -Last modified: Tue May 23 10:29:49 PDT 2006 +Last modified: Tue May 23 10:42:42 PDT 2006 --- NEW FILE: manual-0.7.3.html --- BuildBot Manual 0.7.3