/[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 5882 - (hide annotations) (download) (as text)
Sun Feb 12 22:38:33 2006 UTC (13 years, 9 months ago) by jason
File MIME type: application/x-sh
File size: 1544 byte(s)
move testParseBuffer to rutil/test

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     testSipFrag
41     testSipMessage
42     testSipMessageMemory
43     testStack
44     testTcp
45     testTime
46     testTimer
47     testTuple
48     testUri"
49    
50     echo top
51    
52     x=0
53     length=0
54    
55     for prg in ${drivers}; do
56     x=$(( $(echo $prg | wc -c ) + 0 ))
57     [ $x"x" == "x" ] && continue
58     if [ $x -gt $length ]; then
59     length=$x
60     fi
61     done
62    
63     flist=""
64     mlist=""
65     failed=0
66     missed=0
67    
68     for i in ${drivers}; do
69     t=./$i
70     pad $length $i
71     if test ! -x $t; then
72     echo "not found. (fail)" >&2
73     mlist="${mlist} ${i}"
74     missed=$(( $missed + 1 ))
75 derek 5777 else
76 alan 5786 if $t > $i.log 2>&1; then
77     echo "passed" >&2
78     else
79     echo "failed" >&2
80     failed=$(( $failed + 1 ))
81     flist="${flist} ${i}"
82     fi
83 derek 5777 fi;
84     done;
85    
86    
87 alan 5786 if [ ${missed} -ne 0 ]; then
88     echo "Missed: "${mlist}
89     echo "${missed} tests missing" >&2
90     fi
91    
92     if [ ${failed} -ne 0 ]; then
93     [ ${missed} -ne 0 ] && echo ""
94     echo "Failed: "${flist}
95     echo "${failed} tests failed" >&2
96     fi
97    
98    
99     exit $(( ${missed} + ${failed} ))
100    

Properties

Name Value
svn:executable *

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27