r38 - in regression_tests/tests: . 2010_Session_inviteab_hangupab
2010_Session_inviteab_hangupab/expected_output
2011_Session_inviteab_hangupba
2011_Session_inviteab_hangupba/expected_output
erik at minisip.org
erik at minisip.org
Sun Nov 19 15:03:58 CET 2006
Author: erik
Date: 2006-11-19 15:03:57 +0100 (Sun, 19 Nov 2006)
New Revision: 38
Added:
regression_tests/tests/2010_Session_inviteab_hangupab/
regression_tests/tests/2010_Session_inviteab_hangupab/Makefile
regression_tests/tests/2010_Session_inviteab_hangupab/expected_output/
regression_tests/tests/2010_Session_inviteab_hangupab/expected_output/expected_output
regression_tests/tests/2010_Session_inviteab_hangupab/test.sh
regression_tests/tests/2011_Session_inviteab_hangupba/
regression_tests/tests/2011_Session_inviteab_hangupba/Makefile
regression_tests/tests/2011_Session_inviteab_hangupba/expected_output/
regression_tests/tests/2011_Session_inviteab_hangupba/expected_output/expected_output
regression_tests/tests/2011_Session_inviteab_hangupba/test.sh
Log:
* Added two tests that set up and tear down a session.
Added: regression_tests/tests/2010_Session_inviteab_hangupab/Makefile
===================================================================
--- regression_tests/tests/2010_Session_inviteab_hangupab/Makefile 2006-11-19 13:45:25 UTC (rev 37)
+++ regression_tests/tests/2010_Session_inviteab_hangupab/Makefile 2006-11-19 14:03:57 UTC (rev 38)
@@ -0,0 +1,4 @@
+all:
+ cd ../../common/ua && make -f Makefile
+clean:
+ rm -f test_output build_output diff_output
Added: regression_tests/tests/2010_Session_inviteab_hangupab/expected_output/expected_output
===================================================================
--- regression_tests/tests/2010_Session_inviteab_hangupab/expected_output/expected_output 2006-11-19 13:45:25 UTC (rev 37)
+++ regression_tests/tests/2010_Session_inviteab_hangupab/expected_output/expected_output 2006-11-19 14:03:57 UTC (rev 38)
@@ -0,0 +1,51 @@
+OUT (UDP): INVITE sip:erik at localhost:40010 SIP/2.0
+OUT (UDP): Call-ID: callidstring
+OUT (UDP): Max-Forwards: 50
+OUT (UDP): From: <sip:clientuser at domain.com>
+OUT (UDP): To: <sip:erik at localhost:40010>
+OUT (UDP): CSeq: 1 INVITE
+OUT (UDP): Contact: <sip:clientuser at 127.0.0.1:40020>;expires=1000
+OUT (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport;branch=branchstring
+OUT (UDP): Content-Length: 0
+OUT (UDP):
+OUT (UDP):
+IN (UDP): SIP/2.0 200 ok
+IN (UDP): Max-Forwards: 70
+IN (UDP): Call-ID: callidstring
+IN (UDP): From: <sip:clientuser at domain.com>
+IN (UDP): To: <sip:erik at localhost:40010>
+IN (UDP): CSeq: 1 INVITE
+IN (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport=40020;branch=branchstring
+IN (UDP): Content-Length: 0
+IN (UDP):
+IN (UDP):
+OUT (UDP): ACK sip:erik at localhost:40010 SIP/2.0
+OUT (UDP): Max-Forwards: 70
+OUT (UDP): Call-ID: callidstring
+OUT (UDP): From: <sip:clientuser at domain.com>
+OUT (UDP): CSeq: 1 ACK
+OUT (UDP): To: <sip:erik at localhost:40010>
+OUT (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport;branch=branchstring
+OUT (UDP): Content-Length: 0
+OUT (UDP):
+OUT (UDP):
+OUT (UDP): BYE sip:erik at localhost:40010 SIP/2.0
+OUT (UDP): Max-Forwards: 70
+OUT (UDP): From: <sip:clientuser at domain.com>
+OUT (UDP): To: <sip:erik at localhost:40010>
+OUT (UDP): CSeq: 1 BYE
+OUT (UDP): Call-ID: callidstring
+OUT (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport;branch=branchstring
+OUT (UDP): Content-Length: 0
+OUT (UDP):
+OUT (UDP):
+IN (UDP): SIP/2.0 200 ok
+IN (UDP): Max-Forwards: 70
+IN (UDP): From: <sip:clientuser at domain.com>
+IN (UDP): To: <sip:erik at localhost:40010>
+IN (UDP): CSeq: 1 BYE
+IN (UDP): Call-ID: callidstring
+IN (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport=40020;branch=branchstring
+IN (UDP): Content-Length: 0
+IN (UDP):
+IN (UDP):
Added: regression_tests/tests/2010_Session_inviteab_hangupab/test.sh
===================================================================
--- regression_tests/tests/2010_Session_inviteab_hangupab/test.sh 2006-11-19 13:45:25 UTC (rev 37)
+++ regression_tests/tests/2010_Session_inviteab_hangupab/test.sh 2006-11-19 14:03:57 UTC (rev 38)
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+make > build_output 2>&1 || exit 2
+
+# set up server on port 40010, send it a sleep command
+echo sleep 100 | ../../common/ua/ua -p 40010 -u serveruser at domain.com > /dev/null 2>&1 &
+
+# regression test is done on clients output
+echo -e "sleep 1\ncall erik at localhost:40010\nsleep 2\nhangup\nsleep 3" |
+../../common/ua/ua -p 40020 -u clientuser at domain.com > test_output || exit 3
+
+# make output predictable - i.e. remove callid and branch strings (pseudo-random)
+sed -i "s/Call-ID:.*$/Call-ID: callidstring/" test_output
+sed -i "s/branch=.*$/branch=branchstring/" test_output
+sed -i "s/[0-9][0-9][0-9].[0-9][0-9][0-9].//" test_output #remove timestamp at start of lines
+
+if [ -e expected_output/expected_output ] ; then
+ diff test_output expected_output/expected_output > diff_output ;
+else
+ echo "EXPECTED VALUE OR TEST OUTPUT NOT FOUND!" > diff_output ;
+fi
+
+exit 0
Property changes on: regression_tests/tests/2010_Session_inviteab_hangupab/test.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: regression_tests/tests/2011_Session_inviteab_hangupba/Makefile
===================================================================
--- regression_tests/tests/2011_Session_inviteab_hangupba/Makefile 2006-11-19 13:45:25 UTC (rev 37)
+++ regression_tests/tests/2011_Session_inviteab_hangupba/Makefile 2006-11-19 14:03:57 UTC (rev 38)
@@ -0,0 +1,4 @@
+all:
+ cd ../../common/ua && make -f Makefile
+clean:
+ rm -f test_output build_output diff_output
Added: regression_tests/tests/2011_Session_inviteab_hangupba/expected_output/expected_output
===================================================================
--- regression_tests/tests/2011_Session_inviteab_hangupba/expected_output/expected_output 2006-11-19 13:45:25 UTC (rev 37)
+++ regression_tests/tests/2011_Session_inviteab_hangupba/expected_output/expected_output 2006-11-19 14:03:57 UTC (rev 38)
@@ -0,0 +1,51 @@
+OUT (UDP): INVITE sip:erik at localhost:40010 SIP/2.0
+OUT (UDP): Call-ID: callidstring
+OUT (UDP): Max-Forwards: 50
+OUT (UDP): From: <sip:clientuser at domain.com>
+OUT (UDP): To: <sip:erik at localhost:40010>
+OUT (UDP): CSeq: 1 INVITE
+OUT (UDP): Contact: <sip:clientuser at 127.0.0.1:40020>;expires=1000
+OUT (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport;branch=branchstring
+OUT (UDP): Content-Length: 0
+OUT (UDP):
+OUT (UDP):
+IN (UDP): SIP/2.0 200 ok
+IN (UDP): Max-Forwards: 70
+IN (UDP): Call-ID: callidstring
+IN (UDP): From: <sip:clientuser at domain.com>
+IN (UDP): To: <sip:erik at localhost:40010>
+IN (UDP): CSeq: 1 INVITE
+IN (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport=40020;branch=branchstring
+IN (UDP): Content-Length: 0
+IN (UDP):
+IN (UDP):
+OUT (UDP): ACK sip:erik at localhost:40010 SIP/2.0
+OUT (UDP): Max-Forwards: 70
+OUT (UDP): Call-ID: callidstring
+OUT (UDP): From: <sip:clientuser at domain.com>
+OUT (UDP): CSeq: 1 ACK
+OUT (UDP): To: <sip:erik at localhost:40010>
+OUT (UDP): Via: SIP/2.0/UDP 127.0.0.1:40020;rport;branch=branchstring
+OUT (UDP): Content-Length: 0
+OUT (UDP):
+OUT (UDP):
+IN (UDP): BYE sip:clientuser at 127.0.0.1:40020 SIP/2.0
+IN (UDP): Max-Forwards: 70
+IN (UDP): From: <sip:erik at localhost:40010>
+IN (UDP): To: <sip:clientuser at domain.com>
+IN (UDP): CSeq: 800 BYE
+IN (UDP): Call-ID: callidstring
+IN (UDP): Via: SIP/2.0/UDP 127.0.0.1:40010;rport;branch=branchstring
+IN (UDP): Content-Length: 0
+IN (UDP):
+IN (UDP):
+OUT (UDP): SIP/2.0 200 ok
+OUT (UDP): Max-Forwards: 70
+OUT (UDP): From: <sip:erik at localhost:40010>
+OUT (UDP): To: <sip:clientuser at domain.com>
+OUT (UDP): CSeq: 800 BYE
+OUT (UDP): Call-ID: callidstring
+OUT (UDP): Via: SIP/2.0/UDP 127.0.0.1:40010;rport=40010;branch=branchstring
+OUT (UDP): Content-Length: 0
+OUT (UDP):
+OUT (UDP):
Added: regression_tests/tests/2011_Session_inviteab_hangupba/test.sh
===================================================================
--- regression_tests/tests/2011_Session_inviteab_hangupba/test.sh 2006-11-19 13:45:25 UTC (rev 37)
+++ regression_tests/tests/2011_Session_inviteab_hangupba/test.sh 2006-11-19 14:03:57 UTC (rev 38)
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+make > build_output 2>&1 || exit 2
+
+# set up server on port 40010, send it a sleep command
+echo -e "sleep 6\nhangup\sleep 5" | ../../common/ua/ua -p 40010 -u serveruser at domain.com > /dev/null 2>&1 &
+
+# regression test is done on clients output
+echo -e "sleep 1\ncall erik at localhost:40010\nsleep 8" |
+../../common/ua/ua -p 40020 -u clientuser at domain.com > test_output || exit 3
+
+# make output predictable - i.e. remove callid and branch strings (pseudo-random)
+sed -i "s/Call-ID:.*$/Call-ID: callidstring/" test_output
+sed -i "s/branch=.*$/branch=branchstring/" test_output
+sed -i "s/[0-9][0-9][0-9].[0-9][0-9][0-9].//" test_output #remove timestamp at start of lines
+
+if [ -e expected_output/expected_output ] ; then
+ diff test_output expected_output/expected_output > diff_output ;
+else
+ echo "EXPECTED VALUE OR TEST OUTPUT NOT FOUND!" > diff_output ;
+fi
+
+exit 0
Property changes on: regression_tests/tests/2011_Session_inviteab_hangupba/test.sh
___________________________________________________________________
Name: svn:executable
+ *
More information about the Minisip-devel
mailing list