[asterisk-dev] [Code Review] use cli_alias.conf and optimize fastagi tests.

Paul Belanger reviewboard at asterisk.org
Thu Dec 2 18:45:00 UTC 2010



> On 2010-12-02 12:39:38, Tilghman Lesher wrote:
> > asterisk/trunk/lib/python/asterisk/asterisk.py, line 248
> > <https://reviewboard.asterisk.org/r/1045/diff/2/?file=14218#file14218line248>
> >
> >     I disagree with deleting this routine.  Really, we should be breaking out the arguments, so that any CLI changes to the order or additional mandatory arguments in the future are dealt with properly.
> >     
> >     Additionally, abstracting the command away in the library means that we aren't stuck with 1.4 syntax forever.  Once 1.4 is EOLed, we edit only the library, instead of needing to edit umpteen-hundred different tests.

Just had a discussion on #asterisk-dev with Tilghman (see below).  In the mean time, I'm going to revert my changes to cli_originate() and look creating wrapper functions around cli_exec().
---
<Corydon76-home> Well, and running the testsuite to ensure that library changes don't break any particular test, but that's better than editing every single test
<pabelanger> Corydon76-home: Ya, I agree editing each test is on a realistic goal.  So, it sounds like we should not be exposing cli_exec() directly to the tests, rather providing cli_originate(), etc wrappers
<Corydon76-home> Yes, I think that's a worthy goal
<Corydon76-home> Goal of not needing to expose a raw exec command, that is


- Paul


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


On 2010-12-02 10:38:17, Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1045/
> -----------------------------------------------------------
> 
> (Updated 2010-12-02 10:38:17)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> This patch deals to 2 issues, removing cli logic to determine Asterisk version (cli_alias.conf) and optimizing fastagi.  If needed I can break them out into separate merges, I was tied of waiting for fastagi to finish.
> 
> 1. Since Asterisk 1.6.2+ has the ability to use CLI alias, we should use it.  We'll be adding to the code coverage matrix.  I've removed all logic and functions that check the version of Asterisk before issuing a CLI command.  Since 1.4 is the oldest revision we are testing with, all CLI syntax MUST be written with 1.4 in mind. If your test is not written for 1.4, you'll then make your CLI commands compatible with the next revision up, 1.6.2.
> 
> 2. I've reworked the fastagi tests, increasing performance on FreeBSD from 22mins to 2mins.   Most of the issues revolved around static timeouts within the tests, I've removed them in favor of dynamic timeouts.  I've also move starting / stopping outside the scope of the tests as the test should NOT depend on Asterisk starting or stopping. 
> 
> 
> Diffs
> -----
> 
>   asterisk/trunk/tests/fastagi/record-file/run-test 1039 
>   asterisk/trunk/tests/fastagi/hangup/run-test 1039 
>   asterisk/trunk/tests/fastagi/get-data/run-test 1039 
>   asterisk/trunk/tests/fastagi/execute/run-test 1039 
>   asterisk/trunk/tests/fastagi/database/run-test 1039 
>   asterisk/trunk/tests/fastagi/control-stream-file/run-test 1039 
>   asterisk/trunk/tests/fastagi/connect/run-test 1039 
>   asterisk/trunk/tests/fastagi/configs/ast1/extensions.conf 1039 
>   asterisk/trunk/tests/directed_pickup/run-test 1039 
>   asterisk/trunk/tests/fastagi/channel-status/run-test 1039 
>   asterisk/trunk/tests/chanspy/chanspy_w_mixmonitor/run-test 1039 
>   asterisk/trunk/tests/chanspy/chanspy_barge/run-test 1039 
>   asterisk/trunk/tests/callparking/run-test 1039 
>   asterisk/trunk/lib/python/asterisk/asterisk.py 1039 
>   asterisk/trunk/tests/blind-transfer-parkingtimeout/run-test 1039 
>   asterisk/trunk/configs/cli_aliases.conf PRE-CREATION 
>   asterisk/trunk/tests/one-step-parking/run-test 1039 
>   asterisk/trunk/tests/mixmonitor_audiohook_inherit/run-test 1039 
>   asterisk/trunk/tests/mixmonitor/run-test 1039 
>   asterisk/trunk/tests/iax2/basic-call/run-test 1039 
>   asterisk/trunk/tests/feature_blonde_transfer/run-test 1039 
>   asterisk/trunk/tests/feature_attended_transfer/run-test 1039 
>   asterisk/trunk/tests/fastagi/wait-for-digit/run-test 1039 
>   asterisk/trunk/tests/fastagi/tests.yaml 1039 
>   asterisk/trunk/tests/fastagi/stream-file/run-test 1039 
>   asterisk/trunk/tests/fastagi/say-time/run-test 1039 
>   asterisk/trunk/tests/fastagi/say-phonetic/run-test 1039 
>   asterisk/trunk/tests/fastagi/say-number/run-test 1039 
>   asterisk/trunk/tests/fastagi/say-digits/run-test 1039 
>   asterisk/trunk/tests/fastagi/say-datetime/run-test 1039 
>   asterisk/trunk/tests/fastagi/say-date/run-test 1039 
>   asterisk/trunk/tests/fastagi/say-alpha/run-test 1039 
> 
> Diff: https://reviewboard.asterisk.org/r/1045/diff
> 
> 
> Testing
> -------
> 
> Local box, and slow FreeBSD system.  Both passed.
> 
> Asterisk 1.4 and trunk.
> 
> 
> Thanks,
> 
> Paul
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20101202/0d50c814/attachment-0001.htm 


More information about the asterisk-dev mailing list