[Buildbot-devel] cat logfiles on build failure

Simon Burton simon at arrowtheory.com
Fri Feb 24 08:03:48 UTC 2006


During my project's make, it generates several large logfiles.
So I'd like to have a build step that, say, cat's those files when
the build fails.

Right now as a workaround I do this:

f = factory.BuildFactory(
  [
    source,
    s(step.Compile, command="nice ./make.py; cat build.log;"),
  ],
)

Which always comes up green on the html display.

I've been over the manual a few times and poked around the source code.

It looks like I should inherit from ShellCommand. I've added these lines
to the end of the start method (which was copied entirely from ShellCommand):

    lg = self.addLog("buildlog")
    cmd = step.RemoteShellCommand( command = "cat build.log" )
    cmd.useLog(lg, True)
    d = self.runCommand(self.cmd)

But I don't really know what I'm doing:
...
        --- <exception caught here> ---
          File "/home/simonb/site-packages/buildbot/process/step.py", line 595, in failed
            self.progress.finish()
          File "/home/simonb/site-packages/buildbot/status/progress.py", line 70, in finish
            self.buildProgress.stepFinished(self.name)
          File "/home/simonb/site-packages/buildbot/status/progress.py", line 149, in stepFinished
            assert(stepname not in self.finishedSteps)
        exceptions.AssertionError:

Any ideas ?

thanks !!

Simon.

-- 
Simon Burton, B.Sc.
Licensed PO Box 8066
ANU Canberra 2601
Australia
Ph. 61 02 6249 6940
http://arrowtheory.com 




More information about the devel mailing list