annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35
b2f247463b83 better decoding of 7c blocks
carl
parents:
diff changeset
1 #!/bin/bash
b2f247463b83 better decoding of 7c blocks
carl
parents:
diff changeset
2
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
3
176
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
4 function consistency()
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
5 {
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
6 # check source and xml documentation for consistency
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
7 (
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
8 cd .. # back to top level of project
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
9 f1=/tmp/f1$$
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
10 f2=/tmp/f2$$
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
11 grep 'case 0x' src/libpst.c | awk '{print $2}' | tr A-Z a-z | sed -e 's/://g' | sort >$f1
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
12 grep '^0x' xml/libpst.in | awk '{print $1}' | (for i in {1..19}; do read a; done; cat) | sort >$f2
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
13 diff $f1 $f2
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
14 less $f1
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
15 rm -f $f1 $f2
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
16 )
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
17 }
ac6e22c8a9cf build separate libpst, libpst-libs, libpst-devel rpms.
Carl Byington <carl@five-ten-sg.com>
parents: 168
diff changeset
18
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
19 function dodii()
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
20 {
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
21 n="$1"
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
22 fn="$2"
213
4a659f3138b7 fix pst2dii for shared library changes
Carl Byington <carl@five-ten-sg.com>
parents: 211
diff changeset
23 echo $fn
234
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
24 ba=$(basename "$fn" .pst)
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
25 rm -rf output$n
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
26 mkdir output$n
234
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
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
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
28 }
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
29
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
30
150
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
31 function doldif()
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
32 {
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
33 n="$1"
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
34 fn="$2"
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
35 echo $fn
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
36 ba=$(basename "$fn" .pst)
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
37 rm -rf output$n
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
38 mkdir output$n
213
4a659f3138b7 fix pst2dii for shared library changes
Carl Byington <carl@five-ten-sg.com>
parents: 211
diff changeset
39 $val ../src/pst2ldif -d $ba.ldif.log -b 'o=ams-cc.com, c=US' -c 'inetOrgPerson' $fn >$ba.ldif.err 2>&1
150
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
40 }
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
41
06aa84023b48 rename some structure fields to reflect our better understanding of the pst format
Carl Byington <carl@five-ten-sg.com>
parents: 148
diff changeset
42
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
43 function dopst()
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
44 {
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
45 n="$1"
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
46 fn="$2"
118
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
47 echo $fn
0f1492b7fe8b patch from Fridrich Strba for building on mingw and general cleanup of autoconf files
Carl Byington <carl@five-ten-sg.com>
parents: 116
diff changeset
48 ba=$(basename "$fn" .pst)
234
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
49 jobs=""
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
50 [ -n "$val" ] && jobs="-j 0"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
51 [ "$regression" == "yes" ] && jobs="-j 0"
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
52 rm -rf output$n
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
53 mkdir output$n
234
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
54 if [ "$regression" == "yes" ]; then
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
55 $val ../src/readpst $jobs -te -r -D -cv -o output$n $fn >$ba.err 2>&1
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
56 else
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
57 #val ../src/readpst $jobs -r -D -cv -o output$n $fn
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
58 $val ../src/readpst $jobs -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
59 #$val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
60 #../src/getidblock -p $fn 0 >$ba.fulldump
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
61 fi
100
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
62 }
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
63
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
64
1e4a7610d525 fixes from Justin Greer to add -D option to include deleted items, to add missing email headers, to fix bug in my_stristr()
Carl Byington <carl@five-ten-sg.com>
parents: 99
diff changeset
65
41
183ae993b9ad security fix for potential buffer overrun in lz decompress
carl
parents: 36
diff changeset
66
93
cb14583c119a iconv changes for Mac
Carl Byington <carl@five-ten-sg.com>
parents: 79
diff changeset
67 pushd ..
cb14583c119a iconv changes for Mac
Carl Byington <carl@five-ten-sg.com>
parents: 79
diff changeset
68 make || exit
cb14583c119a iconv changes for Mac
Carl Byington <carl@five-ten-sg.com>
parents: 79
diff changeset
69 popd
cb14583c119a iconv changes for Mac
Carl Byington <carl@five-ten-sg.com>
parents: 79
diff changeset
70
164
ab384fed78c5 Compensate for iconv conversion to utf-7 that produces strings that are not null terminated.
Carl Byington <carl@five-ten-sg.com>
parents: 163
diff changeset
71 rm -rf output* *.err *.log
ab384fed78c5 Compensate for iconv conversion to utf-7 that produces strings that are not null terminated.
Carl Byington <carl@five-ten-sg.com>
parents: 163
diff changeset
72
234
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
73 func="dopst"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
74 [ "$1" == "pst" ] && func="dopst"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
75 [ "$1" == "ldif" ] && func="doldif"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
76 [ "$1" == "dii" ] && func="dodii"
231
fe64279df92b patches from Chris White, Roberto Polli, Justin Greer
Carl Byington <carl@five-ten-sg.com>
parents: 230
diff changeset
77
234
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
78 val="valgrind --leak-check=full"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
79 val=""
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
80
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
81 regression=""
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
82 [ "$2" == "reg" ] && regression="yes"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
83 [ "$regression" == "yes" ] && val=""
231
fe64279df92b patches from Chris White, Roberto Polli, Justin Greer
Carl Byington <carl@five-ten-sg.com>
parents: 230
diff changeset
84
234
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
85 $func 1 ams.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
86 $func 2 sample_64.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
87 $func 3 test.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
88 $func 4 big_mail.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
89 $func 5 mbmg.archive.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
90 $func 6 Single2003-read.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
91 $func 7 Single2003-unread.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
92 $func 8 ol2k3high.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
93 $func 9 ol97high.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
94 $func 10 returned_message.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
95 $func 11 flow.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
96 $func 12 test-html.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
97 $func 13 test-text.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
98 $func 14 joe.romanowski.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
99 $func 15 hourig1.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
100 $func 16 test-mac.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
101 $func 17 harris.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
102 $func 18 spam.pst
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
103 $func 19 rendgen.pst # single email appointment
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
104 $func 20 rendgen2.pst # email appointment with no termination date
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
105 $func 21 rendgen3.pst # mime signed email
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
106 $func 22 rendgen4.pst # appointment test cases
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
107 $func 23 rendgen5.pst # appointment test cases
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
108
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
109 [ -n "$val" ] && grep 'lost:' *err | grep -v 'lost: 0 '
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
110
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
111 if [ "$regression" == "yes" ]; then
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
112 (
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
113 (for i in output*; do find $i -type f; done) | while read a; do
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
114 grep -v iamunique "$a"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
115 rm -f "$a"
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
116 done
ed0cb66b23d4 better detection of dsn delivery reports
Carl Byington <carl@five-ten-sg.com>
parents: 233
diff changeset
117 ) >regression.txt
71
1bd4491cf8ff fix documentation of 8 byte backpointers
Carl Byington <carl@five-ten-sg.com>
parents: 67
diff changeset
118 fi