[Buildbot-devel] Determining steps based on what's checked out...

Jared Grubb jared.grubb at gmail.com
Sat Mar 17 16:31:46 UTC 2012


Here's one approach ... If you subclassed ShellCommand (or maybe even Test), you could do something liek this:

    def start(self):

        # run command 'get list of tests'

        # parse that and make a python list out of it

       for test in list_of_tests:

              # run command for 'test'

              # collect the stdio output and create a new 'log' out of it

That would give you a separate log file for each component if you wanted it. To figure out how to run multiple commands, just model each "run" step after what's in ShellCommand.start as is now.

Jared

On 16 Mar 2012, at 22:42, Matisse Enzer <menzer at apple.com> wrote:

> 
> On Mar 16, 2012, at 1:30 AM, A.T.Hofkamp wrote:
> 
>> On 03/16/2012 12:27 AM, Jarod McBride wrote:
>>> Greetings,
>>> 
>>> So We have a need to create a new feature into BuildBot. We would like to be able to configure
>>> some build steps based on information that is complied after checking out a project from git. We
>> 
>> The conceptual problem with this approach is that part of the build procedure gets moved to 
>> buildbot, and you become unable to build your product without buildbot.
> 
> That's a valid concern.
> 
> In our real-world case what we actually want to do is generate steps for unit testing, where each step runs a set of unit tests for a component of the project.
> 
> We have project that contains a half dozen or so components, and developers will occasionally add a component.
> 
> Every component has a set of unit tests that can be run with:
> 
>     cd {component_name} && bundle exec rake spec
> 
> Right now the buildmaster config has a list of the all the component names and creates a series of build steps at config time when master.cfg is executed.
> 
> We want master.cfg to NOT have the list of components - since that duplicates data that can be determined from the source that gets checked out.
> 
> So, this idea of generating build steps at run time is all about removing the duplication and avoiding having the master.cfg "know" about the list of components in the project for testing purposes.
> 
> -M
> 
> 
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> _______________________________________________
> 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