[Buildbot-devel] [buildbot-devel] Looking for examples of more step inclusion control using properties

Mike Winter mike.winter at comcast.net
Fri Mar 26 18:39:59 UTC 2010


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.





More information about the devel mailing list