[asterisk-dev] [Code Review] Use spaces to format XML and create SIPpVersion class

Paul Belanger reviewboard at asterisk.org
Fri Dec 10 16:16:25 UTC 2010



> On 2010-12-10 09:07:52, Russell Bryant wrote:
> > This is a great start.  I have a suggestion for a further enhancement.
> > 
> > Some tests require a feature of SIPp, not so much a version.  For example, some tests require that it has been built with pcap support.  I think it would be good to be able to specify that as a type of SIPp requirement in the test config file.
> 
> Paul Belanger wrote:
>     Unless I missed an option, you can specify -TLS, -PCAP, or -TLS-PCAP in your version string.  SIPpVersion will compare both version number an options.  I have not added the proper flags to the tests yet, was looking for help on which ones used -TLS, -PCAP or -TLS-PCAP
> 
> Russell Bryant wrote:
>     You can include -TLS, -PCAP, or -TLS-PCAP in the version string.  However, the version number takes precedence over the features.  For example.
>     
>     "v3.2-PCAP" > "v3.2"
>     
>     but:
>     
>     "v3.2" > "v3.1-PCAP-TLS"
>     
>     I'd like to able to specify both a version number requirement and a specific feature requirement.  I don't think the feature requirements can be handled through the > comparison exclusively.  They need to be boolean requirements so you can say "I need pcap support but don't care what SIPp version", or "I require pcap support and SIPp of at least v3.2".

Okay, I see what you mean, Something like this:

SIPpVersion("v2.0.1", "TLS")
SIPpVersion("TLS-PCAP")

---
- sipp :
    - version : 'v3.0'
    - feature : 'TLS'

- sipp :
    - feature : 'TLS-PCAP'


- Paul


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


On 2010-12-09 17:05:55, Paul Belanger wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1049/
> -----------------------------------------------------------
> 
> (Updated 2010-12-09 17:05:55)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> After running into some issue getting the testsuite running under Ubuntu 8.04, it seemed older versions of SIPp fail to parse tabs (/t) properly. So, I replaced them with 4 spaces.
> 
> I then ran into an issue of failing tests because my SIPp version did not have the appropriate compile time flags enabled, so I created a new SIPpVersion parser.  I used the AsteriskVersion class as a template, also creating various unit tests to test the parser (very cool and fun BTW).  I've defaulted our SIPp based tests to 'v3.0' however I know some will require TLS, PCAP or both.  Will need help to confirm which will use it.
> 
> Feedback is required :)
> 
> 
> Diffs
> -----
> 
>   asterisk/trunk/lib/python/sipp/version.py PRE-CREATION 
>   asterisk/trunk/runtests.py 1127 
>   asterisk/trunk/tests/cdr/app_dial_G_flag/sipp/call.xml 1127 
>   asterisk/trunk/tests/cdr/app_dial_G_flag/sipp/wait-for-call.xml 1127 
>   asterisk/trunk/tests/cdr/app_dial_G_flag/test-config.yaml 1127 
>   asterisk/trunk/tests/cdr/app_queue/sipp/call-then-hangup.xml 1127 
>   asterisk/trunk/tests/cdr/app_queue/sipp/call.xml 1127 
>   asterisk/trunk/tests/cdr/app_queue/sipp/wait-for-call-hangup.xml 1127 
>   asterisk/trunk/tests/cdr/app_queue/test-config.yaml 1127 
>   asterisk/trunk/tests/cdr/blind-transfer-accountcode/sipp/call-then-blind-transfer.xml 1127 
>   asterisk/trunk/tests/cdr/blind-transfer-accountcode/sipp/register.xml 1127 
>   asterisk/trunk/tests/cdr/blind-transfer-accountcode/sipp/wait-for-call-do-hangup.xml 1127 
>   asterisk/trunk/tests/cdr/blind-transfer-accountcode/sipp/wait-for-call.xml 1127 
>   asterisk/trunk/tests/cdr/blind-transfer-accountcode/test-config.yaml 1127 
>   asterisk/trunk/tests/cdr/originate-cdr-disposition/sipp/wait-for-call-busy.xml 1127 
>   asterisk/trunk/tests/cdr/originate-cdr-disposition/sipp/wait-for-call-congestion.xml 1127 
>   asterisk/trunk/tests/cdr/originate-cdr-disposition/sipp/wait-for-call-timeout.xml 1127 
>   asterisk/trunk/tests/cdr/originate-cdr-disposition/sipp/wait-for-call.xml 1127 
>   asterisk/trunk/tests/cdr/originate-cdr-disposition/test-config.yaml 1127 
>   asterisk/trunk/tests/queues/position_priority_maxlen/test-config.yaml 1127 
>   asterisk/trunk/tests/queues/ringinuse_and_pause/sipp/uas.xml 1127 
>   asterisk/trunk/tests/queues/ringinuse_and_pause/test-config.yaml 1127 
>   asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml 1127 
>   asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml 1127 
>   asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml 1127 
>   asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml 1127 
>   asterisk/trunk/tests/rfc2833_dtmf_detect/test-config.yaml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/sipp/wait-refer-200-notify.xml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/sipp/wait-refer-202-error.xml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/sipp/wait-refer-202-notify-provisional.xml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/sipp/wait-refer-202-notify.xml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/sipp/wait-refer-400.xml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/sipp/wait-refer-500.xml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/sipp/wait-refer-603.xml 1127 
>   asterisk/trunk/tests/sip/handle_response_refer/test-config.yaml 1127 
>   asterisk/trunk/tests/sip/options/sipp/options.xml 1127 
>   asterisk/trunk/tests/sip/options/sipp/options2.xml 1127 
>   asterisk/trunk/tests/sip/options/test-config.yaml 1127 
>   asterisk/trunk/tests/sip_channel_params/sipp/call.xml 1127 
>   asterisk/trunk/tests/sip_channel_params/sipp/register.xml 1127 
>   asterisk/trunk/tests/sip_channel_params/test-config.yaml 1127 
>   asterisk/trunk/tests/sip_outbound_address/sipp/uas1.xml 1127 
>   asterisk/trunk/tests/sip_outbound_address/sipp/uas2.xml 1127 
>   asterisk/trunk/tests/sip_outbound_address/test-config.yaml 1127 
>   asterisk/trunk/tests/sip_register/sipp/registerv4.xml 1127 
>   asterisk/trunk/tests/sip_register/sipp/registerv6.xml 1127 
>   asterisk/trunk/tests/sip_register/test-config.yaml 1127 
> 
> Diff: https://reviewboard.asterisk.org/r/1049/diff
> 
> 
> Testing
> -------
> 
> local Ubuntu, FreeBSD and CentOS system.
> 
> 
> Thanks,
> 
> Paul
> 
>

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


More information about the asterisk-dev mailing list