<div dir="ltr"><div>Hi,</div><div><br></div><div>Bellow some old example code I used to parse output for failing tests, I hope will be easy to adapt in your case:</div><div><br></div><div><pre>class MyShellCommand(shell.ShellCommand):

    def __init__(self, **kwargs):
        shell.ShellCommand.__init__(self, **kwargs)
        self.addLogObserver('stdio',
logobserver.LineConsumerLogObserver(self.logConsumer))
        self.testFailed = False

    def logConsumer(self):
        while True:
            stream, line = yield
            if line.find('TEST_FAILURE_INDICATOR') != -1:
                self.testFailed = True

                return

    def evaluateCommand(self, cmd):
        res = shell.ShellCommand.evaluateCommand(self, cmd)
        if self.testFailed:
            res = FAIL<br><br></pre><pre>BR,<br></pre><pre>C<br></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 7, 2019 at 10:19 PM honas grael <<a href="mailto:honasgraeymael@gmail.com">honasgraeymael@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello<div>I have a buildstep as follows</div><div><br></div><div><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span>makepackages</span> <span style="font-weight:bold">=</span> <span>steps</span><span style="font-weight:bold">.</span><span>ShellCommand</span><span>(</span><span>name</span><span style="font-weight:bold">=</span><span style="color:rgb(187,136,68)">"make packages"</span><span>,</span>
                                  <span>command</span><span style="font-weight:bold">=</span><span>[</span><span style="color:rgb(187,136,68)">"make"</span><span>,</span> <span style="color:rgb(187,136,68)">"packages"</span><span>],</span>
                                  <span>haltOnFailure</span><span style="font-weight:bold">=</span><span style="font-weight:bold">True</span><span>,</span>
                                  <span>description</span><span style="font-weight:bold">=</span><span style="color:rgb(187,136,68)">"make packages"</span><span>)</span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span><br></span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span>when it runs the output is sent to stdio, I would like to </span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span>add a post processing step following the command that processes </span></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><span>the </span>stdio output from makepackages, so that I can search for</pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)">keywords in stdio.</pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)">How can I do this? I've read the docs but I do not follow,</pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)">can anyone guide me</pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)"><br></pre><pre style="overflow:auto hidden;margin-top:0px;margin-bottom:0px;color:rgb(0,0,0)">Regards</pre></div></div>
_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@buildbot.net" target="_blank">users@buildbot.net</a><br>
<a href="https://lists.buildbot.net/mailman/listinfo/users" rel="noreferrer" target="_blank">https://lists.buildbot.net/mailman/listinfo/users</a></blockquote></div>