[asterisk-dev] [Code Review]: Allow running test suite locally - initial work

Tzafrir Cohen reviewboard at asterisk.org
Sat Mar 23 09:22:59 CDT 2013



> On March 21, 2013, 4:52 a.m., wdoekes wrote:
> > /asterisk/trunk/run_local, line 50
> > <https://reviewboard.asterisk.org/r/2371/diff/2/?file=34069#file34069line50>
> >
> >     This is empty. mktemp_symlink doesn't echo anything. So the RM below does nothing.
> >     
> >     And it wouldn't be reached if ./runtests.py returned false.
> >     
> >     And we don't like that things are removed. The original tests keep the structure around so we can asterisk -C in a testdir after running it.

I noticed the missing echo and it's now fixed.

As for deleting it: I should not flood /tmp with such files. If you need to test anything, you can always recreate the symlink. Real content is not deleted.


> On March 21, 2013, 4:52 a.m., wdoekes wrote:
> > /asterisk/trunk/run_local, line 26
> > <https://reviewboard.asterisk.org/r/2371/diff/2/?file=34069#file34069line26>
> >
> >     You're forcing me into naming the testsuite /testsuite/, while it doesn't need to.
> >     
> >     Wouldn't this be nicer?
> >     
> >       ASTROOT=~/astroots/1.8.x ./run_local setup 
> >       ASTROOT=~/astroots/1.8.x ./run_local run
> >     
> >     Then we wouldn't need a random tmpname, but could have /tmp/ast_test_1.8.x instead.

Changing run_local to run-local.

As for the other names: I simply decided not to change them. The patch tries to keep everything in tact if run-local is not used. The test suite assumes it is run in the directory under asterisk. I'm not sure why, exactly. I figure I can easily disable that test, but I'm not sure what this breaks.

I do find this assumption odd. I suppose the test suite should either be part of the source tree or be completely independent of it. I personally prefer the former.


- Tzafrir


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2371/#review8098
-----------------------------------------------------------


On March 7, 2013, 12:28 p.m., Tzafrir Cohen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2371/
> -----------------------------------------------------------
> 
> (Updated March 7, 2013, 12:28 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> Place anything needed for the test suite (except the actual sources of Asterisk) under the test suite directory.
> 
> Fix parts in the python code. Add a wrapper script (run_local) for the required automation.
> 
> Work is still needed on asttest (add a destdir option? Consolidate all the run-test scripts to run it through a common function?) but I'm not exactly sure how the information is passed to Lua.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/README.txt 3660 
>   /asterisk/trunk/lib/python/asterisk/asterisk.py 3660 
>   /asterisk/trunk/run_local PRE-CREATION 
> 
> Diff: https://reviewboard.asterisk.org/r/2371/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Tzafrir
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130323/3043cb8b/attachment-0001.htm>


More information about the asterisk-dev mailing list