Mercurial > hg > CbC > CbC_gcc
comparison contrib/compare_tests @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
34 | 34 |
35 export LC_ALL=C | 35 export LC_ALL=C |
36 | 36 |
37 tool=gxx | 37 tool=gxx |
38 | 38 |
39 tmp1=/tmp/$tool-testing.$$a | 39 TMPDIR=${TMPDIR:-/tmp} |
40 tmp2=/tmp/$tool-testing.$$b | 40 tmp1=$TMPDIR/$tool-testing.$$a |
41 now_s=/tmp/$tool-testing.$$d | 41 tmp2=$TMPDIR/$tool-testing.$$b |
42 before_s=/tmp/$tool-testing.$$e | 42 now_s=$TMPDIR/$tool-testing.$$d |
43 lst1=/tmp/$tool-lst1.$$ | 43 before_s=$TMPDIR/$tool-testing.$$e |
44 lst2=/tmp/$tool-lst2.$$ | 44 lst1=$TMPDIR/$tool-lst1.$$ |
45 lst3=/tmp/$tool-lst3.$$ | 45 lst2=$TMPDIR/$tool-lst2.$$ |
46 lst4=/tmp/$tool-lst4.$$ | 46 lst3=$TMPDIR/$tool-lst3.$$ |
47 lst5=/tmp/$tool-lst5.$$ | 47 lst4=$TMPDIR/$tool-lst4.$$ |
48 sum1=/tmp/$tool-sum1.$$ | 48 lst5=$TMPDIR/$tool-lst5.$$ |
49 sum2=/tmp/$tool-sum2.$$ | 49 sum1=$TMPDIR/$tool-sum1.$$ |
50 sum2=$TMPDIR/$tool-sum2.$$ | |
50 tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $sum2" | 51 tmps="$tmp1 $tmp2 $now_s $before_s $lst1 $lst2 $lst3 $lst4 $lst5 $sum1 $sum2" |
51 | 52 |
52 [ "$1" = "-strict" ] && strict=$1 && shift | 53 [ "$1" = "-strict" ] && strict=$1 && shift |
53 [ "$1" = "-?" ] && usage | 54 [ "$1" = "-?" ] && usage |
54 [ "$2" = "" ] && usage "Must specify both PREVIOUS and CURRENT" | 55 [ "$2" = "" ] && usage "Must specify both PREVIOUS and CURRENT" |
126 grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 | 127 grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 |
127 grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2 | 128 grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2 |
128 | 129 |
129 grep -s . $tmp2 >/dev/null | 130 grep -s . $tmp2 >/dev/null |
130 if [ $? = 0 ]; then | 131 if [ $? = 0 ]; then |
131 echo "Tests that now fail, but worked before:" | 132 num=`cat $tmp2 | wc -l` |
133 echo "Tests that now fail, but worked before ($num tests):" | |
132 echo | 134 echo |
133 cat $tmp2 | 135 cat $tmp2 |
134 echo | 136 echo |
135 exit_status=1 | 137 exit_status=1 |
136 fi | 138 fi |
138 grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 | 140 grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 |
139 grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2 | 141 grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2 |
140 | 142 |
141 grep -s . $tmp2 >/dev/null | 143 grep -s . $tmp2 >/dev/null |
142 if [ $? = 0 ]; then | 144 if [ $? = 0 ]; then |
143 echo "Tests that now work, but didn't before:" | 145 num=`cat $tmp2 | wc -l` |
146 echo "Tests that now work, but didn't before ($num tests):" | |
144 echo | 147 echo |
145 cat $tmp2 | 148 cat $tmp2 |
146 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 | 149 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 |
147 echo | 150 echo |
148 fi | 151 fi |
150 grep '^FAIL' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 | 153 grep '^FAIL' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 |
151 grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2 | 154 grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2 |
152 | 155 |
153 grep -s . $tmp2 >/dev/null | 156 grep -s . $tmp2 >/dev/null |
154 if [ $? = 0 ]; then | 157 if [ $? = 0 ]; then |
155 echo "New tests that FAIL:" | 158 num=`cat $tmp2 | wc -l` |
159 echo "New tests that FAIL ($num tests):" | |
156 echo | 160 echo |
157 cat $tmp2 | 161 cat $tmp2 |
158 echo | 162 echo |
159 exit_status=1 | 163 exit_status=1 |
160 fi | 164 fi |
162 grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 | 166 grep '^PASS' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 |
163 grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2 | 167 grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -23 $tmp1 - >$tmp2 |
164 | 168 |
165 grep -s . $tmp2 >/dev/null | 169 grep -s . $tmp2 >/dev/null |
166 if [ $? = 0 ]; then | 170 if [ $? = 0 ]; then |
167 echo "New tests that PASS:" | 171 num=`cat $tmp2 | wc -l` |
172 echo "New tests that PASS ($num tests):" | |
168 echo | 173 echo |
169 cat $tmp2 | 174 cat $tmp2 |
170 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 | 175 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 |
171 echo | 176 echo |
172 fi | 177 fi |
174 grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 | 179 grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 |
175 grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2 | 180 grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2 |
176 | 181 |
177 grep -s . $tmp2 >/dev/null | 182 grep -s . $tmp2 >/dev/null |
178 if [ $? = 0 ]; then | 183 if [ $? = 0 ]; then |
179 echo "Old tests that passed, that have disappeared: (Eeek!)" | 184 num=`cat $tmp2 | wc -l` |
185 echo "Old tests that passed, that have disappeared ($num tests): (Eeek!)" | |
180 echo | 186 echo |
181 cat $tmp2 | 187 cat $tmp2 |
182 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 | 188 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 |
183 echo | 189 echo |
184 fi | 190 fi |
186 grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 | 192 grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 |
187 grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2 | 193 grep '^FAIL' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -13 $tmp1 - >$tmp2 |
188 | 194 |
189 grep -s . $tmp2 >/dev/null | 195 grep -s . $tmp2 >/dev/null |
190 if [ $? = 0 ]; then | 196 if [ $? = 0 ]; then |
191 echo "Old tests that failed, that have disappeared: (Eeek!)" | 197 num=`cat $tmp2 | wc -l` |
198 echo "Old tests that failed, that have disappeared ($num tests): (Eeek!)" | |
192 echo | 199 echo |
193 cat $tmp2 | 200 cat $tmp2 |
194 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 | 201 [ -n "$strict" ] && echo "Strict test fails" && exit_status=1 |
195 echo | 202 echo |
196 fi | 203 fi |