[Buildbot-devel] Where did my stdout go?
Greg Ward
gerg.ward+buildbot at gmail.com
Sun Nov 4 22:57:25 UTC 2007
Hi -- I recently made a small change to my BB config so that some
shell commands that were formerly run directly as ShellCommand build
steps were moved into a standalone Python script which is run by BB.
This is all on a Windows buildslave, which matters. (If it were a
Unix build slave, everything would work fine. And even if it didn't,
I'd be able to figure it out myself!)
To illustrate, I used to do something like this in master.cfg:
factory.addStep(ShellCommand(command=["build", "app1"]))
factory.addStep(ShellCommand(command=["build", "app2"]))
factory.addStep(ShellCommand(command=["build", "app3"]))
This has been replaced by:
factory.addStep(ShellCommand(command=["build-all-apps.py"]))
where build-all-apps.py boils down to
for app in ["app1", "app2", "app3"]:
subprocess.call(["build", app])
(My main reason for factoring out the script, incidentally, is that
the set of apps to build might change from branch to branch, and I
don't want that knowledge in master.cfg. Also, the build command is
just a *tad* more complex than I've shown, and having the code to
generate it in master.cfg bugged me.)
Anyways, the problem is that the stdout of commands run by
build-all-apps.py disappears. When that long hairy build command that
I have approximated as "build <app>" was run directly by BB on the
slave, all of its output appeared in the log file available through
the master. No more. Now I get the output of build-all-apps.py
itself (it logs the commands it runs to its stdout), but not of its
child processes. So if compiling one of our Windows apps fails, I
won't have the error message!
Finally, when I run build-all-apps.py manually on the Windows console,
it's fine: the stdout of the child processes appears on the console as
expected.
Any clues? All hints, tips, suggestions welcome. Thanks --
Greg
More information about the devel
mailing list