/[resiprocate]/main/resip/stack/test/runtests.sh
ViewVC logotype

Annotation of /main/resip/stack/test/runtests.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9080 - (hide annotations) (download)
Thu Mar 17 04:58:27 2011 UTC (8 years, 8 months ago) by kwhite
File MIME type: text/plain
File size: 1573 byte(s)
update sipstack tests

* Adapt for SipStack internal changes
* For testStack, make 'event' the default thread model; this better simulates
  what applications do, and makes it a better unit test. The old behavior
  is available with --thread-type=common option.
* For testStack, make default interface for all platforms 127.0.0.1. Can get
  old behavior with --bind=''. Previously 127.0.0.1 was forced for
  Windows; but even Linux platforms don't always have working DNS.
* For testStack, add docs to better explain some options.
* Add new testStackStd.sh and invoke from runtests.sh to test
  more combinations as part of standard unit tests
1 alan 5786 #!/bin/bash
2    
3 derek 5777 function die() {
4     echo "$1" >&2;
5     exit 1;
6     }
7    
8 alan 5786 function pad () {
9     local l=$( echo -n $2 | wc -c )
10     local o=""
11     while [ $l -lt $1 ]; do
12     o="${o} "
13     l=$(( $l + 1 ))
14     done
15     echo -n "${o}${2} : " >& 2
16     }
17 derek 5777
18 alan 5786 failed=0
19    
20    
21     drivers="
22     testAppTimer
23     testApplicationSip
24     testConnectionBase
25     testCorruption
26     testDigestAuthentication
27     testEmbedded
28     testEmptyHeader
29     testExternalLogger
30     testIM
31     testMessageWaiting
32     testMultipartMixedContents
33     testMultipartRelated
34     testParserCategories
35     testPidf
36     testPksc7
37     testPlainContents
38     testRlmi
39     testSdp
40 bcampen 6600 testSelectInterruptor
41 alan 5786 testSipFrag
42     testSipMessage
43     testSipMessageMemory
44 kwhite 9080 testStackStd.sh
45 alan 5786 testTcp
46     testTime
47     testTimer
48     testTuple
49     testUri"
50    
51     echo top
52    
53     x=0
54     length=0
55    
56     for prg in ${drivers}; do
57     x=$(( $(echo $prg | wc -c ) + 0 ))
58     [ $x"x" == "x" ] && continue
59     if [ $x -gt $length ]; then
60     length=$x
61     fi
62     done
63    
64     flist=""
65     mlist=""
66     failed=0
67     missed=0
68    
69     for i in ${drivers}; do
70     t=./$i
71     pad $length $i
72     if test ! -x $t; then
73     echo "not found. (fail)" >&2
74     mlist="${mlist} ${i}"
75     missed=$(( $missed + 1 ))
76 derek 5777 else
77 alan 5786 if $t > $i.log 2>&1; then
78     echo "passed" >&2
79     else
80     echo "failed" >&2
81     failed=$(( $failed + 1 ))
82     flist="${flist} ${i}"
83     fi
84 derek 5777 fi;
85     done;
86    
87    
88 alan 5786 if [ ${missed} -ne 0 ]; then
89     echo "Missed: "${mlist}
90     echo "${missed} tests missing" >&2
91     fi
92    
93     if [ ${failed} -ne 0 ]; then
94     [ ${missed} -ne 0 ] && echo ""
95     echo "Failed: "${flist}
96     echo "${failed} tests failed" >&2
97     fi
98    
99    
100     exit $(( ${missed} + ${failed} ))
101    

Properties

Name Value
svn:eol-style native
svn:executable *
svn:mime-type text/plain

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27