[Buildbot-devel] addStep ShellCommand echo into a file

Axel Hecht l10n.moz at googlemail.com
Thu Jan 10 01:24:05 UTC 2008


The '>' part is shell command foo, so you'll need to pass your command
as a single string, which will pass through the shell, as opposed to
an array, which will exec directly.

Not sure if there's a more fancy way to get stdout and then pipe that
to a file, but just a string should work.

http://buildbot.net/repos/release/docs/buildbot.html#ShellCommand
hints at that, too, but you have to know how to read it to see it ;-)

Axel

2008/1/10, john gale <john at smadness.com>:
>
> I'm trying to create a buildStep which echo's a simple pathname into a
> file.
>
> Mac OS 10.5
>
> class UpdateTOTPath(ShellCommand):
>      def start(self):
>          bname = self.getProperty("buildername")
>          bnumber = self.getProperty("buildnumber")
>          brevision = self.getProperty("got_revision")
>          self.setCommand(["echo", "/apache/docs/builds/build-%s-r%s-b
> %s.tgz" % (bname, brevision, bnumber), ">", "archive/%s.txt" % (bname)])
>          ShellCommand.start(self)
> ...
> f_build1.addStep(UpdateTOTPath())
>
>
> Yet this doesn't seem to be working.  It's as if the build command has
> usurped standard out and is not letting it get into the file at all.
> In the log for this build step, we see the command:
>
> echo /apache/docs/builds/build-syncbot1-r18356-b34.tgz > archive/
> syncbot1.txt
> in dir /build/build (timeout 1200 secs)
> watching logfiles {}
> argv: ['echo', '/apache/docs/builds/build-syncbot1-r18356-b34.tgz',
> '>', 'archive/syncbot1.txt']
>
> But then the standard out for the buildstep is what should have gone
> into the file:
>
> /apache/docs/builds/build-syncbot1-r18356-b34.tgz > archive/syncbot1.txt
>
> and the file itself is empty.
>
> Is there a way we can succeed in piping into a file through a buildStep?
>
> thanks,
>
>         ~ john
>
> =================
> support the arts!
> www.smadness.com
>
> updated October 12, 2005
>
>
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Buildbot-devel mailing list
> Buildbot-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/buildbot-devel
>




More information about the devel mailing list