[Buildbot-devel] possible bug in ShellCommand, Test and PerlModuleTest

Axel Hecht l10n.moz at googlemail.com
Mon Oct 13 14:47:14 UTC 2008


This is a known bug, http://buildbot.net/trac/ticket/347 subject to
trigger the 0.7.10 release.

Axel

2008/10/13 June Kim <juneaftn at gmail.com>:
> Hello,
>
> I think I found a potential bug in buildbot.
>
> When I use buildbot.steps.shell.Test step, the text result seen on the
> waterfall page is accumulated. For example, if I had the following
> simple factory
>
> f1 = factory.BuildFactory()
> f1.addStep(Test(command=["echo", "hello"]))
>
> and set a periodic scheduler for every 10 secs, the text in the build
> cell of the waterfall display(or any other displays) is accumulated as
> the builds go one after another.
>
>
> It goes like the following:
>
> test
> no test results
>
> Build 1
>
> test
> no test results
> no test results
>
> Build 2
>
> And the descriptive text is infinitely extended.
>
> I think the bug resides in the interaction between ShellCommand class
> and its child Test class.
>
> Test class calls its parent's method "describe", in which the instance
> attribute is modified with side-effects.
>
> class Test(...
>    def describe(self, done=False):
>        description = WarningCountingShellCommand.describe(self, done)
>
> WarningCountingShellCommand.describe isn't existent and hence its
> parent's method ShellCommand.describe is called. However, the
> following lines in ShellCommand.describe returns the instance
> attributes and Test.describe modifies(actually, adds textual
> descriptions) it:
>
> (in ShellCommand.describe)
>        if done and self.descriptionDone is not None:
>            return self.descriptionDone
>        if self.description is not None:
>            return self.description
>
>
> Therefore, self.description is infinitely added with later
> descriptions. I changed the code above into as following to resolve
> the bug:
>
> (in ShellCommand.describe)
>        if done and self.descriptionDone is not None:
>            return self.descriptionDone[:]
>        if self.description is not None:
>            return self.description[:]
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>




More information about the devel mailing list