[asterisk-dev] [Code Review] 3397: testsuite: directory fixes to prevent untracked files from being created in the svn directory
Corey Farrell
reviewboard at asterisk.org
Fri Jun 6 08:43:13 CDT 2014
> On May 23, 2014, 6:22 a.m., wdoekes wrote:
> > /asterisk/trunk/lib/python/asterisk/asterisk.py, line 464
> > <https://reviewboard.asterisk.org/r/3397/diff/1/?file=56637#file56637line464>
> >
> > 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.)
Thanks for the explanation. I always try to follow coding guidelines but I find PEP-8 to be very non-intuitive so I have more trouble than with C code.
> On May 23, 2014, 6:22 a.m., wdoekes wrote:
> > /asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test, lines 58-59
> > <https://reviewboard.asterisk.org/r/3397/diff/1/?file=56643#file56643line58>
> >
> > 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>>?
I've replaced testdir with self.test_name. I don't want to hardcode that folder to sip_helper.inc, just to avoid possible future issues if the test is renamed/moved.
- Corey
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3397/#review11965
-----------------------------------------------------------
On March 25, 2014, 7:38 p.m., Corey Farrell wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3397/
> -----------------------------------------------------------
>
> (Updated March 25, 2014, 7:38 p.m.)
>
>
> Review request for Asterisk Developers and wdoekes.
>
>
> Bugs: ASTERISK-23538
> https://issues.asterisk.org/jira/browse/ASTERISK-23538
>
>
> Repository: testsuite
>
>
> Description
> -------
>
> 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.
>
>
> Diffs
> -----
>
> /asterisk/trunk/tests/udptl_v6/configs/ast2/extensions.conf 4889
> /asterisk/trunk/tests/udptl/configs/ast2/extensions.conf 4889
> /asterisk/trunk/tests/fax/sip/local_channel_t38_queryoption/configs/ast2/extensions.conf 4889
> /asterisk/trunk/tests/channels/SIP/sip_tls_register/run-test 4889
> /asterisk/trunk/tests/channels/SIP/sip_tls_call/run-test 4889
> /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/helper2 4889
> /asterisk/trunk/tests/channels/SIP/sip_tls_call/configs/helper1 4889
> /asterisk/trunk/tests/apps/chanspy/chanspy_w_mixmonitor/run-test 4889
> /asterisk/trunk/tests/apps/chanspy/chanspy_barge/run-test 4889
> /asterisk/trunk/run-local 4889
> /asterisk/trunk/lib/python/asterisk/asterisk.py 4889
>
> Diff: https://reviewboard.asterisk.org/r/3397/diff/
>
>
> Testing
> -------
>
> 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.
>
>
> Thanks,
>
> Corey Farrell
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140606/b3e9f71d/attachment.html>
More information about the asterisk-dev
mailing list