[Buildbot-devel] Pipe ShellCommand output to file on Windows

Vasily vasslitvinov at pisem.net
Tue Jun 17 00:33:18 UTC 2014


You cannot subclass it that easily - the command is executed on a slave,
and to perform that you'd need to patch all your slaves - a bit tedious,
eh?..

A workaround for your case might be explicitly running your program via
cmd.exe, something like this (written from my head, not checked):

steps.append(ShellCommand(command=['cmd.exe', '/C', "xt-size.exe
libWhatever.a --totals > memstats.txt"]))

Thanks,
Vasily


2014-06-17 2:35 GMT+04:00 Bob Hood <bhood2 at comcast.net>:

> On 6/16/2014 1:54 PM, Alex Escott wrote:
> > As the title says... I have a ShellCommand step like this:
> >
> >
> Steps.append(ShellCommand(command=['xt-size.exe','libWhatever.a','--totals','>','memstats.txt']))
> >
> > When I run it, it gives an error:
> > xt-size.exe: Warning: '>' is not an ordinary file
> > xt-size.exe: 'memstats.txt': No such file
>
> You might subclass ShellCommand (call it "ShellCommandToFile" or
> something),
> and perform your own subprocess execution of the provided command that
> captures stdout to a subprocess.PIPE.  Then you can read the output, and
> send
> it to the file you require.
>
> Since ShellCommand has 'want_stdout' and 'want_stderr' flags, I'd guess
> it's
> already doing a capture of these output streams, so it should be fairly
> easy
> to redirect it to your needs.
>
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20140617/63259908/attachment.html>


More information about the devel mailing list