[Buildbot-devel] [buildbot-devel] Looking for examples of more step inclusion control using properties
Axel Hecht
l10n.moz at googlemail.com
Sun Mar 28 23:22:35 UTC 2010
You need to subclass ShellCommand.
The instance you passed is taken apart into the class and its arguments, and
then a new instance is created for each build, which of course doesn't have
your tweak to the instance you passed to the factory.
Axel
2010/3/26 Mike Winter <mike.winter at comcast.net>
> BuildStep has _startStep_2(self, res) which uses self.doStepIf to control
> skipping.
>
> We have an unfortunate expression of refused bequest in ShellCommand's and
> LoggingBuildStep, it completely ignores the super class feature of skip
> expressed in the above deferred. It does its own thing ...startCommand. It
> would be most cool to recover BuildStep behavior, so that ShellCommand can
> be a decorator, rather than a subversive refuser of the fine bequest :).
>
>
> I am looking for an example of Property controlling steps that can be run
> in a build that can be managed from a force-build page, for instance
> avoiding VCS. Something to control BuildStep.doStepIf, re:
> def checkForSkipOrRun(step):
> props = step.build.properties
> if props.has_key('ONLY_THAT_STEP')
> return step.name == props['ONLY_THAT_STEP']
> elif props.has_key('SOME_STEPS_REGEX'):
> pattern = props['SOME_STEPS_REGEX']
> return re.search(pattern, step.name)
> else:
> return True
>
> step =ShellCommand(name=name,
> command=["./runTests.sh", "--report", "no",
> "--branch", branch, "--test", "%s/%s" % (component, v)],
> workdir="build/test",
> timeout = timeout,
> locks=locks,
> description="runtests in %s/%s" % (component,
> v))
> step.doStepIf = checkForSkipOrRun
> response.addStep(step)
>
> The doStepIf fn (checkForSkipOrRun ) is not being called. I added a
> twlog.msg at start of fn and never see it in log.
>
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> 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/20100329/3a5e3c43/attachment.html>
More information about the devel
mailing list