<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://reviewboard.asterisk.org/r/1791/">https://reviewboard.asterisk.org/r/1791/</a>
     </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On March 5th, 2012, 2:58 a.m., <b>wdoekes</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/1791/diff/1/?file=25446#file25446line193" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/runtests.py</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">def list_tags(self):</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">193</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">tags</span> <span class="o">=</span> <span class="p">[]</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">194</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">maxwidth</span> <span class="o">=</span> <span class="mi">0</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">195</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">for</span> <span class="n">test</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">tests</span><span class="p">:</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">196</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="k">for</span> <span class="n">tag</span> <span class="ow">in</span> <span class="n">test</span><span class="o">.</span><span class="n">test_config</span><span class="o">.</span><span class="n">tags</span><span class="p">:</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">197</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="k">if</span> <span class="ow">not</span> <span class="n">tag</span> <span class="ow">in</span> <span class="n">tags</span><span class="p">:</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">198</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                    <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">tag</span><span class="p">)</span> <span class="o">&gt;</span> <span class="n">maxwidth</span><span class="p">:</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">199</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                        <span class="n">maxwidth</span> <span class="o">=</span> <span class="nb">len</span><span class="p">(</span><span class="n">tag</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">200</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                    <span class="n">tags</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">tag</span><span class="p">)</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">If you&#39;re nesting that deep, you&#39;re not doing the python way ;)

tags = []
for test in tests:
    tags.extend(test.test_config.tags)
tags = list(set(tags))
tags.sort(key=str.lower)
maxwidth = max(len(i) for i in tags)</pre>
 </blockquote>



 <p>On March 5th, 2012, 9:12 a.m., <b>Matt Jordan</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">That&#39;s much cleaner.  My only dislike is that before we build a set from the tags, we extend all tags onto the list.  With enough tests, that might get a little unwieldy... but premature optimization and all that.</pre>
 </blockquote>





 <p>On March 6th, 2012, 2:18 a.m., <b>wdoekes</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">You&#39;re right, both about the dislike and the premature optimization ;)
But in that case, set() comes to the rescue again.

tags = set()
for test in tests:
    tags = tags.union(test.test_config.tags)
tags = list(tags)</pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I like this better as well</pre>
<br />

<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On March 5th, 2012, 2:58 a.m., <b>wdoekes</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/1791/diff/1/?file=25446#file25446line203" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/runtests.py</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
   <td colspan="2"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">def list_tags(self):</pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">203</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">i</span> <span class="o">=</span> <span class="mi">0</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">204</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="n">tagline</span> <span class="o">=</span> <span class="s">&quot;&quot;</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">205</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">for</span> <span class="n">tag</span> <span class="ow">in</span> <span class="n">tags</span><span class="p">:</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">206</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">tagline</span> <span class="o">+=</span> <span class="n">tag</span><span class="o">.</span><span class="n">ljust</span><span class="p">(</span><span class="n">maxwidth</span><span class="o">+</span><span class="mi">5</span><span class="p">)</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">207</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">i</span> <span class="o">+=</span> <span class="mi">1</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">208</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="k">if</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">3</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">209</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="k">print</span> <span class="s">&quot;</span><span class="se">\t</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">tagline</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">210</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">                <span class="n">tagline</span> <span class="o">=</span> <span class="s">&quot;&quot;</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">211</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">tagline</span><span class="p">)</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">212</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="k">print</span> <span class="s">&quot;</span><span class="se">\t</span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="n">tagline</span></pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">213</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I&#39;d prefer this for output, but that&#39;s only because I had time to spare ;)

len3 = int((len(tags) + 2) / 3)
l1, l2, l3 = tags[:len3], tags[len3:len3*2], tags[len3*2:]
for i in range(len3):
    print &#39;\t%-*s      %-*s      %-*s&#39; % (
        maxwidth, &#39;&#39;.join(l1[i:i+1]),
        maxwidth, &#39;&#39;.join(l2[i:i+1]),
        maxwidth, &#39;&#39;.join(l3[i:i+1])
    )
</pre>
 </blockquote>



 <p>On March 5th, 2012, 9:53 a.m., <b>Matt Jordan</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I like it as well, although it doesn&#39;t work well if the length of tags is less than 3.  Granted, that&#39;s not very likely to happen - but nothing says it can&#39;t. :-)

That being said, I&#39;m not a big fan of having to use a counter inside an iterator.  Modified this slightly to use part of yours and an iterator to split the lists up into chunks.</pre>
 </blockquote>





 <p>On March 6th, 2012, 2:15 a.m., <b>wdoekes</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">What do you mean, not work well with 2 or less items?


$ python nix.py 
Mine:
        aap      noot         
Matt&#39;s:
        aap      noot         


And your version is back to LTR sorting instead of top-down:


$ python nix.py 
Mine:
        aap        noot       steel 
        C          Perl       vork  
        C++        PHP              
        mies       Python           
Matt:
        aap        C          C++   
        mies       noot       Perl  
        PHP        Python     steel 
        vork                        


Of course this is a non-issue, except when you say that my version doesn&#39;t work well ;)

P.S.1. You don&#39;t need the &#39;&#39;.join().. You&#39;re doing &#39;&#39;.join(&#39;abc&#39;) which is already &#39;abc&#39;. My version needed it to handle empty slices, you&#39;re handling those with an if.
P.S.2. list()-ifying your generator (diff 2, line 205) is unnecessary; leftover debug code?
P.S.3. So, for your enjoyment -- or mostly mine -- I bring you:

def chunks(l, n):
    l = list(l) # allow generators
    for i in xrange(0, len(l), n):
        yield l[i:i+n]

def columnify(in_list, columns):
    items = list(in_list) # allow generators
    len_per_column = int((len(items) + columns - 1) / columns)
    for column in range(len_per_column):
        for i in range(0, len(items), len_per_column):
            try:
                yield items[i + column]
            except IndexError:
                yield &#39;&#39;

columns = 3
for tag in chunks(columnify(tags, columns), columns):
    print &#39;\t&#39; + &#39;     &#39;.join(&#39;%-*s&#39; % (maxwidth, i) for i in tag)

</pre>
 </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Interesting - I didn&#39;t know that when slicing a sequence, i.e., s[i:j], if j is greater then the length of s, len(s) is used automatically.  I&#39;m certain I have length checking elsewhere in the Test Suite that&#39;s no longer needed as well... Whoops.  Objection removed!

Anyway, as you pointed out, mine does result in printing the items LTR, as opposed to top down - which is what I intended, actually.  I read left to right better than top to bottom :-)

P.S.1 - fixed
P.S.2 - yup, removed
P.S.3 - very nice</pre>
<br />




<p>- Matt</p>


<br />
<p>On March 5th, 2012, 9:55 a.m., Matt Jordan wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Asterisk Developers, Paul Belanger, wdoekes, and opticron.</div>
<div>By Matt Jordan.</div>


<p style="color: grey;"><i>Updated March 5, 2012, 9:55 a.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In review 1771 (https://reviewboard.asterisk.org/r/1771), wdoekes modified the -t option in the Test Suite to only run a single test, as opposed to all tests that matched the parameter value.  While this was the correct behavior for that option, it did prevent running sets of tests (for example, by specifying &quot;tests/channels/SIP&quot;).  Fortunately, the Test Suite has the ability to run sets of tests using the &quot;tags&quot; option, although most of the tests (with the exception of the fax tests) were not taking advantage of this capability.  

The tags feature allows each test to have zero or more tags associated with it, where if tags are associated with a test and specified as parameters to runtests.py, determine if it can run.  All tags specified on the command line must be matched in order for the test to run.

As an example, if Test A specifies:
tags:
  - SIP
  - fax
Then executing runtests.py with &quot;-g SIP&quot; will run the test, as will &quot;-g SIP -g fax&quot;; however, &quot;-g SIP -g CDR&quot; would not.

This patch does the following:
1) It tags the vast majority of tests with a default set of tags.  Tests that didn&#39;t really belong in any group with any other test were left alone (func_srv, for example), as having tests that can be run standalone using the -t option exist in a group with one member didn&#39;t make a lot of sense.
2) It adds an option to runtests.py to list all available tags (-L).  The current output of this option is:

Available test tags:
        AGI                 AMI                 apps                
        CDR                 chan_local          chanspy             
        confbridge          dial                dialplan            
        dialplan_lua        directory           DTMF                
        fax                 fax_gateway         fax_passthrough     
        features            IAX                 incomplete          
        mixmonitor          parking             pickup              
        queues              SIP                 transfer            
        voicemail         
3) It displays the value of a test configuration&#39;s tags field in a number of places, including the -l (list tests) option, as well as when a test is skipped

Additional tags could certainly be specified and added for many of the tests - this patch is merely a first effort at applying basic, useful tags across all tests.  It is expected that when new tests are added, part of the criteria for reviewing that test should be to check whether or not they are tagged appropriately.</pre>
  </td>
 </tr>
</table>





<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/asterisk/trunk/tests/apps/voicemail/authenticate_invalid_mailbox/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/authenticate_invalid_password/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/directory_operator_exit/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/incomplete/sip_incomplete/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/authenticate_extensions/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/directory_context_operator_exit/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/directory_attendant_exit/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/confbridge/confbridge_nominal/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/agi/exit_status/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/runtests.py <span style="color: grey">(3076)</span></li>

 <li>/asterisk/trunk/lib/python/asterisk/TestConfig.py <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/database/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/connect/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/control-stream-file/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/channel-status/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/dialplan/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/directed_pickup/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/chanspy/chanspy_w_mixmonitor/test-config.yaml <span style="color: grey">(3076)</span></li>

 <li>/asterisk/trunk/tests/chanspy/chanspy_barge/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/use_contact_from_200/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/tcpauthtimeout/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/tcpauthlimit/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_tls_register/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_tls_call/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_srtp/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_register_domain_acl/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_register/test-config.yaml <span style="color: grey">(3070)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_outbound_address/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_one_legged_transfer_v6/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_one_legged_transfer/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_hold/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_channel_params/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_blind_transfer/caller_with_reinvite/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_blind_transfer/caller_refer_only/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_blind_transfer/callee_with_reinvite/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_blind_transfer/callee_refer_only/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_attended_transfer_v6/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_attended_transfer_tcp/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_attended_transfer/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/secure_bridge_media/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/refer_replaces_to_self/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/realtime_sipregs/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/pcap_demo/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/realtime_nosipregs/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/options/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/noload_res_srtp_attempt_srtp/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/noload_res_srtp/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/nat_supertest/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/message_unauth_from/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/message_unauth/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/message_from_call/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/message_disabled/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/message_auth_cust_hdr/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/message_auth/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/info_dtmf/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/header_parsing/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/handle_response_refer/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/handle_response_address_incomplete/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/codec_negotiation/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/originate-cdr-disposition/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/nocdr/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/console_fork_before_dial/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/console_fork_after_busy_forward/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/console_dial_sip_transfer/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/console_dial_sip_congestion/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/console_dial_sip_busy/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/console_dial_sip_answer/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/cdr_userfield/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/cdr_unanswered_yes/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/cdr_originate_sip_congestion_log/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/blind-transfer-accountcode/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/app_queue/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/cdr/app_dial_G_flag/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/callparking/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/callparking_retrieval/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/blind-transfer-parkingtimeout/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/leave_voicemail_priority/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/leave_voicemail_nominal/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/leave_voicemail_forwarding_auto_urgent/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/leave_voicemail_forwarding/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/leave_voicemail_external_notification/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/leave_voicemail_contexts/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/func_vmcount/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_while_leaving_msg/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_reply/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_options_record_unavail/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_options_record_temp/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_options_record_name/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_options_record_busy/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_options_change_password/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_new_user_hangup/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_new_user/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_forward_with_prepend/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_forward_hangup/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_forward/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_envelope/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_dialout/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_delete/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_callback/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/authenticate_nominal/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/execute/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/get-data/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/hangup/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/record-file/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/say-alpha/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/say-date/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/say-datetime/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/say-digits/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/say-number/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/say-phonetic/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/say-time/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/stream-file/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/fastagi/wait-for-digit/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/feature_attended_transfer/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/feature_blonde_transfer/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/iax2/basic-call/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/manager/action-events-response/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/manager/authlimit/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/manager/authtimeout/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/manager/login/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/manager/response-time/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/mixmonitor/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/mixmonitor_audiohook_inherit/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/one-step-parking/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/pbx/call-files/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/pbx/call-files2/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/pbx/merge_contexts/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/pbx/pbx_lua_background/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/pbx/pbx_lua_goto/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/queues/macro_gosub_test/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/queues/position_priority_maxlen/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/queues/queue_baseline/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/queues/ringinuse_and_pause/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/queues/set_penalty/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/queues/wrapup_time/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/regressions/M18882/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/udptl/test-config.yaml <span style="color: grey">(3064)</span></li>

 <li>/asterisk/trunk/tests/udptl_v6/test-config.yaml <span style="color: grey">(3064)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/1791/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>