[asterisk-dev] [Code Review]: TestSuite archiving of Asterisk logs on test run failure

mjordan reviewboard at asterisk.org
Mon Sep 12 15:34:15 CDT 2011



> On Sept. 12, 2011, 3:20 p.m., Paul Belanger wrote:
> > /asterisk/trunk/runtests.py, line 190
> > <https://reviewboard.asterisk.org/r/1431/diff/1/?file=20561#file20561line190>
> >
> >     Is it possible to access the asterisk instance astlogdir value?

Probably not.  If we created an Asterisk instance, we'd create a new directory structure, as opposed to merely querying for the potential location of the log directories.  Right now the astlogdir is read from the config files, which are moved and copied (etc.) to the Asterisk instances on creation - when this happens, you've already created a directory structure, which we definitely want to avoid.  Otherwise, we'd be creating directories in the same place we wanted to copy from.

That's why I moved the base location of the asterisk temp directory to being static, so I didn't make any false instances of Asterisk (and create more directories)


> On Sept. 12, 2011, 3:20 p.m., Paul Belanger wrote:
> > /asterisk/trunk/runtests.py, line 194
> > <https://reviewboard.asterisk.org/r/1431/diff/1/?file=20561#file20561line194>
> >
> >     How about a symlink?  Seems like a waste to copy it.

You wouldn't want a symbolic link, as the thing that you link to is apparently being deleted by the test harness.  We'd have a dangling link otherwise.  If we aren't deleting the Asterisk logs between runs, then yes, a symbolic link would suffice here.


- mjordan


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


On Sept. 12, 2011, 1:42 p.m., mjordan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1431/
> -----------------------------------------------------------
> 
> (Updated Sept. 12, 2011, 1:42 p.m.)
> 
> 
> Review request for Asterisk Developers and Paul Belanger.
> 
> 
> Summary
> -------
> 
> The TestSuite will now archive the Asterisk logs if a test run fails.  All logs are copied to the local ./logs directory, using the same relative test path used for the /tmp/asterisk-testsuite/ directory.
> 
> Note that since the top level script does not have knowledge of the number of instances of Asterisk created by a test, all Asterisk (ast1, etc.) directories created by the test are archived.
> 
> 
> Diffs
> -----
> 
>   /asterisk/trunk/runtests.py 2190 
>   /asterisk/trunk/lib/python/asterisk/asterisk.py 2188 
> 
> Diff: https://reviewboard.asterisk.org/r/1431/diff
> 
> 
> Testing
> -------
> 
> local machine.  Induced a test failure, tested multiple runs to ensure that archiving occurs even if directories were previously copied.
> 
> 
> Thanks,
> 
> mjordan
> 
>

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


More information about the asterisk-dev mailing list