[Buildbot-devel] Processing a log file to create a HTMLLog in a custom BuildStep

Pierre Tardy tardyp at gmail.com
Fri Jan 31 17:39:59 UTC 2014


you need to first transfer the file to the master.

I think the best option is to factorize master/buildbot/steps/transfer.py,
so that FileUpload functionality is accessible in a composite step (and
send a patch!)


Regards,
Pierre



Pierre


On Fri, Jan 31, 2014 at 6:29 PM, Matt Williams <lists at milliams.com> wrote:

> This is working so far but I have one more problem. There is now a
> file created on the slave called 'tests.html' but I can't see a way to
> add this in the BuildStep with something like:
>
> self.addHTMLLog('tests_summary', something_here...)
>
> since addHTMLLog requires a HTML string, not a filename on the slave.
>
> I tried adding logfiles={'tests_summary': 'tests.html'} to the
> ShellCommand constructor but that created a text logfile containing
> the contents of the HTML report rather than a valid HTML file.
>
> Matt
>
> On 30 January 2014 20:58, Philippe McLean <philippe.mclean at gmail.com>
> wrote:
> > I would suggest implementing your XML -> HTML conversion as an
> independent
> > tool/script, checking that into your source tree, and executing it on the
> > slave side to generate the html log there.
> >
> > This makes it easier to develop your markup script and avoids the
> > antipattern of implementing a lot of code in master.cfg.
> >
> >
> > On Thu, Jan 30, 2014 at 11:54 AM, Matt Williams <lists at milliams.com>
> wrote:
> >>
> >> Hi all,
> >>
> >> I've just started using Buildbot and I'm liking it a lot so far but
> >> I'm having a problem I was hoping I could get some help with.
> >>
> >> I am building a C++ project and running unit tests on it. I'm using a
> >> test framework which outputs XML information about the tests and saves
> >> this as a log file.
> >>
> >> Inspired by
> >>
> http://blogs.igalia.com/itoral/2007/02/13/howto-integrate-unit-tests-with-buildbot/
> ,
> >> I've written some code which can convert that XML into a nice HTML log
> >> file which, in a custom BuildStep, I can addHTMLLog().
> >>
> >> The problem I am having is that the BuildStep runs on the master and
> >> so can't directly access the log file on the slave. I guess the
> >> simplest way to solve this would be to move the log file over to the
> >> master and parse it there but I can't work out how to do that.
> >>
> >> Could anyone give me some pointers on the best way to tackle this
> problem.
> >>
> >> Regards,
> >> Matt Williams
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> WatchGuard Dimension instantly turns raw network data into actionable
> >> security intelligence. It gives you real-time visual feedback on key
> >> security issues and trends.  Skip the complicated setup - simply import
> >> a virtual appliance and go from zero to informed in seconds.
> >>
> >>
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
> >> _______________________________________________
> >> Buildbot-devel mailing list
> >> Buildbot-devel at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
> >
> >
>
>
>
> --
> Matt Williams
> http://milliams.com
>
>
> ------------------------------------------------------------------------------
> WatchGuard Dimension instantly turns raw network data into actionable
> security intelligence. It gives you real-time visual feedback on key
> security issues and trends.  Skip the complicated setup - simply import
> a virtual appliance and go from zero to informed in seconds.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20140131/ccd27294/attachment.html>


More information about the devel mailing list