[Buildbot-commits] [Buildbot] #2150: flatten nested lists in ShellCommands commands=..

Buildbot nobody at buildbot.net
Sun Dec 4 15:39:09 UTC 2011


#2150: flatten nested lists in ShellCommands commands=..
------------------------+--------------------
Reporter:  mmadia       |       Owner:
    Type:  enhancement  |      Status:  new
Priority:  major        |   Milestone:  0.8.6
 Version:  0.8.5        |  Resolution:
Keywords:  simple       |
------------------------+--------------------

Comment (by dustin):

 I would begin testing this by using something like this in your
 master.cfg:

 {{{
 factory.addStep(ShellCommand(command=['trial', ['-d', '-B'], 'pyflakes']))
 }}}

 and see how it fails - in particular, it tries to pass `"['-d', '-B']"` as
 an argument, which trial doesn't recognize.

 Then, look at `master/buildbot/test/unit/test_steps_shell.py`, and add a
 unit test that produces the same error.

 Then, fix the problem, by flattening the nested lists -- and see both the
 unit test and your master.cfg start working properly.

 Then, make things a little more complex - add tests with two nested lists,
 or lists nested two-deep, or an empty nested list, or whatever you can
 think of - and make sure that the step does the right thing.

 Finally, add a sentence to the documentation for !ShellCommand so that
 others expect this behavior.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2150#comment:2>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list