[users at bb.net] Unable to run builder
Chris Spencer
chrisspen at gmail.com
Wed Jan 6 03:34:03 UTC 2016
Thanks, that's resolved it.
On Tue, Jan 5, 2016 at 10:12 PM, Charles Lepple <clepple at gmail.com> wrote:
> On Jan 4, 2016, at 1:50 PM, Chris Spencer <chrisspen at gmail.com> wrote:
>
>
> How do you configure a builder to run a specific script in your source?
>
> I have a "runtests" script in my code which creates the Python virtualenv,
> creates an in-memory test database, and runs all unittests, but when I
> enter a builder command like "cd src/myproject; runtests", I get the error:
>
> Upon execvpe cd src/myproject; ./runtests ['cd src/myproject;
> ./runtests'] in environment id 140610380051352
> :Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py",
> line 403, in _fork
> path, uid, gid, executable, args, environment)
> File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py",
> line 453, in _execChild
> os.execvpe(executable, args, environment)
> File "/usr/lib/python2.7/os.py", line 353, in execvpe
> _execvpe(file, args, env)
> File "/usr/lib/python2.7/os.py", line 368, in _execvpe
> func(file, *argrest)
> OSError: [Errno 2] No such file or directory
>
>
> This is subtle, but it's the first item addressed here:
> http://trac.buildbot.net/wiki/FAQ
>
> The third question clarifies the "command=" parameter: passing a Python
> string is like calling system(): good for simple commands, but can break in
> unexpected ways. If you enclose the string in a list, it's more like
> calling exec*(), where you are specifying the contents of argv[].
>
> presumably because Buildbot's default CWD is not the same as my code's
> clone directory.
>
> The tutorial (http://docs.buildbot.net/current/tutorial/tour.html) is a
> little confusing. It calls "trial pyflakes", which is a globally-accessible
> command, so it's not clear how Buildbot knows where anything is. How do I
> construct my command to reference Buildbot's CWD and the location where it
> checks-out my code?
>
>
> I'm not sure where in the documentation this is more formally specified,
> but in 0.8.x, the initial working directory for a ShellCommand is 'build'
> under the directory listed in the 'workdir' property. If in doubt as to
> what this expands to, check the stdio log for the step. This should be
> mostly transparent once the command parameter above is fixed.
>
> --
> Charles Lepple
> clepple at gmail
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160105/77eb812b/attachment.html>
More information about the users
mailing list