[Buildbot-devel] Step fails only under Buildbot

Mihai Martalogu mihai at martalogu.com
Fri Mar 7 19:38:05 UTC 2014


Depending on how you launch the buildbot slave, you might not have the same
environment as on the CLI. In our setup, we use an @reboot rule in the
crontab for launching the buildslave process, and by default it doesn't
have any of the variables set in .bash_profile or .bashrc (I'm assuming
you're using bash).
We work around the issue by setting any custom variables we need in our
.bash_profile, and launching the buildslave in the crontab via a "bash -l",
which will load the .bash_profile. Like that the environment is consistent
across buildbot/cli. If you use .bashrc, it's a bit more complicated (but
doable).

Good luck,
Mihai


On Friday, March 7, 2014, Na'Tosha Bard <natosha at unity3d.com> wrote:

>
> On Mar 7, 2014 8:19 PM, "Bob Hood" <bhood2 at comcast.net<javascript:_e(%7B%7D,'cvml','bhood2 at comcast.net');>>
> wrote:
> >
> > On 3/7/2014 11:21 AM, Na'Tosha Bard wrote:
> >>
> >> 2014-03-07 18:35 GMT+01:00 Bob Hood <bhood2 at comcast.net<javascript:_e(%7B%7D,'cvml','bhood2 at comcast.net');>
> >:
> >>>
> >>>
> >>> Any suggestions on how to figure out why the process fails when run
> under
> >>> Buildbot but not from the CLI?
> >>
> >>
> >> Try running it from the CLI inside the buildbot virtual environment.
>  I've had problems in the past with, for example, how Python upper-cases
> environment variable names.
> >
> >
> > Hey, Na'Tosha.
> >
> > Do you mean set up a Python virtual environment, or are you saying that
> Buildbot provides such an enclosure?  A Google of "buildbot virtual
> environment" didn't turn up anything edifying.
> >
> > Might you have a URL that provides more information on running it this
> way?
>
> Hmm.  Maybe our slaves are set up weirdly, but to do this on our slaves,
> it would be:
>
> $ source ~/buildbot-venv/bin/activate
>
> The go to the appropriate directory and run the build.  The buildslave
> runs inside this virtualenv so there can be differences.
>
> Cheers,
> Na'Tosha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20140307/c4536145/attachment.html>


More information about the devel mailing list