[Buildbot-devel] Adding an HTML log file without the text log file too

Derek derek.m.graham+ml at gmail.com
Fri Aug 27 16:00:06 UTC 2010

Hello all,

I want to add an html file at the end of the step and have tried:

   1. Passing the file into logfiles of ShellCommand and then overriding

      def createSummary(self, log):
         html = self.getLog("results").getText()
         self.addHTMLLog("results.html", html)

      However, I end up with a redundant log file and there doesn't seem to be a
method to delete the log file to get round this.

   2. Passing in a new arg to my subclass of ShellCommand, but get errors about
unknown attributes. The code looked like:

      class LintStep2(shell.ShellCommand):
         def __init__(self, resultsFile, **kwargs):
            shell.ShellCommand.__init__(self, **kwargs)
            self.addFactoryArguments(resultsFile = resultsFile)   

         def createSummary(self, log):
            with open(self.remote_kwargs["workdir"] + "/" + self.resultsFile) as f:
            self.addHTMLLog("results.html", f.read())

   3. .addHTMLLog() straight on the step, but I get errors too because I think
it's too early

Any help much appreciated!



More information about the devel mailing list