[Buildbot-commits] buildbot/buildbot/status builder.py,1.55,1.56
Brian Warner
warner at users.sourceforge.net
Mon May 16 00:16:31 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6343/buildbot/status
Modified Files:
builder.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-175
Creator: Brian Warner <warner at monolith.lothar.com>
fix HTMLLog to match new LogFile behavior
* buildbot/status/builder.py (HTMLLogFile): make this behave like
the new LogFile class, so upgrading works properly
* buildbot/test/test_web.py (WebTest.test_logfile): validate HTML
logs too
* buildbot/test/test_status.py (Log.testAdd): validate hasContents
(Log.testUpgrade): same
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- builder.py 15 May 2005 23:43:57 -0000 1.55
+++ builder.py 16 May 2005 00:16:29 -0000 1.56
@@ -430,9 +430,12 @@
class HTMLLogFile:
__implements__ = interfaces.IStatusLog,
+ filename = None
- def __init__(self, parent, html):
+ def __init__(self, parent, name, logfilename, html):
self.step = parent
+ self.name = name
+ self.filename = logfilename
self.html = html
def getName(self):
@@ -445,6 +448,8 @@
def waitUntilFinished(self):
return defer.succeed(self)
+ def hasContents(self):
+ return True
def getText(self):
return self.html # looks kinda like text
def getTextWithHeaders(self):
@@ -687,8 +692,8 @@
def addHTMLLog(self, name, html):
assert self.started # addLog before stepStarted won't notify watchers
- log = HTMLLogFile(self, html)
- log.name = name
+ logfilename = self.build.generateLogfileName(self.name, name)
+ log = HTMLLogFile(self, name, logfilename, html)
self.logs.append(log)
for w in self.watchers:
receiver = w.logStarted(self.build, self, log)
More information about the Commits
mailing list