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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5786 - (show annotations) (download) (as text)
Wed Jan 11 06:52:45 2006 UTC (13 years, 11 months ago) by alan
File MIME type: application/x-sh
File size: 1562 byte(s)
minor cosmetic tweaks as per Derek's lamentations
1 #!/bin/bash
2
3 function die() {
4 echo "$1" >&2;
5 exit 1;
6 }
7
8 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
18 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 testParseBuffer
35 testParserCategories
36 testPidf
37 testPksc7
38 testPlainContents
39 testRlmi
40 testSdp
41 testSipFrag
42 testSipMessage
43 testSipMessageMemory
44 testStack
45 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 else
77 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 fi;
85 done;
86
87
88 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:executable *

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27