logo       

Re: Running Shell Commands: msg#00033

python.buildbot.devel

Subject: Re: Running Shell Commands

> On a related note I ran the command as
>
> /bin/sh -c "(make allmodconfig > .config)"
>
> in the workdir and all went well. I am not entirely sure what is going
> on where to debug it the way in which a ShellCommand gets executed is
> hard to follow.

Weird.. I wonder why that makes a difference. When you tried "make
allmodconfig > .config" (without the parens), did it seem like 'make' was
treating .config as a target? From the error message, it almost seems like it
was including .config as a Makefile, and since the contents were corrupted,
the include failed. Perhaps an "rm -f .config" beforehand?

Try adding the following patch to buildbot/slave/commands.py:
--- orig/buildbot/slave/commands.py
+++ mod/buildbot/slave/commands.py
@@ -170,7 +170,7 @@
argv = self.command

# self.stdin is handled in ShellCommandPP.connectionMade
-
+ log.msg("command argv is", argv)
self.process = reactor.spawnProcess(self.pp, argv[0], argv,
self.environ,
self.workdir,

Then look in the buildslave log when it runs the command. That should show
you the exact argv array being used (which, honestly, ShellCommand should
have been logging in the first place.. I'll go fix that). Make sure that
"make foo > .config" is turned into ["/bin/sh", "-c", "make foo > .config"].

I'll see if I can add a unit test that verifies this sort of thing works
correctly.

cheers,
-Brian


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7393&alloc_id=16281&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise