<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/3397/">https://reviewboard.asterisk.org/r/3397/</a>
     </td>
    </tr>
   </table>
   <br />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Looks mostly good, although I didn't test any of it.</pre>
 <br />







<div>




<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/3397/diff/1/?file=56637#file56637line464" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/lib/python/asterisk/asterisk.py</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <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">464</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">msg</span> <span class="o">=</span> <span class="s">"Directory '</span><span class="si">%s</span><span class="s">' not found in asterisk.conf"</span> <span class="o">%</span> <span class="p">(</span><span class="n">astdirkey</span><span class="p">)</span></pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Don't do:

  "abc %s" % (string)

It means exactly:

  "abc %s" % string

If you want avoid incidental interpolation errors, pass a real tuple:

  "abc %s" % (string,)

(Yes, I know, others have done so too. Kill it when you edit it.)</pre>
</div>
<br />

<div>




<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/3397/diff/1/?file=56643#file56643line58" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test</a>
    <span style="font-weight: normal;">

     (Diff revision 1)

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



 
 

 <tbody>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">58</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        file_replace_string('%s/configs/ast1/sip_helper.inc' % (testdir), '<<path>>', '%s' % (<span class="hl">working</span>dir))</pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">57</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        file_replace_string('%s/configs/ast1/sip_helper.inc' % (testdir), '<<path>>', '%s' % (<span class="hl">test</span>dir))</pre></td>
  </tr>

  <tr>
    <th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">59</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        file_replace_string('%s/configs/ast2/sip_helper.inc' % (testdir), '<<path>>', '%s' % (<span class="hl">working</span>dir))</pre></td>
    <th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">58</font></th>
    <td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        file_replace_string('%s/configs/ast2/sip_helper.inc' % (testdir), '<<path>>', '%s' % (<span class="hl">test</span>dir))</pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Same as above:

  "%s/configs/ast1/sip_helper.inc" % (testdir)

Should be:

  "%s/configs/ast1/sip_helper.inc" % testdir 
  # or (testdir,)

And:

  "%s" % (testdir)

Should be:

  testdir

BUT:

  There is nothing dynamic here, AFAICS.

  Can't you patch
    tests/channels/SIP/sip_tls_call/configs/ast*/sip_helper.inc
  instead to hardcode the partial path instead of using <<path>>?</pre>
</div>
<br />



<p>- wdoekes</p>


<br />
<p>On March 25th, 2014, 11:38 p.m. UTC, Corey Farrell wrote:</p>








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

<div>Review request for Asterisk Developers and wdoekes.</div>
<div>By Corey Farrell.</div>


<p style="color: grey;"><i>Updated March 25, 2014, 11:38 p.m.</i></p>







<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="https://issues.asterisk.org/jira/browse/ASTERISK-23538">ASTERISK-23538</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
testsuite
</div>


<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;">run-local: install asttest within astroot directory structure, fix the path statement (local install of asttest was never in $PATH before).
lib/python/asterisk.py: add get_path
chanspy_barge, chanspy_w_mixmonitor: use astspooldir/tmp to write the testaudio1
sip_tls_call & sip_tls_register: use key files from original location instead of copying them
fax/sip/local_channel_t38_queryoption, udptl, udptl_v6: store file from ReceiveFax in ${ASTDATADIR}

asterisk.get_path is designed to be used in place of manual path construction involving asterisk._base, and to encourage use of os.path.join style construction.

Though reviewboard isn't showing it, this patch adds 'astroot' to svn:ignore of the testsuite root.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">Verified all modified tests still using work with run-local, and no longer create any untracked files in svn.  I believe these changes to be correct for use without run-local, but can't test that.</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/udptl_v6/configs/ast2/extensions.conf <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/udptl/configs/ast2/extensions.conf <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/fax/sip/local_channel_t38_queryoption/configs/ast2/extensions.conf <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_tls_register/run-test <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/helper2 <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/helper1 <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/apps/chanspy/chanspy_w_mixmonitor/run-test <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/tests/apps/chanspy/chanspy_barge/run-test <span style="color: grey">(4889)</span></li>

 <li>/asterisk/trunk/run-local <span style="color: grey">(4889)</span></li>

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

</ul>

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







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








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