[Buildbot-devel] setting up a builder's workdir

Stefan Seefeld seefeld at sympatico.ca
Tue Jan 24 03:23:05 UTC 2006


Brian,

thanks a lot for your detailed answer. It clarifies quite a few things !

Brian Warner wrote:

> I'll add this cleanup to the TODO list. For now, hopefully you can have just
> a couple of workdir="." steps to get the build/ directory set up, and then do
> everything else with the default workdir.

That's exactly what I'm doing in my current prototype.

>>Is there any predefined BuildStep that I could use that sets up
>>my workdir ? It sounds like a frequent enough task to warrant
>>to be provided by buildbot itself.
> 
> 
> Yes, true, but the vast majority of the build proceses out there start with a
> version-control checkout :). Thus far, the buildbot has always been used to
> perform some sort of build/test steps inside a directory which was populated
> by a checkout. What else could you possibly want to use the buildbot for? :)
> :) :)

:-)

Seriously, I do most of the actual build *outside* the source tree, i.e.
using autoconf / make (et al.), I always set up a build tree separately
so I can consider the source tree read-only.

The other case is what I described previously: some test result aggregator
that produces a 'test matrix' out of a set of test runs.

I'm sure there are many more use cases that typically happen outside
a source tree.

> Let me ask this: what do you need to do to set up the workdir? Would it be
> useful to have a step that was defined like this?:
> 
> class UnpackTarball(ShellCommand):
>     """This step unpacks a named tarball into the working directory.

[...]

While that may be useful, it isn't really what I have in mind (and indeed
I don't have anything to unpack in my use cases).

I believe the most generically useful BuildStep addition that covers all
the above cases is a 'MakeWorkDir' step, though, as you said, that's easy
enough to do by playing games with the 'workdir' variable. (My only concern
would be that I would need to hardcode the 'workdir' variable in my master.cfg
file, which may get out of sync if ever the buildbot itself switches to a different
default value.)

Thanks,
		Stefan






More information about the devel mailing list