[Buildbot-commits] buildbot/buildbot/status builder.py,1.66,1.67
Brian Warner
warner at users.sourceforge.net
Fri Oct 14 19:32:58 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/status
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30432/buildbot/status
Modified Files:
builder.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-324
Creator: Brian Warner <warner at lothar.com>
BuildSet did not report failure correctly, breaking Dependent builds
* buildbot/buildset.py (BuildSet): fix bug where BuildSet did not
report failure correctly, causing Dependent builds to run when
they shouldn't have.
* buildbot/status/builder.py (BuildSetStatus): same
* buildbot/test/test_buildreq.py (Set.testBuildSet): verify it
(Set.testSuccess): test the both-pass case too
* buildbot/test/test_dependencies.py (Dependencies.testRun_Fail):
fix this test: it was ending too early, masking the failure before
(Logger): specialized StatusReceiver to make sure the dependent
builds aren't even started, much less completed.
Index: builder.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/builder.py,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- builder.py 31 Aug 2005 02:26:34 -0000 1.66
+++ builder.py 14 Oct 2005 19:32:55 -0000 1.67
@@ -567,13 +567,17 @@
self.id = bsid
self.successWatchers = []
self.finishedWatchers = []
- self.failed = False
+ self.stillHopeful = True
self.finished = False
def setBuildRequestStatuses(self, buildRequestStatuses):
self.buildRequests = buildRequestStatuses
def setResults(self, results):
+ # the build set succeeds only if all its component builds succeed
self.results = results
+ def giveUpHope(self):
+ self.stillHopeful = False
+
def notifySuccessWatchers(self):
for d in self.successWatchers:
@@ -582,8 +586,6 @@
def notifyFinishedWatchers(self):
self.finished = True
- if not self.failed:
- self.notifySuccessWatchers()
for d in self.finishedWatchers:
d.callback(self)
self.finishedWatchers = []
@@ -607,7 +609,7 @@
return self.finished
def waitUntilSuccess(self):
- if self.failed or self.finished:
+ if self.finished or not self.stillHopeful:
# the deferreds have already fired
return defer.succeed(self)
d = defer.Deferred()
More information about the Commits
mailing list