comparison regression/regression-tests.bash @ 234:ed0cb66b23d4

better detection of dsn delivery reports
author Carl Byington <carl@five-ten-sg.com>
date Fri, 11 Sep 2009 12:46:36 -0700
parents 1d50ff3c5091
children 093e0e9248bb
comparison
equal deleted inserted replaced
233:1d50ff3c5091 234:ed0cb66b23d4
19 function dodii() 19 function dodii()
20 { 20 {
21 n="$1" 21 n="$1"
22 fn="$2" 22 fn="$2"
23 echo $fn 23 echo $fn
24 ba=$(basename "$fn" .pst)
24 rm -rf output$n 25 rm -rf output$n
25 mkdir output$n 26 mkdir output$n
26 $val ../src/pst2dii -f /usr/share/fonts/bitstream-vera/VeraMono.ttf -B "bates-" -o output$n -O mydii$n -d $fn.log $fn >$fn.dii.err 2>&1 27 $val ../src/pst2dii -f /usr/share/fonts/bitstream-vera/VeraMono.ttf -B "bates-" -o output$n -O $ba.mydii -d $fn.log $fn >$fn.dii.err 2>&1
27 rm -f dumper
28 } 28 }
29 29
30 30
31 function doldif() 31 function doldif()
32 { 32 {
35 echo $fn 35 echo $fn
36 ba=$(basename "$fn" .pst) 36 ba=$(basename "$fn" .pst)
37 rm -rf output$n 37 rm -rf output$n
38 mkdir output$n 38 mkdir output$n
39 $val ../src/pst2ldif -d $ba.ldif.log -b 'o=ams-cc.com, c=US' -c 'inetOrgPerson' $fn >$ba.ldif.err 2>&1 39 $val ../src/pst2ldif -d $ba.ldif.log -b 'o=ams-cc.com, c=US' -c 'inetOrgPerson' $fn >$ba.ldif.err 2>&1
40 rm -f dumper
41 } 40 }
42 41
43 42
44 function dopst() 43 function dopst()
45 { 44 {
46 n="$1" 45 n="$1"
47 fn="$2" 46 fn="$2"
48 echo $fn 47 echo $fn
49 ba=$(basename "$fn" .pst) 48 ba=$(basename "$fn" .pst)
50 jobs="-j 0" 49 jobs=""
51 [ -n "$val" ] && jobs="-j 0" 50 [ -n "$val" ] && jobs="-j 0"
51 [ "$regression" == "yes" ] && jobs="-j 0"
52 rm -rf output$n 52 rm -rf output$n
53 mkdir output$n 53 mkdir output$n
54 #val ../src/readpst $jobs -r -D -cv -o output$n $fn 54 if [ "$regression" == "yes" ]; then
55 #$val ../src/readpst $jobs -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 55 $val ../src/readpst $jobs -te -r -D -cv -o output$n $fn >$ba.err 2>&1
56 $val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 56 else
57 #../src/getidblock -p $fn 0 >$ba.fulldump 57 #val ../src/readpst $jobs -r -D -cv -o output$n $fn
58 $val ../src/readpst $jobs -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
59 #$val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
60 #../src/getidblock -p $fn 0 >$ba.fulldump
61 fi
58 } 62 }
59 63
60 64
61 65
62 val="valgrind --leak-check=full"
63 val=''
64 66
65 pushd .. 67 pushd ..
66 make || exit 68 make || exit
67 popd 69 popd
68 70
69 rm -rf output* *.err *.log 71 rm -rf output* *.err *.log
70 72
71 if [ "$1" == "test" ]; then 73 func="dopst"
72 dopst 19 harris.pst 74 [ "$1" == "pst" ] && func="dopst"
75 [ "$1" == "ldif" ] && func="doldif"
76 [ "$1" == "dii" ] && func="dodii"
73 77
74 elif [ "$1" == "dii" ]; then 78 val="valgrind --leak-check=full"
75 dodii 1 ams.pst 79 val=""
76 dodii 2 sample_64.pst
77 dodii 3 test.pst
78 dodii 4 big_mail.pst
79 80
80 elif [ "$1" == "ldif" ]; then 81 regression=""
81 doldif 1 ams.pst 82 [ "$2" == "reg" ] && regression="yes"
82 doldif 2 sample_64.pst 83 [ "$regression" == "yes" ] && val=""
83 doldif 3 test.pst 84
84 doldif 4 big_mail.pst 85 $func 1 ams.pst
85 doldif 5 mbmg.archive.pst 86 $func 2 sample_64.pst
86 doldif 6 Single2003-read.pst 87 $func 3 test.pst
87 doldif 7 Single2003-unread.pst 88 $func 4 big_mail.pst
88 doldif 8 ol2k3high.pst 89 $func 5 mbmg.archive.pst
89 doldif 9 ol97high.pst 90 $func 6 Single2003-read.pst
90 doldif 10 returned_message.pst 91 $func 7 Single2003-unread.pst
91 doldif 11 flow.pst 92 $func 8 ol2k3high.pst
92 doldif 12 test-html.pst 93 $func 9 ol97high.pst
93 doldif 13 test-text.pst 94 $func 10 returned_message.pst
94 doldif 14 joe.romanowski.pst 95 $func 11 flow.pst
95 doldif 15 hourig1.pst 96 $func 12 test-html.pst
96 doldif 16 hourig2.pst 97 $func 13 test-text.pst
97 doldif 17 hourig3.pst 98 $func 14 joe.romanowski.pst
98 doldif 18 test-mac.pst 99 $func 15 hourig1.pst
99 doldif 19 harris.pst 100 $func 16 test-mac.pst
100 doldif 20 spam.pst 101 $func 17 harris.pst
101 doldif 21 rendgen.pst 102 $func 18 spam.pst
102 else 103 $func 19 rendgen.pst # single email appointment
103 dopst 1 ams.pst 104 $func 20 rendgen2.pst # email appointment with no termination date
104 dopst 2 sample_64.pst 105 $func 21 rendgen3.pst # mime signed email
105 dopst 3 test.pst 106 $func 22 rendgen4.pst # appointment test cases
106 dopst 4 big_mail.pst 107 $func 23 rendgen5.pst # appointment test cases
107 dopst 5 mbmg.archive.pst 108
108 dopst 6 Single2003-read.pst 109 [ -n "$val" ] && grep 'lost:' *err | grep -v 'lost: 0 '
109 dopst 7 Single2003-unread.pst 110
110 dopst 8 ol2k3high.pst 111 if [ "$regression" == "yes" ]; then
111 dopst 9 ol97high.pst 112 (
112 dopst 10 returned_message.pst 113 (for i in output*; do find $i -type f; done) | while read a; do
113 dopst 11 flow.pst 114 grep -v iamunique "$a"
114 dopst 12 test-html.pst 115 rm -f "$a"
115 dopst 13 test-text.pst 116 done
116 dopst 14 joe.romanowski.pst 117 ) >regression.txt
117 dopst 15 hourig1.pst
118 #dopst 16 hourig2.pst
119 #dopst 17 hourig3.pst
120 dopst 18 test-mac.pst
121 dopst 19 harris.pst
122 dopst 20 spam.pst
123 dopst 21 rendgen.pst # single email appointment
124 dopst 22 rendgen2.pst # email appointment with no termination date
125 dopst 23 rendgen3.pst # mime signed email
126 dopst 24 rendgen4.pst # appointment test cases
127 dopst 25 rendgen5.pst # appointment test cases
128 fi 118 fi
129
130 grep 'lost:' *err | grep -v 'lost: 0 '