From warner at users.sourceforge.net Sun Nov 7 20:09:09 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Sun, 07 Nov 2004 20:09:09 +0000
Subject: [Buildbot-commits] buildbot/docs/examples twisted_master.cfg,1.23,1.24
Message-ID:
Update of /cvsroot/buildbot/buildbot/docs/examples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12002/docs/examples
Modified Files:
twisted_master.cfg
Log Message:
update to match current usage on the Twisted buildbot
Index: twisted_master.cfg
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/examples/twisted_master.cfg,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- twisted_master.cfg 1 Oct 2004 01:56:29 -0000 1.23
+++ twisted_master.cfg 7 Nov 2004 20:09:07 -0000 1.24
@@ -20,6 +20,7 @@
from buildbot.status import html, words, client, mail
import private # holds passwords
+reload(private) # make it possible to change the contents without a restart
# I set really=False when testing this configuration at home
really = True
@@ -141,8 +142,10 @@
b23osx = {'name': "OS-X",
'slavename': "bot-OSX",
'builddir': "OSX-full2.3",
- 'factory': FullTwistedBuildFactory(svnurl,
- python="python2.3"),
+ 'factory': TwistedReactorsBuildFactory(svnurl,
+ python="python2.3",
+ reactors=["default", "cf"],
+ ),
}
builders.append(b23osx)
@@ -159,12 +162,12 @@
builders.append(b22w32)
b23bsd = {'name': "freebsd",
- 'slavename': "bot-freebsd",
+ 'slavename': "bot-dialtone",
'builddir': "bsd-full2.2",
'factory': TwistedReactorsBuildFactory(svnurl,
python="python2.3",
reactors=["default",
- #"kqueue",
+ "kqueue",
]),
}
builders.append(b23bsd)
@@ -199,7 +202,8 @@
c['interlocks'] = [("do-deb", ["full-2.2"], ["debuild"])]
c['status'].append(client.PBListener(9936))
m = mail.MailNotifier(fromaddr="buildbot at twistedmatrix.com",
- sendToInterestedUsers=False,
+ builders=["quick", "full-2.2", "full-2.3", "full-2.4"],
+ sendToInterestedUsers=True,
extraRecipients=["warner at lothar.com"],
mode="problem",
)
From warner at users.sourceforge.net Sun Nov 7 20:09:10 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Sun, 07 Nov 2004 20:09:10 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.299,1.300
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12002
Modified Files:
ChangeLog
Log Message:
update to match current usage on the Twisted buildbot
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.299
retrieving revision 1.300
diff -u -d -r1.299 -r1.300
--- ChangeLog 29 Oct 2004 18:03:42 -0000 1.299
+++ ChangeLog 7 Nov 2004 20:09:07 -0000 1.300
@@ -1,3 +1,8 @@
+2004-11-07 Brian Warner
+
+ * docs/examples/twisted_master.cfg: update to match current usage
+ on the Twisted buildbot
+
2004-10-29 Brian Warner
* buildbot/status/mail.py (MailNotifier): fix typo in docs
From warner at users.sourceforge.net Sun Nov 7 20:17:36 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Sun, 07 Nov 2004 20:17:36 +0000
Subject: [Buildbot-commits] buildbot/docs/examples twisted_master.cfg,1.24,1.25
Message-ID:
Update of /cvsroot/buildbot/buildbot/docs/examples
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14377
Modified Files:
twisted_master.cfg
Log Message:
also add manhole clause
Index: twisted_master.cfg
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/examples/twisted_master.cfg,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- twisted_master.cfg 7 Nov 2004 20:09:07 -0000 1.24
+++ twisted_master.cfg 7 Nov 2004 20:17:34 -0000 1.25
@@ -200,6 +200,8 @@
c['debugPassword'] = private.debugPassword
c['interlocks'] = [("do-deb", ["full-2.2"], ["debuild"])]
+if hasattr(private, "manhole"):
+ c['manhole'] = master.Manhole(*private.manhole)
c['status'].append(client.PBListener(9936))
m = mail.MailNotifier(fromaddr="buildbot at twistedmatrix.com",
builders=["quick", "full-2.2", "full-2.3", "full-2.4"],
From warner at users.sourceforge.net Sun Nov 7 20:32:50 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Sun, 07 Nov 2004 20:32:50 +0000
Subject: [Buildbot-commits] buildbot/buildbot/process builder.py,1.17,1.18
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17493/buildbot/process
Modified Files:
builder.py
Log Message:
(Builder._detached): clear the self.currentBuild reference, otherwise the
next build will be skipped because we think the Builder is already in use.
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/builder.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- builder.py 30 Sep 2004 10:05:43 -0000 1.17
+++ builder.py 7 Nov 2004 20:32:47 -0000 1.18
@@ -181,6 +181,7 @@
if self.currentBuild:
# wasn't enough
self.currentBuild.stopBuild("slave lost")
+ self.currentBuild = None
# TODO: should failover to a new Build
self.builder_status.addPointEvent(['disconnect'])
self.builder_status.currentlyOffline()
From warner at users.sourceforge.net Sun Nov 7 20:32:51 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Sun, 07 Nov 2004 20:32:51 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.300,1.301
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17493
Modified Files:
ChangeLog
Log Message:
(Builder._detached): clear the self.currentBuild reference, otherwise the
next build will be skipped because we think the Builder is already in use.
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.300
retrieving revision 1.301
diff -u -d -r1.300 -r1.301
--- ChangeLog 7 Nov 2004 20:09:07 -0000 1.300
+++ ChangeLog 7 Nov 2004 20:32:48 -0000 1.301
@@ -1,5 +1,9 @@
2004-11-07 Brian Warner
+ * buildbot/process/builder.py (Builder._detached): clear the
+ self.currentBuild reference, otherwise the next build will be
+ skipped because we think the Builder is already in use.
+
* docs/examples/twisted_master.cfg: update to match current usage
on the Twisted buildbot
From warner at users.sourceforge.net Mon Nov 8 09:03:23 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 09:03:23 +0000
Subject: [Buildbot-commits] buildbot/buildbot/test test_maildir.py,1.2,1.3
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13669/buildbot/test
Modified Files:
test_maildir.py
Log Message:
* buildbot/scripts/runner.py (createMaster): use shutil.copy()
instead of the unix-specific os.system("cp"), thanks to Elliot
Murphy for this and the other buildbot-vs-windows catches.
* buildbot/test/test_maildir.py (MaildirTest.deliverMail): same
* contrib/windows/buildbot.bat: prefix a '@', apparently to not
echo the command as it is run
* setup.py: install sample.mk too, not just sample.cfg
(scripts): install contrib/windows/buildbot.bat on windows
Index: test_maildir.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_maildir.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- test_maildir.py 14 Oct 2004 17:28:34 -0000 1.2
+++ test_maildir.py 8 Nov 2004 09:03:20 -0000 1.3
@@ -36,7 +36,7 @@
print "delivering", msg
newdir = os.path.join(self.maildir, "new")
# to do this right, use safecat
- os.system("cp %s %s/" % (msg, newdir))
+ shutil.copy(msg, newdir)
def timeout(self):
self.done = 1
From warner at users.sourceforge.net Mon Nov 8 09:03:22 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 09:03:22 +0000
Subject: [Buildbot-commits] buildbot/contrib/windows buildbot.bat,1.1,1.2
Message-ID:
Update of /cvsroot/buildbot/buildbot/contrib/windows
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13669/contrib/windows
Modified Files:
buildbot.bat
Log Message:
* buildbot/scripts/runner.py (createMaster): use shutil.copy()
instead of the unix-specific os.system("cp"), thanks to Elliot
Murphy for this and the other buildbot-vs-windows catches.
* buildbot/test/test_maildir.py (MaildirTest.deliverMail): same
* contrib/windows/buildbot.bat: prefix a '@', apparently to not
echo the command as it is run
* setup.py: install sample.mk too, not just sample.cfg
(scripts): install contrib/windows/buildbot.bat on windows
Index: buildbot.bat
===================================================================
RCS file: /cvsroot/buildbot/buildbot/contrib/windows/buildbot.bat,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- buildbot.bat 14 Oct 2004 16:48:47 -0000 1.1
+++ buildbot.bat 8 Nov 2004 09:03:20 -0000 1.2
@@ -1,2 +1,2 @@
-python C:\Python23\Scripts\buildbot %*
+ at python C:\Python23\Scripts\buildbot %*
From warner at users.sourceforge.net Mon Nov 8 09:03:23 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 09:03:23 +0000
Subject: [Buildbot-commits] buildbot/buildbot/scripts runner.py,1.6,1.7
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13669/buildbot/scripts
Modified Files:
runner.py
Log Message:
* buildbot/scripts/runner.py (createMaster): use shutil.copy()
instead of the unix-specific os.system("cp"), thanks to Elliot
Murphy for this and the other buildbot-vs-windows catches.
* buildbot/test/test_maildir.py (MaildirTest.deliverMail): same
* contrib/windows/buildbot.bat: prefix a '@', apparently to not
echo the command as it is run
* setup.py: install sample.mk too, not just sample.cfg
(scripts): install contrib/windows/buildbot.bat on windows
Index: runner.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- runner.py 14 Oct 2004 16:47:33 -0000 1.6
+++ runner.py 8 Nov 2004 09:03:21 -0000 1.7
@@ -1,6 +1,6 @@
#! /usr/bin/python
-import os, os.path, sys
+import os, os.path, sys, shutil
from twisted.python import usage, util
# this is mostly just a front-end for mktap, twistd, and kill(1), but in the
@@ -38,8 +38,7 @@
print "installing sample in master.cfg.sample instead"
target = "master.cfg.sample"
sampleconfig = util.sibpath(__file__, "sample.cfg")
- cmd = "cp %s %s" % (sampleconfig, target)
- os.system(cmd)
+ shutil.copy(sampleconfig, target)
target = "Makefile"
if os.path.exists(target):
@@ -47,8 +46,7 @@
print "installing sample in Makefile.sample instead"
target = "Makefile.sample"
samplemk = util.sibpath(__file__, "sample.mk")
- cmd = "cp %s %s" % (samplemk, target)
- os.system(cmd)
+ shutil.copy(samplemk, target)
if not quiet: print "buildmaster configured in %s" % basedir
sys.exit(0)
From warner at users.sourceforge.net Mon Nov 8 09:03:24 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 09:03:24 +0000
Subject: [Buildbot-commits] buildbot setup.py,1.29,1.30 ChangeLog,1.301,1.302
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13669
Modified Files:
setup.py ChangeLog
Log Message:
* buildbot/scripts/runner.py (createMaster): use shutil.copy()
instead of the unix-specific os.system("cp"), thanks to Elliot
Murphy for this and the other buildbot-vs-windows catches.
* buildbot/test/test_maildir.py (MaildirTest.deliverMail): same
* contrib/windows/buildbot.bat: prefix a '@', apparently to not
echo the command as it is run
* setup.py: install sample.mk too, not just sample.cfg
(scripts): install contrib/windows/buildbot.bat on windows
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.301
retrieving revision 1.302
diff -u -d -r1.301 -r1.302
--- ChangeLog 7 Nov 2004 20:32:48 -0000 1.301
+++ ChangeLog 8 Nov 2004 09:03:21 -0000 1.302
@@ -1,3 +1,16 @@
+2004-11-08 Brian Warner
+
+ * buildbot/scripts/runner.py (createMaster): use shutil.copy()
+ instead of the unix-specific os.system("cp"), thanks to Elliot
+ Murphy for this and the other buildbot-vs-windows catches.
+ * buildbot/test/test_maildir.py (MaildirTest.deliverMail): same
+
+ * contrib/windows/buildbot.bat: prefix a '@', apparently to not
+ echo the command as it is run
+
+ * setup.py: install sample.mk too, not just sample.cfg
+ (scripts): install contrib/windows/buildbot.bat on windows
+
2004-11-07 Brian Warner
* buildbot/process/builder.py (Builder._detached): clear the
Index: setup.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/setup.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- setup.py 24 Sep 2004 07:21:53 -0000 1.29
+++ setup.py 8 Nov 2004 09:03:21 -0000 1.30
@@ -1,5 +1,6 @@
#! /usr/bin/python
+import sys
from distutils.core import setup
from buildbot import version
@@ -31,6 +32,10 @@
improve.
"""
+scripts = ["bin/buildbot"]
+if sys.platform == "win32":
+ scripts.append("contrib/windows/buildbot.bat")
+
setup(name="buildbot",
version=version,
description="BuildBot build automation system",
@@ -48,8 +53,9 @@
"buildbot.scripts",
"buildbot.test"],
data_files=[("buildbot", ["buildbot/plugins.tml"]),
- ("buildbot/scripts", ["buildbot/scripts/sample.cfg"]),],
- scripts = ["bin/buildbot"],
+ ("buildbot/scripts", ["buildbot/scripts/sample.cfg",
+ "buildbot/scripts/sample.mk"]),],
+ scripts = scripts,
cmdclass={'install_data': install_data_twisted},
)
From warner at users.sourceforge.net Mon Nov 8 09:50:19 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 09:50:19 +0000
Subject: [Buildbot-commits] buildbot/buildbot/process step_twisted.py,1.61,1.62
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24463/buildbot/process
Modified Files:
step_twisted.py
Log Message:
(Trial.createSummary): survive when there are no test failures to be parsed
Index: step_twisted.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step_twisted.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- step_twisted.py 19 Oct 2004 18:41:40 -0000 1.61
+++ step_twisted.py 8 Nov 2004 09:50:17 -0000 1.62
@@ -524,6 +524,10 @@
# SKIPPED: testRETR (twisted.test.test_ftp.TestFTPServer)
# FAILURE: testBatchFile (twisted.conch.test.test_sftp.TestOurServerBatchFile)
r = re.search(r'^([^:]+): (\w+) \(([\w\.]+)\)', line)
+ if not r:
+ # TODO: cleanup, if there are no problems,
+ # we hit here
+ continue
result, name, case = r.groups()
testname = tuple(case.split(".") + [name])
results = {'SKIPPED': SKIPPED,
From warner at users.sourceforge.net Mon Nov 8 09:50:20 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 09:50:20 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.302,1.303
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24463
Modified Files:
ChangeLog
Log Message:
(Trial.createSummary): survive when there are no test failures to be parsed
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.302
retrieving revision 1.303
diff -u -d -r1.302 -r1.303
--- ChangeLog 8 Nov 2004 09:03:21 -0000 1.302
+++ ChangeLog 8 Nov 2004 09:50:17 -0000 1.303
@@ -1,5 +1,8 @@
2004-11-08 Brian Warner
+ * buildbot/process/step_twisted.py (Trial.createSummary): survive
+ when there are no test failures to be parsed
+
* buildbot/scripts/runner.py (createMaster): use shutil.copy()
instead of the unix-specific os.system("cp"), thanks to Elliot
Murphy for this and the other buildbot-vs-windows catches.
From warner at users.sourceforge.net Mon Nov 8 19:38:12 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 19:38:12 +0000
Subject: [Buildbot-commits] buildbot/buildbot/changes pb.py,1.3,1.4
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/changes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10125/buildbot/changes
Modified Files:
pb.py
Log Message:
(ChangePerspective): use a configurable separator character instead of
os.sep, because the filenames being split here are coming from the VC system,
which can have a different pathname convention than the local host. This
should help a buildmaster running on windows that uses a CVS repository which
runs under unix.
Index: pb.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/pb.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pb.py 8 Sep 2004 19:15:30 -0000 1.3
+++ pb.py 8 Nov 2004 19:38:09 -0000 1.4
@@ -10,9 +10,13 @@
class ChangePerspective(NewCredPerspective):
- def __init__(self, changemaster, prefix):
+ def __init__(self, changemaster, prefix, sep="/"):
self.changemaster = changemaster
self.prefix = prefix
+ # this is the separator as used by the VC system, not the local host.
+ # If for some reason you're running your CVS repository under
+ # windows, you'll need to use a PBChangeSource(sep="\\")
+ self.sep = sep
def attached(self, mind):
pass
@@ -22,10 +26,10 @@
pathnames = []
for path in changedict['files']:
if self.prefix:
- bits = path.split(os.sep)
+ bits = path.split(self.sep)
if bits[0] == self.prefix:
if bits[1:]:
- path = os.path.join(*bits[1:])
+ path = self.sep.join(bits[1:])
else:
path = ''
else:
@@ -43,7 +47,7 @@
__implements__ = IChangeSource, service.Service.__implements__
def __init__(self, user="change", passwd="changepw", port=None,
- prefix=None):
+ prefix=None, sep="/"):
# TODO: current limitations
assert user == "change"
assert passwd == "changepw"
@@ -52,6 +56,7 @@
self.passwd = passwd
self.port = port
self.prefix = prefix
+ self.sep = sep
def describe(self):
# TODO: when the dispatcher is fixed, report the specific port
@@ -76,5 +81,5 @@
master.dispatcher.unregister(self.user)
def getPerspective(self):
- return ChangePerspective(self.parent, self.prefix)
+ return ChangePerspective(self.parent, self.prefix, self.sep)
From warner at users.sourceforge.net Mon Nov 8 19:43:54 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 19:43:54 +0000
Subject: [Buildbot-commits] buildbot/buildbot/changes mail.py,1.14,1.15
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/changes
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11366
Modified Files:
mail.py
Log Message:
* buildbot/changes/pb.py (ChangePerspective): use a configurable
separator character instead of os.sep, because the filenames being
split here are coming from the VC system, which can have a
different pathname convention than the local host. This should
help a buildmaster running on windows that uses a CVS repository
which runs under unix.
* buildbot/changes/mail.py (MaildirSource): same, for all parsers
Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/changes/mail.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- mail.py 12 Oct 2004 17:51:04 -0000 1.14
+++ mail.py 8 Nov 2004 19:43:51 -0000 1.15
@@ -11,7 +11,7 @@
from buildbot.changes.maildirtwisted import MaildirTwisted
from buildbot.changes.changes import Change
-def parseFreshCVSMail(self, fd, prefix=None):
+def parseFreshCVSMail(self, fd, prefix=None, sep="/"):
"""Parse mail sent by FreshCVS"""
# this uses rfc822.Message so it can run under python2.1 . In the future
# it will be updated to use python2.2's "email" module.
@@ -50,9 +50,9 @@
if prefix:
# insist that the file start with the prefix: FreshCVS sends
# changes we don't care about too
- bits = file.split(os.sep)
+ bits = file.split(sep)
if bits[0] == prefix:
- file = apply(os.path.join, bits[1:])
+ file = sep.join(bits[1:])
else:
break
if len(linebits) == 1:
@@ -81,7 +81,7 @@
return change
-def parseSyncmail(self, fd, prefix=None):
+def parseSyncmail(self, fd, prefix=None, sep="/"):
"""Parse messages sent by the 'syncmail' program, as suggested by the
sourceforge.net CVS Admin documentation. Syncmail is maintained at
syncmail.sf.net .
@@ -152,18 +152,18 @@
# separator conventions established by the remote CVS server (which
# is probably running on unix), not the local buildmaster system.
thesefiles = line.split(" ")
- for file in thesefiles:
- file = os.path.join(directory, file)
+ for f in thesefiles:
+ f = sep.join([directory, f])
if prefix:
# insist that the file start with the prefix: we may get
# changes we don't care about too
- bits = file.split(os.sep)
+ bits = f.split(sep)
if bits[0] == prefix:
- file = apply(os.path.join, bits[1:])
+ f = sep.join(bits[1:])
else:
break
# TODO: figure out how new directories are described, set .isdir
- files.append(file)
+ files.append(f)
if not files:
return None
@@ -288,15 +288,17 @@
parser = None
name = None
- def __init__(self, maildir, prefix=None):
+ def __init__(self, maildir, prefix=None, sep="/"):
MaildirTwisted.__init__(self, maildir)
self.prefix = prefix
+ self.sep = sep
+
def describe(self):
return "%s mailing list in maildir %s" % (self.name, self.basedir)
def messageReceived(self, filename):
path = os.path.join(self.basedir, "new", filename)
- change = self.parser(open(path, "r"), self.prefix)
+ change = self.parser(open(path, "r"), self.prefix, self.sep)
if change:
self.parent.addChange(change)
os.rename(os.path.join(self.basedir, "new", filename),
From warner at users.sourceforge.net Mon Nov 8 21:19:41 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 21:19:41 +0000
Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.39,1.40
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2182/buildbot/status
Modified Files:
builder.py
Log Message:
(BuilderStatus.saveYourself): w32 can't do os.rename() onto an existing file,
so catch the exception and unlink the target file first. This introduces a
slight window where the existing file could be lost, but the main failure
case (disk full) should still be handled safely.
(BuildStatus.saveYourself): same
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- builder.py 15 Oct 2004 16:59:44 -0000 1.39
+++ builder.py 8 Nov 2004 21:19:39 -0000 1.40
@@ -757,7 +757,12 @@
tmpfilename = filename + ".tmp"
try:
pickle.dump(self, open(tmpfilename, "w"), -1)
- os.rename(tmpfilename, filename)
+ try:
+ os.rename(tmpfilename, filename)
+ except OSError:
+ # windows cannot rename a file on top of an existing one
+ os.unlink(filename)
+ os.rename(tmpfilename, filename)
except Exception, e:
log.msg("unable to save build %s-#%d" % (self.builder.name,
self.number))
@@ -843,7 +848,12 @@
tmpfilename = filename + ".tmp"
try:
pickle.dump(self, open(tmpfilename, "w"), -1)
- os.rename(tmpfilename, filename)
+ try:
+ os.rename(tmpfilename, filename)
+ except OSError:
+ # windows cannot rename a file on top of an existing one
+ os.unlink(filename)
+ os.rename(tmpfilename, filename)
except Exception, e:
log.msg("unable to save builder %s" % self.name)
log.err()
From warner at users.sourceforge.net Mon Nov 8 21:20:09 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 08 Nov 2004 21:20:09 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.303,1.304
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2271
Modified Files:
ChangeLog
Log Message:
*** empty log message ***
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.303
retrieving revision 1.304
diff -u -d -r1.303 -r1.304
--- ChangeLog 8 Nov 2004 09:50:17 -0000 1.303
+++ ChangeLog 8 Nov 2004 21:20:07 -0000 1.304
@@ -1,5 +1,20 @@
2004-11-08 Brian Warner
+ * buildbot/status/builder.py (BuilderStatus.saveYourself): w32
+ can't do os.rename() onto an existing file, so catch the exception
+ and unlink the target file first. This introduces a slight window
+ where the existing file could be lost, but the main failure case
+ (disk full) should still be handled safely.
+ (BuildStatus.saveYourself): same
+
+ * buildbot/changes/pb.py (ChangePerspective): use a configurable
+ separator character instead of os.sep, because the filenames being
+ split here are coming from the VC system, which can have a
+ different pathname convention than the local host. This should
+ help a buildmaster running on windows that uses a CVS repository
+ which runs under unix.
+ * buildbot/changes/mail.py (MaildirSource): same, for all parsers
+
* buildbot/process/step_twisted.py (Trial.createSummary): survive
when there are no test failures to be parsed
From warner at users.sourceforge.net Thu Nov 11 00:43:50 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 00:43:50 +0000
Subject: [Buildbot-commits] buildbot/buildbot/test test_status.py,1.10,1.11
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14702/buildbot/test
Modified Files:
test_status.py
Log Message:
* buildbot/status/mail.py (MailNotifier.buildMessage): add a Date
header to outbound mail
* buildbot/test/test_status.py (Mail.testBuild1): test for same
Index: test_status.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- test_status.py 15 Oct 2004 16:59:43 -0000 1.10
+++ test_status.py 11 Nov 2004 00:43:48 -0000 1.11
@@ -91,6 +91,7 @@
"recip at example.com\n", t)
self.failUnlessIn("From: buildbot at example.com\n", t)
self.failUnlessIn("Subject: buildbot success in builder1\n", t)
+ self.failUnlessIn("Date: ", t)
self.failUnlessIn("Build succeeded!\n", t)
self.failUnlessIn("Buildbot URL: BUILDBOT_URL\n", t)
From warner at users.sourceforge.net Thu Nov 11 00:43:51 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 00:43:51 +0000
Subject: [Buildbot-commits] buildbot/buildbot/status mail.py,1.11,1.12
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14702/buildbot/status
Modified Files:
mail.py
Log Message:
* buildbot/status/mail.py (MailNotifier.buildMessage): add a Date
header to outbound mail
* buildbot/test/test_status.py (Mail.testBuild1): test for same
Index: mail.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/mail.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- mail.py 29 Oct 2004 18:03:41 -0000 1.11
+++ mail.py 11 Nov 2004 00:43:48 -0000 1.12
@@ -3,6 +3,7 @@
# the email.MIMEMultipart module is only available in python-2.2.2 and later
from email.Message import Message
+from email.Utils import formatdate
from email.MIMEText import MIMEText
try:
from email.MIMEMultipart import MIMEMultipart
@@ -254,6 +255,7 @@
m = Message()
m.set_payload(text)
+ m['Date'] = formatdate(localtime=True)
m['Subject'] = self.subject % { 'result': res,
'builder': name,
}
From warner at users.sourceforge.net Thu Nov 11 00:43:51 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 00:43:51 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.304,1.305
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14702
Modified Files:
ChangeLog
Log Message:
* buildbot/status/mail.py (MailNotifier.buildMessage): add a Date
header to outbound mail
* buildbot/test/test_status.py (Mail.testBuild1): test for same
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.304
retrieving revision 1.305
diff -u -d -r1.304 -r1.305
--- ChangeLog 8 Nov 2004 21:20:07 -0000 1.304
+++ ChangeLog 11 Nov 2004 00:43:49 -0000 1.305
@@ -1,3 +1,9 @@
+2004-11-10 Brian Warner
+
+ * buildbot/status/mail.py (MailNotifier.buildMessage): add a Date
+ header to outbound mail
+ * buildbot/test/test_status.py (Mail.testBuild1): test for same
+
2004-11-08 Brian Warner
* buildbot/status/builder.py (BuilderStatus.saveYourself): w32
From warner at users.sourceforge.net Thu Nov 11 19:31:17 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 19:31:17 +0000
Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.40,1.41
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25522/buildbot/status
Modified Files:
builder.py
Log Message:
* buildbot/status/builder.py (LogFile.addEntry): Merge string
chunks together, up to 10kb per chunk. This ought to cut down on
the CPU-burning overhead of large log files. Thanks to Alexander
Staubo for spotting the problem.
* buildbot/test/test_status.py (Log): tests for same
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- builder.py 8 Nov 2004 21:19:39 -0000 1.40
+++ builder.py 11 Nov 2004 19:31:15 -0000 1.41
@@ -125,7 +125,15 @@
def addEntry(self, channel, text):
assert not self.finished
- self.entries.append((channel, text))
+ if (self.entries
+ and channel == self.entries[-1][0]
+ and len(self.entries[-1][1]) < 10000):
+ # merge same-category chunks together, up to 10kb each, to cut
+ # down on overhead when assembling these into a single big string
+ # later.
+ self.entries[-1] = (channel, self.entries[-1][1] + text)
+ else:
+ self.entries.append((channel, text))
for w in self.watchers:
w.logChunk(self.step.build, self.step, self, channel, text)
self.length += len(text)
From warner at users.sourceforge.net Thu Nov 11 19:31:17 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 19:31:17 +0000
Subject: [Buildbot-commits] buildbot/buildbot/test test_status.py,1.11,1.12
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25522/buildbot/test
Modified Files:
test_status.py
Log Message:
* buildbot/status/builder.py (LogFile.addEntry): Merge string
chunks together, up to 10kb per chunk. This ought to cut down on
the CPU-burning overhead of large log files. Thanks to Alexander
Staubo for spotting the problem.
* buildbot/test/test_status.py (Log): tests for same
Index: test_status.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- test_status.py 11 Nov 2004 00:43:48 -0000 1.11
+++ test_status.py 11 Nov 2004 19:31:06 -0000 1.12
@@ -235,3 +235,48 @@
self.failUnlessEqual(t.getResults(), builder.SUCCESS)
self.failUnlessEqual(t.getText(), ["passed"])
self.failUnlessEqual(t.getLogs(), {'output': ""})
+
+class Log(unittest.TestCase):
+ def testAdd(self):
+ l = builder.LogFile(None)
+ l.name = "compile"
+ l.step = 13
+ self.failUnlessEqual(l.getName(), "compile")
+ self.failUnlessEqual(l.getStep(), 13)
+ l.addHeader("HEADER\n")
+ l.addStdout("Some text\n")
+ l.addStderr("Some error\n")
+ l.addStdout("Some more text\n")
+ self.failUnlessEqual(l.getText(),
+ "Some text\nSome error\nSome more text\n")
+ self.failUnlessEqual(l.getTextWithHeaders(),
+ "HEADER\n" +
+ "Some text\nSome error\nSome more text\n")
+ self.failUnlessEqual(len(l.getChunks()), 4)
+
+ def testMerge(self):
+ l = builder.LogFile(None)
+ l.addHeader("HEADER\n")
+ l.addStdout("Some text\n")
+ l.addStdout("Some more text\n")
+ l.addStdout("more\n")
+ self.failUnlessEqual(l.getText(),
+ "Some text\nSome more text\nmore\n")
+ self.failUnlessEqual(l.getTextWithHeaders(),
+ "HEADER\n" +
+ "Some text\nSome more text\nmore\n")
+ self.failUnlessEqual(len(l.getChunks()), 2)
+
+ def testStubify(self):
+ l = builder.LogFile(None)
+ l.name = "compile"
+ l.step = 13
+ l.addHeader("HEADER\n")
+ l.addStdout("Some text\n")
+ l.addStdout("Some more text\n")
+ l.addStdout("more\n")
+ stub = l.stubify()
+ self.failUnless(components.implements(stub,
+ interfaces.IStatusLogStub))
+ self.failUnlessEqual(stub.getName(), l.getName())
+ self.failUnlessEqual(stub.getStep(), l.getStep())
From warner at users.sourceforge.net Thu Nov 11 19:31:18 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 19:31:18 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.305,1.306
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25522
Modified Files:
ChangeLog
Log Message:
* buildbot/status/builder.py (LogFile.addEntry): Merge string
chunks together, up to 10kb per chunk. This ought to cut down on
the CPU-burning overhead of large log files. Thanks to Alexander
Staubo for spotting the problem.
* buildbot/test/test_status.py (Log): tests for same
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.305
retrieving revision 1.306
diff -u -d -r1.305 -r1.306
--- ChangeLog 11 Nov 2004 00:43:49 -0000 1.305
+++ ChangeLog 11 Nov 2004 19:31:15 -0000 1.306
@@ -1,3 +1,11 @@
+2004-11-11 Brian Warner
+
+ * buildbot/status/builder.py (LogFile.addEntry): Merge string
+ chunks together, up to 10kb per chunk. This ought to cut down on
+ the CPU-burning overhead of large log files. Thanks to Alexander
+ Staubo for spotting the problem.
+ * buildbot/test/test_status.py (Log): tests for same
+
2004-11-10 Brian Warner
* buildbot/status/mail.py (MailNotifier.buildMessage): add a Date
From warner at users.sourceforge.net Thu Nov 11 20:47:17 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 20:47:17 +0000
Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.41,1.42
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9956/buildbot/status
Modified Files:
builder.py
Log Message:
* buildbot/status/builder.py (LogFile.addEntry): smarter way to do it: one
string merge per chunk. There are now separate .entries and .runEntries
lists: when enumerating over all chunks, make sure to look at both.
* buildbot/test/test_status.py (Log): more tests
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- builder.py 11 Nov 2004 19:31:15 -0000 1.41
+++ builder.py 11 Nov 2004 20:47:15 -0000 1.42
@@ -77,12 +77,15 @@
finished = False
length = 0
progress = None
+ chunkSize = 10*1000
+ runLength = 0
def __init__(self, parent):
self.step = parent
self.watchers = []
self.finishedWatchers = []
self.entries = []
+ self.runEntries = []
def getName(self):
return self.name # set in BuildStepStatus.addLog
@@ -101,16 +104,17 @@
return d
def getText(self):
- return "".join([e[1] for e in self.entries if e[0] in (STDOUT,STDERR)])
+ return "".join([e[1] for e in self.entries + self.runEntries
+ if e[0] in (STDOUT,STDERR)])
def getTextWithHeaders(self):
- return "".join([e[1] for e in self.entries])
+ return "".join([e[1] for e in self.entries + self.runEntries])
def getChunks(self):
- return self.entries
+ return self.entries + self.runEntries
def subscribe(self, receiver, catchup):
self.watchers.append(receiver)
if catchup:
- for channel, text in self.entries:
+ for channel, text in self.entries + self.runEntries:
# TODO: add logChunks(), to send over everything at once?
receiver.logChunk(self.step.build, self.step, self,
channel, text)
@@ -123,17 +127,28 @@
self.progress = progress
self.progressName = name
+ def merge(self):
+ # merge all .runEntries (which are all of the same type) into a
+ # single chunk for .entries
+ if not self.runEntries:
+ return
+ channel = self.runEntries[0][0]
+ text = "".join([c[1] for c in self.runEntries])
+ self.entries.append((channel, text))
+ self.runEntries = []
+ self.runLength = 0
+
def addEntry(self, channel, text):
assert not self.finished
- if (self.entries
- and channel == self.entries[-1][0]
- and len(self.entries[-1][1]) < 10000):
- # merge same-category chunks together, up to 10kb each, to cut
- # down on overhead when assembling these into a single big string
- # later.
- self.entries[-1] = (channel, self.entries[-1][1] + text)
- else:
- self.entries.append((channel, text))
+ # we only add to .runEntries here. merge() is responsible for adding
+ # merged chunks to .entries
+ if self.runEntries and channel != self.runEntries[0][0]:
+ self.merge()
+ self.runEntries.append((channel, text))
+ self.runLength += len(text)
+ if self.runLength > self.chunkSize:
+ self.merge()
+
for w in self.watchers:
w.logChunk(self.step.build, self.step, self, channel, text)
self.length += len(text)
@@ -148,6 +163,7 @@
self.addEntry(HEADER, text)
def finish(self):
+ self.merge()
self.finished = True
watchers = self.finishedWatchers
self.finishedWatchers = []
From warner at users.sourceforge.net Thu Nov 11 20:47:17 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 20:47:17 +0000
Subject: [Buildbot-commits] buildbot/buildbot/test test_status.py,1.12,1.13
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9956/buildbot/test
Modified Files:
test_status.py
Log Message:
* buildbot/status/builder.py (LogFile.addEntry): smarter way to do it: one
string merge per chunk. There are now separate .entries and .runEntries
lists: when enumerating over all chunks, make sure to look at both.
* buildbot/test/test_status.py (Log): more tests
Index: test_status.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- test_status.py 11 Nov 2004 19:31:06 -0000 1.12
+++ test_status.py 11 Nov 2004 20:47:14 -0000 1.13
@@ -247,6 +247,9 @@
l.addStdout("Some text\n")
l.addStderr("Some error\n")
l.addStdout("Some more text\n")
+ self.failIf(l.isFinished())
+ l.finish()
+ self.failUnless(l.isFinished())
self.failUnlessEqual(l.getText(),
"Some text\nSome error\nSome more text\n")
self.failUnlessEqual(l.getTextWithHeaders(),
@@ -260,6 +263,7 @@
l.addStdout("Some text\n")
l.addStdout("Some more text\n")
l.addStdout("more\n")
+ l.finish()
self.failUnlessEqual(l.getText(),
"Some text\nSome more text\nmore\n")
self.failUnlessEqual(l.getTextWithHeaders(),
@@ -267,6 +271,22 @@
"Some text\nSome more text\nmore\n")
self.failUnlessEqual(len(l.getChunks()), 2)
+ def testMerge2(self):
+ l = builder.LogFile(None)
+ l.addHeader("HEADER\n")
+ for i in xrange(1000):
+ l.addStdout("aaaa")
+ for i in xrange(30):
+ l.addStderr("bbbb")
+ for i in xrange(10):
+ l.addStdout("cc")
+ self.failUnlessEqual(l.getText(),
+ 1000*"aaaa" + 30 * "bbbb" + 10 * "cc")
+ l.finish()
+ self.failUnlessEqual(l.getText(),
+ 1000*"aaaa" + 30 * "bbbb" + 10 * "cc")
+ self.failUnlessEqual(len(l.getChunks()), 4)
+
def testStubify(self):
l = builder.LogFile(None)
l.name = "compile"
From warner at users.sourceforge.net Thu Nov 11 20:47:18 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 20:47:18 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.306,1.307
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9956
Modified Files:
ChangeLog
Log Message:
* buildbot/status/builder.py (LogFile.addEntry): smarter way to do it: one
string merge per chunk. There are now separate .entries and .runEntries
lists: when enumerating over all chunks, make sure to look at both.
* buildbot/test/test_status.py (Log): more tests
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -d -r1.306 -r1.307
--- ChangeLog 11 Nov 2004 19:31:15 -0000 1.306
+++ ChangeLog 11 Nov 2004 20:47:15 -0000 1.307
@@ -1,5 +1,11 @@
2004-11-11 Brian Warner
+ * buildbot/status/builder.py (LogFile.addEntry): smarter way to do
+ it: one string merge per chunk. There are now separate .entries
+ and .runEntries lists: when enumerating over all chunks, make sure
+ to look at both.
+ * buildbot/test/test_status.py (Log): more tests
+
* buildbot/status/builder.py (LogFile.addEntry): Merge string
chunks together, up to 10kb per chunk. This ought to cut down on
the CPU-burning overhead of large log files. Thanks to Alexander
From warner at users.sourceforge.net Thu Nov 11 20:50:25 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Thu, 11 Nov 2004 20:50:25 +0000
Subject: [Buildbot-commits] CVSROOT syncmail.conf,1.1,1.2
Message-ID:
Update of /cvsroot/buildbot/CVSROOT
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10691
Modified Files:
syncmail.conf
Log Message:
set verbose=false, to hush the (now-hopefully-unnecessary) messages during
commit
Index: syncmail.conf
===================================================================
RCS file: /cvsroot/buildbot/CVSROOT/syncmail.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- syncmail.conf 23 Sep 2004 14:35:49 -0000 1.1
+++ syncmail.conf 11 Nov 2004 20:50:23 -0000 1.2
@@ -7,7 +7,7 @@
[general]
; miscellaneous
-verbose = true
+verbose = false
email = true
; the kind of diff we generate
From warner at users.sourceforge.net Fri Nov 12 22:36:41 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Fri, 12 Nov 2004 22:36:41 +0000
Subject: [Buildbot-commits] buildbot/buildbot/status builder.py,1.42,1.43
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29087/buildbot/status
Modified Files:
builder.py
Log Message:
(BuilderStatus.saveYourself): use a safer w32-compatible approach, and only
use it on windows
(BuildStatus.saveYourself): same
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- builder.py 11 Nov 2004 20:47:15 -0000 1.42
+++ builder.py 12 Nov 2004 22:36:38 -0000 1.43
@@ -5,7 +5,7 @@
from twisted.python import log, components
from twisted.internet import reactor, defer
-import time, os.path, shutil
+import time, os.path, shutil, sys
try:
import cPickle as pickle
except ImportError:
@@ -781,13 +781,14 @@
tmpfilename = filename + ".tmp"
try:
pickle.dump(self, open(tmpfilename, "w"), -1)
- try:
- os.rename(tmpfilename, filename)
- except OSError:
- # windows cannot rename a file on top of an existing one
+ if sys.platform == 'win32':
+ # windows cannot rename a file on top of an existing one, so
+ # fall back to delete-first. There are ways this can fail and
+ # lose the builder's history, so we avoid using it in the
+ # general (non-windows) case
os.unlink(filename)
- os.rename(tmpfilename, filename)
- except Exception, e:
+ os.rename(tmpfilename, filename)
+ except:
log.msg("unable to save build %s-#%d" % (self.builder.name,
self.number))
log.err()
@@ -872,13 +873,11 @@
tmpfilename = filename + ".tmp"
try:
pickle.dump(self, open(tmpfilename, "w"), -1)
- try:
- os.rename(tmpfilename, filename)
- except OSError:
+ if sys.platform == 'win32':
# windows cannot rename a file on top of an existing one
os.unlink(filename)
- os.rename(tmpfilename, filename)
- except Exception, e:
+ os.rename(tmpfilename, filename)
+ except:
log.msg("unable to save builder %s" % self.name)
log.err()
From warner at users.sourceforge.net Fri Nov 12 22:36:41 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Fri, 12 Nov 2004 22:36:41 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.307,1.308
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29087
Modified Files:
ChangeLog
Log Message:
(BuilderStatus.saveYourself): use a safer w32-compatible approach, and only
use it on windows
(BuildStatus.saveYourself): same
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -d -r1.307 -r1.308
--- ChangeLog 11 Nov 2004 20:47:15 -0000 1.307
+++ ChangeLog 12 Nov 2004 22:36:39 -0000 1.308
@@ -1,3 +1,9 @@
+2004-11-12 Brian Warner
+
+ * buildbot/status/builder.py (BuilderStatus.saveYourself): use a
+ safer w32-compatible approach, and only use it on windows
+ (BuildStatus.saveYourself): same
+
2004-11-11 Brian Warner
* buildbot/status/builder.py (LogFile.addEntry): smarter way to do
From warner at users.sourceforge.net Mon Nov 15 09:26:32 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 15 Nov 2004 09:26:32 +0000
Subject: [Buildbot-commits] buildbot/buildbot/process process_twisted.py,1.34,1.35
Message-ID:
Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13040/buildbot/process
Modified Files:
process_twisted.py
Log Message:
(QuickTwistedBuildFactory): try to teach the Quick factory to use multiple
versions of python
Index: process_twisted.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/process_twisted.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- process_twisted.py 12 Sep 2004 06:42:39 -0000 1.34
+++ process_twisted.py 15 Nov 2004 09:26:29 -0000 1.35
@@ -40,15 +40,19 @@
useProgress = 0
def __init__(self, svnurl, python="python"):
+ if type(python) is str:
+ python = [python]
self.steps = []
self.steps.append(s(step.SVN, svnurl=svnurl, mode=self.mode))
- self.steps.append(s(HLint, python=python))
- cmd = "%s setup.py build_ext -i" % python
- self.steps.append(s(step.Compile, command=cmd, flunkOnFailure=True))
+ self.steps.append(s(HLint, python=python[0]))
self.steps.append(s(RemovePYCs))
- self.steps.append(s(TwistedTrial,
- python=python, # can be a list
- testChanges=True))
+ for p in python:
+ cmd = "%s setup.py build_ext -i" % p
+ self.steps.append(s(step.Compile, command=cmd,
+ flunkOnFailure=True))
+ self.steps.append(s(TwistedTrial,
+ python=p, # can be a list
+ testChanges=True))
class FullTwistedBuildFactory(TwistedBaseFactory):
treeStableTimer = 5*60
From warner at users.sourceforge.net Mon Nov 15 09:26:32 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Mon, 15 Nov 2004 09:26:32 +0000
Subject: [Buildbot-commits] buildbot ChangeLog,1.308,1.309
Message-ID:
Update of /cvsroot/buildbot/buildbot
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13040
Modified Files:
ChangeLog
Log Message:
(QuickTwistedBuildFactory): try to teach the Quick factory to use multiple
versions of python
Index: ChangeLog
===================================================================
RCS file: /cvsroot/buildbot/buildbot/ChangeLog,v
retrieving revision 1.308
retrieving revision 1.309
diff -u -d -r1.308 -r1.309
--- ChangeLog 12 Nov 2004 22:36:39 -0000 1.308
+++ ChangeLog 15 Nov 2004 09:26:30 -0000 1.309
@@ -1,3 +1,8 @@
+2004-11-15 Brian Warner
+
+ * buildbot/process/process_twisted.py (QuickTwistedBuildFactory):
+ try to teach the Quick factory to use multiple versions of python
+
2004-11-12 Brian Warner
* buildbot/status/builder.py (BuilderStatus.saveYourself): use a
From warner at users.sourceforge.net Tue Nov 23 01:13:56 2004
From: warner at users.sourceforge.net (Brian Warner)
Date: Tue, 23 Nov 2004 01:13:56 +0000
Subject: [Buildbot-commits] buildbot/docs factories.xhtml,1.5,1.6
Message-ID:
Update of /cvsroot/buildbot/buildbot/docs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15915/docs
Modified Files:
factories.xhtml
Log Message:
* buildbot/process/step_twisted.py (Trial): update docs a bit
* docs/factories.xhtml: fix Trial factory docs to match reality.
Closes: SF#1049758.
* buildbot/process/factory.py (Trial.__init__): add args for
randomly= and recurse=, making them available to instantiators
instead of only to subclassers. Closes: SF#1049759.
Index: factories.xhtml
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/factories.xhtml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- factories.xhtml 30 Aug 2004 08:40:31 -0000 1.5
+++ factories.xhtml 23 Nov 2004 01:13:53 -0000 1.6
@@ -306,10 +306,15 @@
Unfortunately, the build/lib
directory into which the built/copied
.py files are placed is actually architecture-dependent, and I do not yet
-know of a simple way to calculate its value. In addition, the
-PROJECTNAME
value is project-dependent: it is usually just the
-project's top-level library directory, as common practice suggests the unit
-test files are put in the test
sub-module.
+know of a simple way to calculate its value. For many projects it is
+sufficient to import their libraries in place
from the tree's base
+directory (PYTHONPATH=.
).
+
+In addition, the PROJECTNAME
value where the test files are
+located is project-dependent: it is usually just the project's top-level
+library directory, as common practice suggests the unit test files are put
+in the test
sub-module. This value cannot be guessed, the
+Trial
class must be told where to find the test files.
The Trial
class provides support for building and testing
projects which use distutils and trial. If the test module name is
@@ -333,37 +338,107 @@
source
(required): A step specification tuple, that that
used by GNUAutoconf.
- python
: A string which specifies the python
- executable to use. Defaults to just python
.
+ buildpython
: A list (argv array) of strings which
+ specifies the python
executable to use when building the package.
+ Defaults to just ['python']
. It may be useful to add flags
+ here, to supress warnings during compilation of extension modules. This
+ list is extended with ['./setup.py', 'build']
and then
+ executed in a ShellCommand.
- trialModule
: Provides a module name which contains the
- unit tests for this project. Accepts a string, typically
- PROJECTNAME.test
, or a list of strings. Defaults to None,
- indicating that no tests should be run.
+ testpath
: Provides a directory to add to
+ PYTHONPATH
when running the unit tests, if tests are being
+ run. Defaults to .
to include the project files in-place. The
+ generated build library is frequently architecture-dependent, but may
+ simply be build/lib
for pure-python modules.
+
+ trialpython
: Another list of strings used to build the
+ command that actually runs trial. This is prepended to the contents of the
+ trial
argument below. It may be useful to add -W
flags
+ here to supress warnings that occur while tests are being run. Defaults to
+ an empty list, meaning trial
will be run without an explicit
+ interpreter, which is generally what you want if you're using
+ /usr/bin/trial instead of, say, the ./bin/trial that lives in the Twisted
+ source tree.
trial
: provides the name of the trial
command. It
is occasionally useful to use an alternate executable, such as
trial2.2
which might run the tests under an older version of
Python. Defaults to trial
.
-
- testPath
: Provides a directory to add to
- PYTHONPATH
when running the unit tests, if tests are being
- run. Defaults to .
to include the project files in-place. The
- generated build library is frequently architecture-dependent, but may
- simply be build/lib
for pure-python modules.
- trialArgs
: Provides a list of additional arguments to
- give to trial. ["--reactor", "gtk2"]
would use an alternate
- reactor, ["--random", "0"]
would run the tests in a random
- order each time. Defaults to an empty list.
+ tests
: Provides a module name or names which contain the
+ unit tests for this project. Accepts a string, typically
+ PROJECTNAME.test
, or a list of strings. Defaults to None,
+ indicating that no tests should be run. You must either set this or
+ useTestCaseNames
to do anyting useful with the Trial
+ factory.
useTestCaseNames
: Tells the Step to provide the names of
all changed .py files to trial, so it can look for test-case-name tags and
run just the matching test cases. Suitable for use in quick builds.
Defaults to False.
+
+ randomly
: If True
, tells Trial (with the
+ --random=0
argument) to run the test cases in random order,
+ which sometimes catches subtle inter-test dependency bugs. Defaults to
+ False
.
+
+ recurse
: If True
, tells Trial (with the
+ --recurse
argument) to look in all subdirectories for
+ additional test cases. It isn't clear to me how this works, but it may be
+ useful to deal with the unknown-PROJECTNAME problem described above, and
+ is currently used in the Twisted buildbot to accomodate the fact that test
+ cases are now distributed through multiple twisted.SUBPROJECT.test
+ directories.
+
Unless one of trialModule
or useTestCaseNames
are set, no tests will be run.
+Some quick examples follow. Most of these examples assume that the target
+python code (the code under test
) can be reached directly from the
+root of the target tree, rather than being in a lib/ subdirectory.
+
+
+# Trial(source, tests="toplevel.test") does:
+# python ./setup.py build
+# PYTHONPATH=. trial -to toplevel.test
+
+# Trial(source, tests=["toplevel.test", "other.test"]) does:
+# python ./setup.py build
+# PYTHONPATH=. trial -to toplevel.test other.test
+
+# Trial(source, useTestCaseNames=True) does:
+# python ./setup.py build
+# PYTHONPATH=. trial -to --testmodule=foo/bar.py.. (from Changes)
+
+# Trial(source, buildpython=["python2.3", "-Wall"], tests="foo.tests") does:
+# python2.3 -Wall ./setup.py build
+# PYTHONPATH=. trial -to foo.tests
+
+# Trial(source, trialpython="python2.3", trial="/usr/bin/trial",
+# tests="foo.tests") does:
+# python2.3 -Wall ./setup.py build
+# PYTHONPATH=. python2.3 /usr/bin/trial -to foo.tests
+
+# For running trial out of the tree being tested (only useful when the tree
+# being built is Twisted itself):
+# Trial(source, trialpython=["python2.3", "-Wall"], trial="./bin/trial",
+# tests="foo.tests") does:
+# python2.3 -Wall ./setup.py build
+# PYTHONPATH=. python2.3 -Wall ./bin/trial -to foo.tests
+
+
+If the output directory of ./setup.py build
is known, you can pull
+the python code from the built location instead of the source directories.
+This should be able to handle variations in where the source comes from, as
+well as accomodating binary extension modules:
+
+
+# Trial(source, tests="toplevel.test", testpath='build/lib.linux-i686-2.3')
+# does:
+# python ./setup.py build
+# PYTHONPATH=build/lib.linux-i686-2.3 trial -to toplevel.test
+
+