[Buildbot-devel] Chaining two commands in the Test build step

SZENTE Balint balint at szentedwg.ro
Mon Oct 10 10:10:06 UTC 2011


Hello!


I'm using the *Test* build step to run all the unit tests for a project.
Basically it is just a shell command that runs a python script. This
generates an XML report file.

I would like to do the following:
 * insert somehow a RemoteCommand with uploadFile after the
   RemoteShellCommand is finished to get the XML report file in memory
 * transform this XML data into HTML by XSLT
 * add as self.addHTMLLog('report', html_buffer) in order to display the
   HTML report (similar to normal plain text logs with the *logfiles*
   argument)

By studying the source code I found that WarningCountingShellCommand
would be the closest match to what I want, but this build step uploads
the suppression file *before* running the shell command. Actually it
inserts a callback before ShellCommand.start().

How could I upload the report XML file *after* the RemoteShellCommand
is finished, but before the BuildStep is completed? Would be possible
this by subclassing the Test class to keep the already implemented
features, maybe by hooking the commandComplete method?

I would appreciate some hints on this. Thank you,

Balint




More information about the devel mailing list