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

Matt Williams lists at milliams.com
Fri Jan 31 17:29:07 UTC 2014


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




More information about the devel mailing list