[Buildbot-devel] MasterShellCommand working directory

Mikhail Sobolev mss at mawhrin.net
Sat Aug 2 14:19:58 UTC 2014


Hi Ian,

On Sat, Aug 02, 2014 at 05:34:47PM +0400, Mikhail Sobolev wrote:
> On Fri, Aug 01, 2014 at 11:27:02PM +0200, Ian Bell wrote:
> > But for the life of me I can't figure out what the default working
> > directory that is used on the master.  Can anyone shed some light?  I ran a
> > PWD, and I got the folder that I ran buildbot start from.  Is there any way
> > to determine the folder that contains the master.cfg file?  I see there is
> > an OLDPWD environmental variable that is defined to be the folder that
> > contains master.cfg, is that reliable?
Sorry to follow up myself (I did not read the code through properly).
In the step log you should see the output of `os.getcwd()`, which will
tell you what was it when the command was executed.

My other finding is that the current directory will depend on how the
build master is started.

So I think the best way is to use the [undocumented in the manual]
parameter `path` of MasterShellCommand.

-- 
Misha




More information about the devel mailing list