<div dir="ltr"><div><div><div>I have managed to resolve this through the help of the friendly folks on the IRC channel.<br><br></div>In short, updateSummary() is used on new style steps. On old style steps, the log observer needs to update the step's step_status.setText() and step_status.setText2() for it to work.<br><br></div>Thanks,<br></div>Jaco<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 3:15 PM, Jaco Naude <span dir="ltr"><<a href="mailto:naude.jaco@gmail.com" target="_blank">naude.jaco@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hello All,<br><br></div>I'm new to Buildbot.<br><br></div>I'm trying to get a custom step to update its status text displayed in the Waterfall page, and also on the build page itself. (Using Buildbot 0.8.12 - hence its old style build steps).<br><br></div>I have managed to update the step's completion status, but can't managed to get it going for the current status while it is still running. I can extend the text initially shown by specifying a descriptionSuffix, but can't seem to get it to update at runtime.<br><br></div><div>This is what I have at the moment:<br>(based on <a href="http://docs.buildbot.net/0.8.12/manual/customization.html#updating-status-strings" target="_blank">http://docs.buildbot.net/0.8.<wbr>12/manual/customization.html#<wbr>updating-status-strings</a>)<br><br>A custom build step with a LogLineObserver attached to it. Everytime the outLineReceived() function on the log observer fires, I call updateSummary() on the step in the hope that it will update the status text with what I provide in getCurrentSummary(). However, getCurrentSummary() is never called (I raise an exception at its start which never fires). I'm sure the outLineReceived() function is called which I've verified by raising an exception as a test.<br><br></div><div>I have also reimplemented the describe() method in the hope that it could solve the problem.<br></div><div><br>class TrialTestCaseCounter(<wbr>LogLineObserver):<br> def outLineReceived(self, line):<br> self.step.updateSummary()<br> #raise TypeError("outLineReceived - %s - %s"%(self.step.isNewStyle(),<wbr>line))<br><br>class buildMakeStep(ShellCommand):<br> _mode = ""<br> _results_summary = None<br> def __init__(self, mode, command='', **kwargs):<br> _mode = mode<br> final_command = command.replace("{MODE}",mode)<br> kwargs['command'] = [<br> 'bash', '-c', 'source evn_setup.bash; %s' % final_command<br> ]<br><br> ShellCommand.__init__(self, **kwargs)<br><br> self.descriptionDone = ["Builds completed."]<br> self.description = ["Building..."]<br> self.descriptionSuffix = [self._mode]<br><br> counter = TrialTestCaseCounter()<br> self.addLogObserver('stdio', counter)<br> def getCurrentSummary(self):<br> raise TypeError('getCurrentSummary called')<br> desc = self.descriptionDone if done else self.description<br> import time<br> import datetime<br> now = datetime.datetime.now()<br> return {"step":'{:%a %H:%M:%S}'.format(now)}<br> def describe(self, done=False):<br> desc = self.descriptionDone if done else self.description<br> import time<br> import datetime<br> now = datetime.datetime.now()<br> self.descriptionSuffix = ['{:%a %H:%M:%S}'.format(now)]<br><br> if self.descriptionSuffix:<br> desc = desc[:]<br> desc.extend(self.<wbr>descriptionSuffix)<br> return desc<br></div><div><br></div><div>Any ideas on how to get this working would be much appreciated.<br></div><div>Thanks,<br></div><div>Jaco<br></div></div>
</blockquote></div><br></div>