"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildbot/process/buildstep.py" between
buildbot-3.0.2.tar.gz and buildbot-3.1.0.tar.gz

About: Buildbot is a continuous integration testing framework (Python-based). It supports also automation of complex build systems, application deployment, and management of sophisticated software-release processes.

buildstep.py  (buildbot-3.0.2):buildstep.py  (buildbot-3.1.0)
skipping to change at line 517 skipping to change at line 517
if callable(hidden): if callable(hidden):
try: try:
hidden = hidden(self.results, self) hidden = hidden(self.results, self)
except Exception: except Exception:
why = Failure() why = Failure()
log.err(why, "hidden callback failed; traceback follows") log.err(why, "hidden callback failed; traceback follows")
yield self.addLogWithFailure(why) yield self.addLogWithFailure(why)
self.results = EXCEPTION self.results = EXCEPTION
hidden = False hidden = False
yield self.master.data.updates.finishStep(self.stepid, self.results,
hidden)
# perform final clean ups # perform final clean ups
success = yield self._cleanup_logs() success = yield self._cleanup_logs()
if not success: if not success:
self.results = EXCEPTION self.results = EXCEPTION
# update the summary one last time, make sure that completes, # update the summary one last time, make sure that completes,
# and then don't update it any more. # and then don't update it any more.
self.updateSummary() self.updateSummary()
yield self.updateSummary.stop() yield self.updateSummary.stop()
for sub in self._test_result_submitters.values(): for sub in self._test_result_submitters.values():
yield sub.finish() yield sub.finish()
self.releaseLocks() self.releaseLocks()
yield self.master.data.updates.finishStep(self.stepid, self.results,
hidden)
return self.results return self.results
def setBuildData(self, name, value, source):
# returns a Deferred that yields nothing
return self.master.data.updates.setBuildData(self.build.buildid, name, v
alue, source)
@defer.inlineCallbacks @defer.inlineCallbacks
def _cleanup_logs(self): def _cleanup_logs(self):
all_success = True all_success = True
not_finished_logs = [v for (k, v) in self.logs.items() if not v.finished ] not_finished_logs = [v for (k, v) in self.logs.items() if not v.finished ]
finish_logs = yield defer.DeferredList([v.finish() for v in not_finished _logs], finish_logs = yield defer.DeferredList([v.finish() for v in not_finished _logs],
consumeErrors=True) consumeErrors=True)
for success, res in finish_logs: for success, res in finish_logs:
if not success: if not success:
log.err(res, "when trying to finish a log") log.err(res, "when trying to finish a log")
all_success = False all_success = False
skipping to change at line 602 skipping to change at line 607
self._waitingForLocks = False self._waitingForLocks = False
return defer.succeed(None) return defer.succeed(None)
def run(self): def run(self):
raise NotImplementedError("A custom build step must implement run()") raise NotImplementedError("A custom build step must implement run()")
def isNewStyle(self): def isNewStyle(self):
warn_deprecated('3.0.0', 'BuildStep.isNewStyle() always returns True') warn_deprecated('3.0.0', 'BuildStep.isNewStyle() always returns True')
return True return True
@defer.inlineCallbacks
def interrupt(self, reason): def interrupt(self, reason):
if self.stopped: if self.stopped:
return return
self.stopped = True self.stopped = True
if self._acquiringLocks: if self._acquiringLocks:
for (lock, access, d) in self._acquiringLocks: for (lock, access, d) in self._acquiringLocks:
lock.stopWaitingUntilAvailable(self, access, d) lock.stopWaitingUntilAvailable(self, access, d)
self._acquiringLocks = [] self._acquiringLocks = []
if self._waitingForLocks: if self._waitingForLocks:
self.addCompleteLog( yield self.addCompleteLog(
'cancelled while waiting for locks', str(reason)) 'cancelled while waiting for locks', str(reason))
else: else:
self.addCompleteLog('cancelled', str(reason)) yield self.addCompleteLog('cancelled', str(reason))
if self.cmd: if self.cmd:
d = self.cmd.interrupt(reason) d = self.cmd.interrupt(reason)
d.addErrback(log.err, 'while cancelling command') d.addErrback(log.err, 'while cancelling command')
yield d
def releaseLocks(self): def releaseLocks(self):
log.msg("releaseLocks({}): {}".format(self, self.locks)) log.msg("releaseLocks({}): {}".format(self, self.locks))
for lock, access in self.locks: for lock, access in self.locks:
if lock.isOwner(self, access): if lock.isOwner(self, access):
lock.release(self, access) lock.release(self, access)
else: else:
# This should only happen if we've been interrupted # This should only happen if we've been interrupted
assert self.stopped assert self.stopped
 End of changes. 7 change blocks. 
4 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)