[Buildbot-devel] How to handle logfiles when multiple tests are run in a single buildstep

Amber Yust ayust at yelp.com
Wed Apr 13 01:05:14 UTC 2011


Since your slaves are going to have to know to read the independent logfiles
(in addition to the normal stdout), yes, such subclassing would need to be
deployed to your slaves as well, which is another reason to favor
concatenated stdout if at all possible.

I don't have any examples handy, but the API docs might be useful.

~Amber

On Tue, Apr 12, 2011 at 5:38 PM, William Deegan
<bill at baddogconsulting.com>wrote:

>  Amber,
>
> Log files are very long per test, so concatenating them would not be
> workable.
> Looks like addLogFile will be my friend.
>
> Will I need to deploy such to the buildslaves as well?
> Any examples of such?
>
> Thanks,
> Bill
>
>
> On 4/12/2011 3:28 PM, Amber Yust wrote:
>
> I think you missed what Bill was asking about. It seems he's converting *
> from* one step per test *to* many tests per step, and is inquiring about
> how best to handle logs for those tests.
>
>  Bill, is there a particular use-case that you have that would not be able
> to work with just having all of the tests output into the same shared log
> for the step? If having a shared log would work, you can just have all of
> the tests log to stdio and use the existing log, greping through for
> whatever individual test you need.
>
>  If you absolutely need links to separate logfiles, you'll probably have
> to subclass one of the BuildStep classes to add in some additional
> addLogFile calls.
>
>  ~Amber
>
>  On Tue, Apr 12, 2011 at 3:23 PM, Fulvio Cervone <fcervone at me.com> wrote:
>
>> Bill,
>>
>> If you have one step per test you will get a log per step (the stdio), and
>> the link to each log file will be available to you; so you can just put the
>> link in a mail and send it out (I assume that you need to send reports with
>> pass and fail, so you will have a mail notifier, in which you can append
>> lines from each log and generate a report).
>>
>> Another way would be to get the steps to dump the output to a file, and
>> then you can manipulate the file content and do whatever you see fit.
>>
>> Just check the mail notifier section on the manual; it has a great example
>> where you can see how to call the logs, parse them and stick the links to
>> the logs in a message formatter (either in html or plain text if you
>> prefer).
>>
>> Either way is very simple, but maybe there are others that are even easier
>> :)
>>
>> -f
>>
>>
>> On Apr 12, 2011, at 11:16 AM, William Deegan wrote:
>>
>> > Greetings,
>> >
>> > I'll be changing a build from having a buildstep per test to on
>> > buildstep which launches the tests into a compute farm via gridengine.
>> >
>> > I'm wondering what's the best way to create links to the logfile
>> > generated by these tests?
>> > Typically 1 or 2 per test.
>> >
>> > Ideally the buildstep would show the number of passed/failed tests and
>> > have links to all the tests logfiles.
>> >
>> > Any advice on the simplest way to accomplish this is most welcome!
>> >
>> > Thanks,
>> > Bill
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20110412/b971d9d8/attachment.html>


More information about the devel mailing list