author | bpb |
Thu, 21 May 2015 09:57:59 -0700 | |
changeset 30689 | 446373feb21e |
parent 29158 | 5d46751992d9 |
child 31310 | 481585782338 |
permissions | -rw-r--r-- |
14111 | 1 |
#!/bin/bash |
2 |
# |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
3 |
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
14111 | 4 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 |
# |
|
6 |
# This code is free software; you can redistribute it and/or modify it |
|
7 |
# under the terms of the GNU General Public License version 2 only, as |
|
8 |
# published by the Free Software Foundation. |
|
9 |
# |
|
10 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
|
11 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
12 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
13 |
# version 2 for more details (a copy is included in the LICENSE file that |
|
14 |
# accompanied this code). |
|
15 |
# |
|
16 |
# You should have received a copy of the GNU General Public License version |
|
17 |
# 2 along with this work; if not, write to the Free Software Foundation, |
|
18 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
19 |
# |
|
20 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
21 |
# or visit www.oracle.com if you need additional information or have any |
|
22 |
# questions. |
|
23 |
# |
|
24 |
||
28356 | 25 |
# This script is processed by configure before it's usable. It is run from |
14111 | 26 |
# the root of the build directory. |
27 |
||
28 |
||
29157 | 29 |
################################################################################ |
14111 | 30 |
|
31 |
# Check that we are run via the wrapper generated by configure |
|
32 |
if [ -z "$SRC_ROOT" ]; then |
|
33 |
echo "Error: You must run this script using build/[conf]/compare.sh" |
|
34 |
exit 1 |
|
35 |
fi |
|
36 |
||
37 |
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then |
|
29157 | 38 |
FULLDUMP_CMD="$OTOOL -v -V -h -X -d" |
14111 | 39 |
LDD_CMD="$OTOOL -L" |
40 |
DIS_CMD="$OTOOL -v -t" |
|
41 |
STAT_PRINT_SIZE="-f %z" |
|
42 |
elif [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
43 |
FULLDUMP_CMD="$DUMPBIN -all" |
|
44 |
LDD_CMD="$DUMPBIN -dependants | $GREP .dll" |
|
45 |
DIS_CMD="$DUMPBIN -disasm:nobytes" |
|
46 |
STAT_PRINT_SIZE="-c %s" |
|
47 |
else |
|
48 |
FULLDUMP_CMD="$READELF -a" |
|
49 |
LDD_CMD="$LDD" |
|
50 |
DIS_CMD="$OBJDUMP -d" |
|
51 |
STAT_PRINT_SIZE="-c %s" |
|
52 |
fi |
|
53 |
||
54 |
UNARCHIVE="$UNZIP -q" |
|
55 |
||
56 |
COMPARE_EXCEPTIONS_INCLUDE="$SRC_ROOT/common/bin/compare_exceptions.sh.incl" |
|
57 |
if [ ! -e "$COMPARE_EXCEPTIONS_INCLUDE" ]; then |
|
58 |
echo "Error: Cannot locate the exceptions file, it should have been here: $COMPARE_EXCEPTIONS_INCLUDE" |
|
59 |
exit 1 |
|
60 |
fi |
|
61 |
# Include exception definitions |
|
62 |
. "$COMPARE_EXCEPTIONS_INCLUDE" |
|
63 |
||
29157 | 64 |
################################################################################ |
14111 | 65 |
# Compare text files and ignore specific differences: |
66 |
# |
|
67 |
# * Timestamps in Java sources generated by idl2java |
|
68 |
# * Sorting order and cleanup style in .properties files |
|
69 |
||
70 |
diff_text() { |
|
71 |
OTHER_FILE=$1 |
|
72 |
THIS_FILE=$2 |
|
73 |
||
74 |
SUFFIX="${THIS_FILE##*.}" |
|
75 |
||
76 |
TMP=1 |
|
77 |
||
78 |
if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then |
|
28356 | 79 |
# Filter out date string, ant version and java version differences. |
20049 | 80 |
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \ |
14111 | 81 |
$GREP '^[<>]' | \ |
82 |
$SED -e '/[<>] Ant-Version: Apache Ant .*/d' \ |
|
28356 | 83 |
-e '/[<>] Created-By: .* (Oracle [Corpatin)]*/d' \ |
84 |
-e '/[<>] [Corpatin]*)/d' \ |
|
85 |
-e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d') |
|
14111 | 86 |
fi |
87 |
if test "x$SUFFIX" = "xjava"; then |
|
20049 | 88 |
TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \ |
14111 | 89 |
$GREP '^[<>]' | \ |
90 |
$SED -e '/[<>] \* from.*\.idl/d' \ |
|
91 |
-e '/[<>] \*.*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \ |
|
92 |
-e '/[<>] \*.*[0-9]\{4\} [0-9][0-9]*:[0-9]\{2\}:[0-9]\{2\}.*/d' \ |
|
93 |
-e '/\/\/ Generated from input file.*/d' \ |
|
94 |
-e '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' \ |
|
95 |
-e '/\/\/ java GenerateCharacter.*/d') |
|
96 |
fi |
|
97 |
# Ignore date strings in class files. |
|
28356 | 98 |
# On Macosx the system sources for generated java classes produce different output on |
25854 | 99 |
# consequtive invocations seemingly randomly. |
14111 | 100 |
# For example a method parameter randomly named "thePoint" or "aPoint". Ignore this. |
25854 | 101 |
# Anonymous lambda classes get randomly assigned counters in their names. |
14111 | 102 |
if test "x$SUFFIX" = "xclass"; then |
103 |
# To improve performance when large diffs are found, do a rough filtering of classes |
|
104 |
# elibeble for these exceptions |
|
15058
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
105 |
if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' \ |
28356 | 106 |
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \ |
107 |
-e thePoint -e aPoint -e setItemsPtr \ |
|
25854 | 108 |
-e 'lambda\$[a-zA-Z0-9]*\$[0-9]' ${THIS_FILE} > /dev/null; then |
27560 | 109 |
$JAVAP -c -constants -l -p "${OTHER_FILE}" > ${OTHER_FILE}.javap |
110 |
$JAVAP -c -constants -l -p "${THIS_FILE}" > ${THIS_FILE}.javap |
|
14111 | 111 |
TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \ |
112 |
$GREP '^[<>]' | \ |
|
113 |
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \ |
|
28356 | 114 |
-e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \ |
115 |
-e '/[<>].*Point Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \ |
|
116 |
-e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \ |
|
117 |
-e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d' \ |
|
25854 | 118 |
-e '/[<>].*lambda\$[a-zA-Z0-9]*\$[0-9]*/d') |
14111 | 119 |
fi |
120 |
fi |
|
121 |
if test "x$SUFFIX" = "xproperties"; then |
|
15059
4131faaca93d
8005575: build-infra: Three JCK tests fails on Solaris with new RE Autoconf-Based build
erikj
parents:
15058
diff
changeset
|
122 |
# Run through nawk to add possibly missing newline at end of file. |
23428
3c8a05bf4656
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
erikj
parents:
21759
diff
changeset
|
123 |
$CAT $OTHER_FILE | $NAWK '{ print }' | LC_ALL=C $SORT > $OTHER_FILE.cleaned |
15059
4131faaca93d
8005575: build-infra: Three JCK tests fails on Solaris with new RE Autoconf-Based build
erikj
parents:
15058
diff
changeset
|
124 |
# Disable this exception since we aren't changing the properties cleaning method yet. |
4131faaca93d
8005575: build-infra: Three JCK tests fails on Solaris with new RE Autoconf-Based build
erikj
parents:
15058
diff
changeset
|
125 |
# $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \ |
4131faaca93d
8005575: build-infra: Three JCK tests fails on Solaris with new RE Autoconf-Based build
erikj
parents:
15058
diff
changeset
|
126 |
# | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \ |
28356 | 127 |
# | $SED -e '/^#/d' -e '/^$/d' \ |
15059
4131faaca93d
8005575: build-infra: Three JCK tests fails on Solaris with new RE Autoconf-Based build
erikj
parents:
15058
diff
changeset
|
128 |
# -e :a -e '/\\$/N; s/\\\n//; ta' \ |
28356 | 129 |
# -e 's/^[ \t]*//;s/[ \t]*$//' \ |
130 |
# -e 's/\\=/=/' | LC_ALL=C $SORT > $OTHER_FILE.cleaned |
|
25854 | 131 |
# Filter out date string differences. |
132 |
TMP=$(LC_ALL=C $DIFF $OTHER_FILE.cleaned $THIS_FILE | \ |
|
133 |
$GREP '^[<>]' | \ |
|
134 |
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d') |
|
135 |
fi |
|
28356 | 136 |
if test "x$SUFFIX" = "xhtml"; then |
29157 | 137 |
# Some javadoc versions do not put quotes around font size |
138 |
HTML_FILTER="$SED \ |
|
139 |
-e 's/<font size=-1>/<font size=\"-1\">/g'" |
|
140 |
$CAT $THIS_FILE | eval "$HTML_FILTER" > $THIS_FILE.filtered |
|
141 |
$CAT $OTHER_FILE | eval "$HTML_FILTER" > $OTHER_FILE.filtered |
|
142 |
TMP=$(LC_ALL=C $DIFF $OTHER_FILE.filtered $THIS_FILE.filtered | \ |
|
25854 | 143 |
$GREP '^[<>]' | \ |
29157 | 144 |
$SED -e '/[<>] <!-- Generated by javadoc .* on .* -->/d' \ |
145 |
-e '/[<>] <meta name="date" content=".*">/d' ) |
|
14111 | 146 |
fi |
147 |
if test -n "$TMP"; then |
|
148 |
echo Files $OTHER_FILE and $THIS_FILE differ |
|
149 |
return 1 |
|
150 |
fi |
|
151 |
||
152 |
return 0 |
|
153 |
} |
|
154 |
||
29157 | 155 |
################################################################################ |
14111 | 156 |
# Compare directory structure |
157 |
||
158 |
compare_dirs() { |
|
159 |
THIS_DIR=$1 |
|
160 |
OTHER_DIR=$2 |
|
161 |
WORK_DIR=$3 |
|
162 |
||
163 |
mkdir -p $WORK_DIR |
|
164 |
||
165 |
(cd $OTHER_DIR && $FIND . -type d | $SORT > $WORK_DIR/dirs_other) |
|
166 |
(cd $THIS_DIR && $FIND . -type d | $SORT > $WORK_DIR/dirs_this) |
|
167 |
||
25854 | 168 |
$DIFF $WORK_DIR/dirs_other $WORK_DIR/dirs_this > $WORK_DIR/dirs_diff |
28356 | 169 |
|
14111 | 170 |
echo -n Directory structure... |
171 |
if [ -s $WORK_DIR/dirs_diff ]; then |
|
172 |
echo Differences found. |
|
173 |
REGRESSIONS=true |
|
174 |
# Differences in directories found. |
|
175 |
ONLY_OTHER=$($GREP '<' $WORK_DIR/dirs_diff) |
|
176 |
if [ "$ONLY_OTHER" ]; then |
|
177 |
echo Only in $OTHER |
|
178 |
$GREP '<' $WORK_DIR/dirs_diff | $SED 's|< ./| |g' |
|
179 |
fi |
|
180 |
ONLY_THIS=$($GREP '>' $WORK_DIR/dirs_diff) |
|
181 |
if [ "$ONLY_THIS" ]; then |
|
182 |
echo Only in $THIS |
|
183 |
$GREP '>' $WORK_DIR/dirs_diff | $SED 's|> ./| |g' |
|
184 |
fi |
|
185 |
else |
|
186 |
echo Identical! |
|
187 |
fi |
|
188 |
} |
|
189 |
||
190 |
||
29157 | 191 |
################################################################################ |
14111 | 192 |
# Compare file structure |
193 |
||
194 |
compare_files() { |
|
195 |
THIS_DIR=$1 |
|
196 |
OTHER_DIR=$2 |
|
197 |
WORK_DIR=$3 |
|
198 |
||
199 |
$MKDIR -p $WORK_DIR |
|
200 |
||
201 |
(cd $OTHER_DIR && $FIND . ! -type d | $SORT > $WORK_DIR/files_other) |
|
202 |
(cd $THIS_DIR && $FIND . ! -type d | $SORT > $WORK_DIR/files_this) |
|
28356 | 203 |
|
14111 | 204 |
$DIFF $WORK_DIR/files_other $WORK_DIR/files_this > $WORK_DIR/files_diff |
205 |
||
206 |
echo -n File names... |
|
207 |
if [ -s $WORK_DIR/files_diff ]; then |
|
208 |
echo Differences found. |
|
209 |
REGRESSIONS=true |
|
210 |
# Differences in files found. |
|
211 |
ONLY_OTHER=$($GREP '<' $WORK_DIR/files_diff) |
|
212 |
if [ "$ONLY_OTHER" ]; then |
|
213 |
echo Only in $OTHER |
|
214 |
$GREP '<' $WORK_DIR/files_diff | $SED 's|< ./| |g' |
|
215 |
fi |
|
216 |
ONLY_THIS=$($GREP '>' $WORK_DIR/files_diff) |
|
217 |
if [ "$ONLY_THIS" ]; then |
|
218 |
echo Only in $THIS |
|
219 |
$GREP '>' $WORK_DIR/files_diff | $SED 's|> ./| |g' |
|
220 |
fi |
|
221 |
else |
|
222 |
echo Identical! |
|
223 |
fi |
|
224 |
} |
|
225 |
||
226 |
||
29157 | 227 |
################################################################################ |
14111 | 228 |
# Compare permissions |
229 |
||
230 |
compare_permissions() { |
|
231 |
THIS_DIR=$1 |
|
232 |
OTHER_DIR=$2 |
|
233 |
WORK_DIR=$3 |
|
234 |
||
235 |
mkdir -p $WORK_DIR |
|
236 |
||
237 |
echo -n Permissions... |
|
238 |
found="" |
|
239 |
for f in `cd $OTHER_DIR && $FIND . -type f` |
|
240 |
do |
|
241 |
if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi |
|
242 |
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi |
|
243 |
OP=`ls -l ${OTHER_DIR}/$f | awk '{printf("%.10s\n", $1);}'` |
|
244 |
TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'` |
|
245 |
if [ "$OP" != "$TP" ] |
|
246 |
then |
|
28356 | 247 |
if [ -z "$found" ]; then echo ; found="yes"; fi |
248 |
$PRINTF "\tother: ${OP} this: ${TP}\t$f\n" |
|
14111 | 249 |
fi |
250 |
done |
|
28356 | 251 |
if [ -z "$found" ]; then |
14111 | 252 |
echo "Identical!" |
253 |
else |
|
254 |
REGRESSIONS=true |
|
255 |
fi |
|
256 |
} |
|
257 |
||
29157 | 258 |
################################################################################ |
14111 | 259 |
# Compare file command output |
260 |
||
261 |
compare_file_types() { |
|
262 |
THIS_DIR=$1 |
|
263 |
OTHER_DIR=$2 |
|
264 |
WORK_DIR=$3 |
|
265 |
||
266 |
$MKDIR -p $WORK_DIR |
|
267 |
||
268 |
echo -n File types... |
|
269 |
found="" |
|
270 |
for f in `cd $OTHER_DIR && $FIND . ! -type d` |
|
271 |
do |
|
272 |
if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi |
|
273 |
if [ ! -f ${THIS_DIR}/$f ]; then continue; fi |
|
25854 | 274 |
OF=`cd ${OTHER_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'` |
275 |
TF=`cd ${THIS_DIR} && $FILE -h $f | $SED 's/BuildID[^,]*//g'` |
|
14111 | 276 |
if [ "$OF" != "$TF" ] |
277 |
then |
|
28356 | 278 |
if [ "`echo $OF | $GREP -c 'Zip archive data'`" -gt 0 ] \ |
279 |
&& [ "`echo $TF | $GREP -c 'Zip archive data'`" -gt 0 ] |
|
280 |
then |
|
281 |
# the way we produce zip-files make it so that directories are stored in |
|
282 |
# old file but not in new (only files with full-path) this makes file |
|
283 |
# report them as different |
|
284 |
continue |
|
285 |
else |
|
286 |
if [ -z "$found" ]; then echo ; found="yes"; fi |
|
287 |
$PRINTF "\tother: ${OF}\n\tthis : ${TF}\n" |
|
288 |
fi |
|
14111 | 289 |
fi |
290 |
done |
|
28356 | 291 |
if [ -z "$found" ]; then |
14111 | 292 |
echo "Identical!" |
293 |
else |
|
294 |
REGRESSIONS=true |
|
295 |
fi |
|
296 |
} |
|
297 |
||
29157 | 298 |
################################################################################ |
14111 | 299 |
# Compare the rest of the files |
300 |
||
301 |
compare_general_files() { |
|
302 |
THIS_DIR=$1 |
|
303 |
OTHER_DIR=$2 |
|
304 |
WORK_DIR=$3 |
|
28356 | 305 |
|
29157 | 306 |
GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" \ |
307 |
! -name "*.zip" ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \ |
|
308 |
! -name "*.jimage" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \ |
|
309 |
! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \ |
|
14458 | 310 |
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \ |
29157 | 311 |
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \ |
312 |
! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \ |
|
313 |
! -name "jspawnhelper" \ |
|
14111 | 314 |
| $GREP -v "./bin/" | $SORT | $FILTER) |
315 |
||
316 |
echo General files... |
|
317 |
for f in $GENERAL_FILES |
|
318 |
do |
|
319 |
if [ -e $OTHER_DIR/$f ]; then |
|
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
320 |
SUFFIX="${f##*.}" |
14111 | 321 |
if [ "$(basename $f)" = "release" ]; then |
322 |
# Ignore differences in change numbers in release file. |
|
323 |
OTHER_FILE=$WORK_DIR/$f.other |
|
324 |
THIS_FILE=$WORK_DIR/$f.this |
|
325 |
$MKDIR -p $(dirname $OTHER_FILE) |
|
326 |
$MKDIR -p $(dirname $THIS_FILE) |
|
327 |
$CAT $OTHER_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $OTHER_FILE |
|
328 |
$CAT $THIS_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $THIS_FILE |
|
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
329 |
elif [ "x$SUFFIX" = "xhtml" ]; then |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
330 |
# Ignore time stamps in docs files |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
331 |
OTHER_FILE=$WORK_DIR/$f.other |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
332 |
THIS_FILE=$WORK_DIR/$f.this |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
333 |
$MKDIR -p $(dirname $OTHER_FILE) |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
334 |
$MKDIR -p $(dirname $THIS_FILE) |
15058
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
335 |
#Note that | doesn't work on mac sed. |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
336 |
$CAT $OTHER_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \ |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
337 |
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \ |
15058
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
338 |
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \ |
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
339 |
-e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \ |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
340 |
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \ |
25854 | 341 |
-e 's/^\(.*\)\( o'"'"'clock \)\([A-Z][A-Z][A-Z]\)/(removed)\2(removed)/' \ |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
342 |
> $OTHER_FILE |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
343 |
$CAT $THIS_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \ |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
344 |
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \ |
15058
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
345 |
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \ |
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
346 |
-e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \ |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
347 |
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \ |
25854 | 348 |
-e 's/^\(.*\)\( o'"'"'clock \)\([A-Z][A-Z][A-Z]\)/(removed)\2(removed)/' \ |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
349 |
> $THIS_FILE |
14111 | 350 |
else |
351 |
OTHER_FILE=$OTHER_DIR/$f |
|
352 |
THIS_FILE=$THIS_DIR/$f |
|
353 |
fi |
|
354 |
DIFF_OUT=$($DIFF $OTHER_FILE $THIS_FILE 2>&1) |
|
355 |
if [ -n "$DIFF_OUT" ]; then |
|
356 |
echo $f |
|
357 |
REGRESSIONS=true |
|
358 |
if [ "$SHOW_DIFFS" = "true" ]; then |
|
359 |
echo "$DIFF_OUT" |
|
360 |
fi |
|
361 |
fi |
|
362 |
fi |
|
363 |
done |
|
364 |
||
365 |
||
366 |
} |
|
367 |
||
29157 | 368 |
################################################################################ |
14111 | 369 |
# Compare zip file |
370 |
||
371 |
compare_zip_file() { |
|
372 |
THIS_DIR=$1 |
|
373 |
OTHER_DIR=$2 |
|
374 |
WORK_DIR=$3 |
|
375 |
ZIP_FILE=$4 |
|
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
376 |
# Optionally provide different name for other zipfile |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
377 |
OTHER_ZIP_FILE=$5 |
14111 | 378 |
|
379 |
THIS_ZIP=$THIS_DIR/$ZIP_FILE |
|
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
380 |
if [ -n "$OTHER_ZIP_FILE" ]; then |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
381 |
OTHER_ZIP=$OTHER_DIR/$OTHER_ZIP_FILE |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
382 |
else |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
383 |
OTHER_ZIP=$OTHER_DIR/$ZIP_FILE |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
384 |
fi |
14111 | 385 |
|
386 |
THIS_SUFFIX="${THIS_ZIP##*.}" |
|
387 |
OTHER_SUFFIX="${OTHER_ZIP##*.}" |
|
388 |
if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then |
|
28356 | 389 |
echo "The files do not have the same suffix type! ($THIS_SUFFIX != $OTHER_SUFFIX)" |
14111 | 390 |
return 2 |
391 |
fi |
|
392 |
||
393 |
TYPE="$THIS_SUFFIX" |
|
394 |
||
395 |
if $CMP $OTHER_ZIP $THIS_ZIP > /dev/null |
|
396 |
then |
|
397 |
return 0 |
|
398 |
fi |
|
399 |
# Not quite identical, the might still contain the same data. |
|
400 |
# Unpack the jar/zip files in temp dirs |
|
28356 | 401 |
|
14111 | 402 |
THIS_UNZIPDIR=$WORK_DIR/$ZIP_FILE.this |
403 |
OTHER_UNZIPDIR=$WORK_DIR/$ZIP_FILE.other |
|
404 |
$RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR |
|
405 |
$MKDIR -p $THIS_UNZIPDIR |
|
406 |
$MKDIR -p $OTHER_UNZIPDIR |
|
27560 | 407 |
if [ "$TYPE" = "jimage" ] |
408 |
then |
|
409 |
(cd $THIS_UNZIPDIR && $JIMAGE extract $THIS_ZIP) |
|
410 |
(cd $OTHER_UNZIPDIR && $JIMAGE extract $OTHER_ZIP) |
|
411 |
else |
|
412 |
(cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP) |
|
413 |
(cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP) |
|
414 |
fi |
|
14111 | 415 |
|
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
416 |
# Find all archives inside and unzip them as well to compare the contents rather than |
15058
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
417 |
# the archives. pie.jar.pack.gz i app3.war is corrupt, skip it. |
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
418 |
EXCEPTIONS="pie.jar.pack.gz" |
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
419 |
for pack in $($FIND $THIS_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do |
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
420 |
($UNPACK200 $pack $pack.jar) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
421 |
# Filter out the unzipped archives from the diff below. |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
422 |
EXCEPTIONS="$EXCEPTIONS $pack $pack.jar" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
423 |
done |
15058
61c4ac49cbda
8005635: build-infra: Support building install in jprt
erikj
parents:
14466
diff
changeset
|
424 |
for pack in $($FIND $OTHER_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a ! -name pie.jar.pack.gz); do |
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
425 |
($UNPACK200 $pack $pack.jar) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
426 |
EXCEPTIONS="$EXCEPTIONS $pack $pack.jar" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
427 |
done |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
428 |
for zip in $($FIND $THIS_UNZIPDIR -name "*.jar" -o -name "*.zip"); do |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
429 |
$MKDIR $zip.unzip |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
430 |
(cd $zip.unzip && $UNARCHIVE $zip) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
431 |
EXCEPTIONS="$EXCEPTIONS $zip" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
432 |
done |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
433 |
for zip in $($FIND $OTHER_UNZIPDIR -name "*.jar" -o -name "*.zip"); do |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
434 |
$MKDIR $zip.unzip |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
435 |
(cd $zip.unzip && $UNARCHIVE $zip) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
436 |
EXCEPTIONS="$EXCEPTIONS $zip" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
437 |
done |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
438 |
|
14111 | 439 |
CONTENTS_DIFF_FILE=$WORK_DIR/$ZIP_FILE.diff |
440 |
# On solaris, there is no -q option. |
|
441 |
if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then |
|
20049 | 442 |
LC_ALL=C $DIFF -r $OTHER_UNZIPDIR $THIS_UNZIPDIR \ |
14111 | 443 |
| $GREP -v -e "^<" -e "^>" -e "^Common subdirectories:" \ |
444 |
> $CONTENTS_DIFF_FILE |
|
445 |
else |
|
20049 | 446 |
LC_ALL=C $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE |
14111 | 447 |
fi |
448 |
||
449 |
ONLY_OTHER=$($GREP "^Only in $OTHER_UNZIPDIR" $CONTENTS_DIFF_FILE) |
|
450 |
ONLY_THIS=$($GREP "^Only in $THIS_UNZIPDIR" $CONTENTS_DIFF_FILE) |
|
451 |
||
452 |
return_value=0 |
|
453 |
||
454 |
if [ -n "$ONLY_OTHER" ]; then |
|
455 |
echo " Only OTHER $ZIP_FILE contains:" |
|
456 |
echo "$ONLY_OTHER" | sed "s|Only in $OTHER_UNZIPDIR| |"g | sed 's|: |/|g' |
|
457 |
return_value=1 |
|
458 |
fi |
|
459 |
||
460 |
if [ -n "$ONLY_THIS" ]; then |
|
461 |
echo " Only THIS $ZIP_FILE contains:" |
|
462 |
echo "$ONLY_THIS" | sed "s|Only in $THIS_UNZIPDIR| |"g | sed 's|: |/|g' |
|
463 |
return_value=1 |
|
464 |
fi |
|
465 |
||
466 |
if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then |
|
29157 | 467 |
DIFFING_FILES=$($GREP -e 'differ$' -e '^diff ' $CONTENTS_DIFF_FILE \ |
468 |
| $SED -e 's/^Files //g' -e 's/diff -r //g' | $CUT -f 1 -d ' ' \ |
|
469 |
| $SED "s|$OTHER_UNZIPDIR/||g") |
|
14111 | 470 |
else |
471 |
DIFFING_FILES=$($GREP -e "differ$" $CONTENTS_DIFF_FILE \ |
|
472 |
| $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g") |
|
473 |
fi |
|
474 |
||
475 |
$RM -f $WORK_DIR/$ZIP_FILE.diffs |
|
476 |
for file in $DIFFING_FILES; do |
|
28356 | 477 |
if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then |
14111 | 478 |
diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs |
28356 | 479 |
fi |
14111 | 480 |
done |
481 |
||
482 |
if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then |
|
483 |
return_value=1 |
|
484 |
echo " Differing files in $ZIP_FILE" |
|
29157 | 485 |
$CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP 'differ$' | cut -f 2 -d ' ' | \ |
14111 | 486 |
$SED "s|$OTHER_UNZIPDIR| |g" > $WORK_DIR/$ZIP_FILE.difflist |
487 |
$CAT $WORK_DIR/$ZIP_FILE.difflist |
|
488 |
||
489 |
if [ -n "$SHOW_DIFFS" ]; then |
|
490 |
for i in $(cat $WORK_DIR/$ZIP_FILE.difflist) ; do |
|
491 |
if [ -f "${OTHER_UNZIPDIR}/$i.javap" ]; then |
|
20049 | 492 |
LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap |
14111 | 493 |
elif [ -f "${OTHER_UNZIPDIR}/$i.cleaned" ]; then |
20049 | 494 |
LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i |
14111 | 495 |
else |
20049 | 496 |
LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i |
14111 | 497 |
fi |
498 |
done |
|
499 |
fi |
|
500 |
fi |
|
501 |
||
502 |
return $return_value |
|
503 |
} |
|
504 |
||
505 |
||
29157 | 506 |
################################################################################ |
14111 | 507 |
# Compare all zip files |
508 |
||
509 |
compare_all_zip_files() { |
|
510 |
THIS_DIR=$1 |
|
511 |
OTHER_DIR=$2 |
|
512 |
WORK_DIR=$3 |
|
513 |
||
514 |
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" | $SORT | $FILTER ) |
|
515 |
||
516 |
if [ -n "$ZIPS" ]; then |
|
517 |
echo Zip files... |
|
518 |
||
519 |
return_value=0 |
|
520 |
for f in $ZIPS; do |
|
521 |
if [ -f "$OTHER_DIR/$f" ]; then |
|
522 |
compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f |
|
523 |
if [ "$?" != "0" ]; then |
|
524 |
return_value=1 |
|
525 |
REGRESSIONS=true |
|
526 |
fi |
|
527 |
fi |
|
528 |
done |
|
529 |
fi |
|
530 |
||
531 |
return $return_value |
|
532 |
} |
|
533 |
||
29157 | 534 |
################################################################################ |
14111 | 535 |
# Compare all jar files |
536 |
||
537 |
compare_all_jar_files() { |
|
538 |
THIS_DIR=$1 |
|
539 |
OTHER_DIR=$2 |
|
540 |
WORK_DIR=$3 |
|
541 |
||
542 |
# TODO filter? |
|
25854 | 543 |
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" -o -name "*.war" \ |
27560 | 544 |
-o -name "*.jimage" | $SORT | $FILTER) |
14111 | 545 |
|
546 |
if [ -n "$ZIPS" ]; then |
|
547 |
echo Jar files... |
|
548 |
||
549 |
return_value=0 |
|
550 |
for f in $ZIPS; do |
|
551 |
if [ -f "$OTHER_DIR/$f" ]; then |
|
552 |
compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f |
|
553 |
if [ "$?" != "0" ]; then |
|
554 |
return_value=1 |
|
555 |
REGRESSIONS=true |
|
556 |
fi |
|
557 |
fi |
|
558 |
done |
|
559 |
fi |
|
560 |
||
561 |
return $return_value |
|
562 |
} |
|
563 |
||
29157 | 564 |
################################################################################ |
14111 | 565 |
# Compare binary (executable/library) file |
566 |
||
567 |
compare_bin_file() { |
|
568 |
THIS_DIR=$1 |
|
569 |
OTHER_DIR=$2 |
|
570 |
WORK_DIR=$3 |
|
571 |
BIN_FILE=$4 |
|
25854 | 572 |
OTHER_BIN_FILE=$5 |
14111 | 573 |
|
574 |
THIS_FILE=$THIS_DIR/$BIN_FILE |
|
25854 | 575 |
if [ -n "$OTHER_BIN_FILE" ]; then |
576 |
OTHER_FILE=$OTHER_DIR/$OTHER_BIN_FILE |
|
577 |
else |
|
578 |
OTHER_FILE=$OTHER_DIR/$BIN_FILE |
|
579 |
fi |
|
14111 | 580 |
NAME=$(basename $BIN_FILE) |
581 |
WORK_FILE_BASE=$WORK_DIR/$BIN_FILE |
|
582 |
FILE_WORK_DIR=$(dirname $WORK_FILE_BASE) |
|
583 |
||
584 |
$MKDIR -p $FILE_WORK_DIR |
|
585 |
||
28356 | 586 |
# Make soft links to original files from work dir to facilitate debugging |
587 |
$LN -f -s $THIS_FILE $WORK_FILE_BASE.this |
|
588 |
$LN -f -s $OTHER_FILE $WORK_FILE_BASE.other |
|
589 |
||
14111 | 590 |
ORIG_THIS_FILE="$THIS_FILE" |
591 |
ORIG_OTHER_FILE="$OTHER_FILE" |
|
592 |
||
593 |
if [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then |
|
594 |
THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME |
|
595 |
OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME |
|
596 |
$MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other |
|
597 |
$CP $THIS_FILE $THIS_STRIPPED_FILE |
|
598 |
$CP $OTHER_FILE $OTHER_STRIPPED_FILE |
|
599 |
$STRIP $THIS_STRIPPED_FILE |
|
600 |
$STRIP $OTHER_STRIPPED_FILE |
|
601 |
THIS_FILE="$THIS_STRIPPED_FILE" |
|
602 |
OTHER_FILE="$OTHER_STRIPPED_FILE" |
|
603 |
fi |
|
604 |
||
605 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
28356 | 606 |
unset _NT_SYMBOL_PATH |
607 |
# On windows we need to unzip the debug symbols, if present |
|
608 |
OTHER_FILE_BASE=${OTHER_FILE/.dll/} |
|
609 |
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/} |
|
610 |
OTHER_FILE_BASE=${OTHER_FILE_BASE/.cpl/} |
|
611 |
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz |
|
14111 | 612 |
# java.exe and java.dll diz files will have the same name. Have to |
28356 | 613 |
# make sure java.exe gets the right one. This is only needed for |
614 |
# OTHER since in the new build, all pdb files are left around. |
|
615 |
if [ "$NAME" = "java.exe" ] && [ -f "$OTHER/tmp/java/java/obj64/java.diz" ]; then |
|
616 |
OTHER_DIZ_FILE="$OTHER/tmp/java/java/obj64/java.diz" |
|
617 |
elif [ -f "${OTHER_FILE_BASE}.diz" ]; then |
|
618 |
OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz |
|
619 |
else |
|
14111 | 620 |
# Some files, jli.dll, appears twice in the image but only one of |
28356 | 621 |
# thme has a diz file next to it. |
622 |
OTHER_DIZ_FILE="$($FIND $OTHER_DIR -name $DIZ_NAME | $SED 1q)" |
|
623 |
if [ ! -f "$OTHER_DIZ_FILE" ]; then |
|
624 |
# As a last resort, look for diz file in the whole build output |
|
625 |
# dir. |
|
626 |
OTHER_DIZ_FILE="$($FIND $OTHER -name $DIZ_NAME | $SED 1q)" |
|
627 |
fi |
|
628 |
fi |
|
629 |
if [ -n "$OTHER_DIZ_FILE" ]; then |
|
630 |
$MKDIR -p $FILE_WORK_DIR/other |
|
631 |
(cd $FILE_WORK_DIR/other ; $UNARCHIVE -o $OTHER_DIZ_FILE) |
|
632 |
export _NT_SYMBOL_PATH="$FILE_WORK_DIR/other" |
|
633 |
fi |
|
634 |
THIS_FILE_BASE=${THIS_FILE/.dll/} |
|
635 |
THIS_FILE_BASE=${THIS_FILE_BASE/.exe/} |
|
636 |
if [ -f "${THIS_FILE/.dll/}.diz" ]; then |
|
637 |
THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz |
|
638 |
else |
|
639 |
THIS_DIZ_FILE="$($FIND $THIS_DIR -name $DIZ_NAME | $SED 1q)" |
|
640 |
if [ ! -f "$THIS_DIZ_FILE" ]; then |
|
641 |
# As a last resort, look for diz file in the whole build output |
|
642 |
# dir. |
|
643 |
THIS_DIZ_FILE="$($FIND $THIS -name $DIZ_NAME | $SED 1q)" |
|
644 |
fi |
|
645 |
fi |
|
646 |
if [ -n "$THIS_DIZ_FILE" ]; then |
|
647 |
$MKDIR -p $FILE_WORK_DIR/this |
|
648 |
(cd $FILE_WORK_DIR/this ; $UNARCHIVE -o $THIS_DIZ_FILE) |
|
649 |
export _NT_SYMBOL_PATH="$_NT_SYMBOL_PATH;$FILE_WORK_DIR/this" |
|
650 |
fi |
|
14111 | 651 |
fi |
652 |
||
653 |
if [ -z "$SKIP_BIN_DIFF" ]; then |
|
654 |
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then |
|
655 |
# The files were bytewise identical. |
|
656 |
if [ -n "$VERBOSE" ]; then |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
657 |
echo " : : : : : : $BIN_FILE" |
14111 | 658 |
fi |
659 |
return 0 |
|
660 |
fi |
|
661 |
BIN_MSG=" diff " |
|
662 |
if [[ "$ACCEPTED_BIN_DIFF" != *"$BIN_FILE"* ]]; then |
|
663 |
DIFF_BIN=true |
|
664 |
if [[ "$KNOWN_BIN_DIFF" != *"$BIN_FILE"* ]]; then |
|
665 |
BIN_MSG="*$BIN_MSG*" |
|
666 |
REGRESSIONS=true |
|
667 |
else |
|
668 |
BIN_MSG=" $BIN_MSG " |
|
669 |
fi |
|
670 |
else |
|
671 |
BIN_MSG="($BIN_MSG)" |
|
672 |
DIFF_BIN= |
|
673 |
fi |
|
674 |
fi |
|
675 |
||
676 |
if [ -n "$STAT" ]; then |
|
677 |
THIS_SIZE=$($STAT $STAT_PRINT_SIZE "$THIS_FILE") |
|
678 |
OTHER_SIZE=$($STAT $STAT_PRINT_SIZE "$OTHER_FILE") |
|
679 |
else |
|
680 |
THIS_SIZE=$(ls -l "$THIS_FILE" | awk '{ print $5 }') |
|
681 |
OTHER_SIZE=$(ls -l "$OTHER_FILE" | awk '{ print $5 }') |
|
682 |
fi |
|
683 |
if [ $THIS_SIZE -ne $OTHER_SIZE ]; then |
|
684 |
DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE) |
|
685 |
DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE) |
|
686 |
SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM) |
|
14458 | 687 |
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] \ |
28356 | 688 |
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then |
14111 | 689 |
SIZE_MSG="($SIZE_MSG)" |
690 |
DIFF_SIZE= |
|
14458 | 691 |
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \ |
28356 | 692 |
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \ |
693 |
&& [ "$DIFF_SIZE_NUM" = 512 ]; then |
|
694 |
# On windows, size of binaries increase in 512 increments. |
|
14458 | 695 |
SIZE_MSG="($SIZE_MSG)" |
696 |
DIFF_SIZE= |
|
697 |
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \ |
|
28356 | 698 |
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \ |
699 |
&& [ "$DIFF_SIZE_NUM" = -512 ]; then |
|
700 |
# On windows, size of binaries increase in 512 increments. |
|
14111 | 701 |
SIZE_MSG="($SIZE_MSG)" |
702 |
DIFF_SIZE= |
|
703 |
else |
|
704 |
if [[ "$ACCEPTED_SIZE_DIFF" != *"$BIN_FILE"* ]]; then |
|
705 |
DIFF_SIZE=true |
|
706 |
if [[ "$KNOWN_SIZE_DIFF" != *"$BIN_FILE"* ]]; then |
|
707 |
SIZE_MSG="*$SIZE_MSG*" |
|
708 |
REGRESSIONS=true |
|
709 |
else |
|
710 |
SIZE_MSG=" $SIZE_MSG " |
|
711 |
fi |
|
712 |
else |
|
713 |
SIZE_MSG="($SIZE_MSG)" |
|
714 |
DIFF_SIZE= |
|
715 |
fi |
|
716 |
fi |
|
717 |
else |
|
718 |
SIZE_MSG=" " |
|
719 |
DIFF_SIZE= |
|
720 |
if [[ "$KNOWN_SIZE_DIFF $ACCEPTED_SIZE_DIFF" = *"$BIN_FILE"* ]]; then |
|
721 |
SIZE_MSG=" ! " |
|
722 |
fi |
|
723 |
fi |
|
724 |
||
725 |
if [[ "$SORT_SYMBOLS" = *"$BIN_FILE"* ]]; then |
|
726 |
SYM_SORT_CMD="sort" |
|
727 |
else |
|
728 |
SYM_SORT_CMD="cat" |
|
729 |
fi |
|
730 |
||
731 |
# Check symbols |
|
732 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
733 |
# The output from dumpbin on windows differs depending on if the debug symbol |
|
734 |
# files are still around at the location the binary is pointing too. Need |
|
28356 | 735 |
# to filter out that extra information. |
736 |
$DUMPBIN -exports $OTHER_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other |
|
737 |
$DUMPBIN -exports $THIS_FILE | $GREP -E '^ +[0-9A-F]+ +[0-9A-F]+ [0-9A-F]+' | sed 's/ = .*//g' | cut -c27- | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this |
|
14111 | 738 |
elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then |
739 |
# Some symbols get seemingly random 15 character prefixes. Filter them out. |
|
740 |
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other |
|
28356 | 741 |
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SED 's/^\([a-zA-Z] [\.\$]\)[a-zA-Z0-9_\$]\{15,15\}\./\1./g' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this |
14111 | 742 |
else |
28356 | 743 |
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other |
744 |
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this |
|
14111 | 745 |
fi |
28356 | 746 |
|
20049 | 747 |
LC_ALL=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff |
14111 | 748 |
if [ -s $WORK_FILE_BASE.symbols.diff ]; then |
749 |
SYM_MSG=" diff " |
|
750 |
if [[ "$ACCEPTED_SYM_DIFF" != *"$BIN_FILE"* ]]; then |
|
751 |
DIFF_SYM=true |
|
752 |
if [[ "$KNOWN_SYM_DIFF" != *"$BIN_FILE"* ]]; then |
|
753 |
SYM_MSG="*$SYM_MSG*" |
|
754 |
REGRESSIONS=true |
|
755 |
else |
|
756 |
SYM_MSG=" $SYM_MSG " |
|
757 |
fi |
|
758 |
else |
|
28356 | 759 |
SYM_MSG="($SYM_MSG)" |
14111 | 760 |
DIFF_SYM= |
761 |
fi |
|
762 |
else |
|
763 |
SYM_MSG=" " |
|
764 |
DIFF_SYM= |
|
765 |
if [[ "$KNOWN_SYM_DIFF $ACCEPTED_SYM_DIFF" = *"$BIN_FILE"* ]]; then |
|
766 |
SYM_MSG=" ! " |
|
767 |
fi |
|
768 |
fi |
|
769 |
||
770 |
# Check dependencies |
|
771 |
if [ -n "$LDD_CMD" ]; then |
|
28356 | 772 |
(cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME 2>/dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq) |
773 |
(cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME 2</dev/null | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq) |
|
774 |
(cd $FILE_WORK_DIR && $RM -f $NAME) |
|
775 |
||
776 |
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff |
|
777 |
LC_ALL=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq |
|
778 |
||
779 |
if [ -s $WORK_FILE_BASE.deps.diff ]; then |
|
14111 | 780 |
if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then |
28356 | 781 |
DEP_MSG=" diff " |
14111 | 782 |
else |
28356 | 783 |
DEP_MSG=" redun " |
14111 | 784 |
fi |
785 |
if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then |
|
28356 | 786 |
DIFF_DEP=true |
787 |
if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then |
|
14111 | 788 |
DEP_MSG="*$DEP_MSG*" |
789 |
REGRESSIONS=true |
|
28356 | 790 |
else |
14111 | 791 |
DEP_MSG=" $DEP_MSG " |
28356 | 792 |
fi |
14111 | 793 |
else |
28356 | 794 |
DEP_MSG="($DEP_MSG)" |
795 |
DIFF_DEP= |
|
14111 | 796 |
fi |
28356 | 797 |
else |
798 |
DEP_MSG=" " |
|
799 |
DIFF_DEP= |
|
14111 | 800 |
if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then |
801 |
DEP_MSG=" ! " |
|
802 |
fi |
|
28356 | 803 |
fi |
14111 | 804 |
else |
28356 | 805 |
DEP_MSG=" - " |
14111 | 806 |
fi |
28356 | 807 |
|
14111 | 808 |
# Compare fulldump output |
809 |
if [ -n "$FULLDUMP_CMD" ] && [ -z "$SKIP_FULLDUMP_DIFF" ]; then |
|
29157 | 810 |
if [ -z "$FULLDUMP_DIFF_FILTER" ]; then |
811 |
FULLDUMP_DIFF_FILTER="$CAT" |
|
812 |
fi |
|
813 |
$FULLDUMP_CMD $OTHER_FILE | eval "$FULLDUMP_DIFF_FILTER" > $WORK_FILE_BASE.fulldump.other 2>&1 |
|
814 |
$FULLDUMP_CMD $THIS_FILE | eval "$FULLDUMP_DIFF_FILTER" > $WORK_FILE_BASE.fulldump.this 2>&1 |
|
815 |
||
20049 | 816 |
LC_ALL=C $DIFF $WORK_FILE_BASE.fulldump.other $WORK_FILE_BASE.fulldump.this > $WORK_FILE_BASE.fulldump.diff |
28356 | 817 |
|
14111 | 818 |
if [ -s $WORK_FILE_BASE.fulldump.diff ]; then |
819 |
ELF_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.fulldump.diff | awk '{print $5}') |
|
820 |
ELF_MSG=$($PRINTF "%8d" $ELF_DIFF_SIZE) |
|
821 |
if [[ "$ACCEPTED_ELF_DIFF" != *"$BIN_FILE"* ]]; then |
|
822 |
DIFF_ELF=true |
|
823 |
if [[ "$KNOWN_ELF_DIFF" != *"$BIN_FILE"* ]]; then |
|
824 |
ELF_MSG="*$ELF_MSG*" |
|
825 |
REGRESSIONS=true |
|
826 |
else |
|
827 |
ELF_MSG=" $ELF_MSG " |
|
828 |
fi |
|
829 |
else |
|
830 |
ELF_MSG="($ELF_MSG)" |
|
831 |
DIFF_ELF= |
|
832 |
fi |
|
833 |
else |
|
834 |
ELF_MSG=" " |
|
835 |
DIFF_ELF= |
|
836 |
if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then |
|
837 |
ELF_MSG=" ! " |
|
838 |
fi |
|
839 |
fi |
|
840 |
fi |
|
841 |
||
842 |
# Compare disassemble output |
|
843 |
if [ -n "$DIS_CMD" ] && [ -z "$SKIP_DIS_DIFF" ]; then |
|
28356 | 844 |
# By default we filter out differences that include references to symbols. |
845 |
# To get a raw diff with the complete disassembly, set |
|
846 |
# DIS_DIFF_FILTER="$CAT" |
|
847 |
if [ -z "$DIS_DIFF_FILTER" ]; then |
|
848 |
DIS_DIFF_FILTER="$GREP -v ' # .* <.*>$'" |
|
849 |
fi |
|
850 |
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.other 2>&1 |
|
851 |
$DIS_CMD $THIS_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1 |
|
852 |
||
20049 | 853 |
LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff |
28356 | 854 |
|
14111 | 855 |
if [ -s $WORK_FILE_BASE.dis.diff ]; then |
856 |
DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}') |
|
857 |
DIS_MSG=$($PRINTF "%8d" $DIS_DIFF_SIZE) |
|
858 |
if [[ "$ACCEPTED_DIS_DIFF" != *"$BIN_FILE"* ]]; then |
|
859 |
DIFF_DIS=true |
|
860 |
if [[ "$KNOWN_DIS_DIFF" != *"$BIN_FILE"* ]]; then |
|
861 |
DIS_MSG="*$DIS_MSG*" |
|
862 |
REGRESSIONS=true |
|
863 |
else |
|
864 |
DIS_MSG=" $DIS_MSG " |
|
865 |
fi |
|
866 |
else |
|
867 |
DIS_MSG="($DIS_MSG)" |
|
868 |
DIFF_DIS= |
|
869 |
fi |
|
870 |
else |
|
871 |
DIS_MSG=" " |
|
872 |
DIFF_DIS= |
|
873 |
if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then |
|
874 |
DIS_MSG=" ! " |
|
875 |
fi |
|
876 |
fi |
|
877 |
fi |
|
878 |
||
879 |
||
880 |
if [ -n "$DIFF_BIN$DIFF_SIZE$DIFF_SYM$DIFF_DEP$DIFF_ELF$DIFF_DIS" ] || [ -n "$VERBOSE" ]; then |
|
881 |
if [ -n "$BIN_MSG" ]; then echo -n "$BIN_MSG:"; fi |
|
882 |
if [ -n "$SIZE_MSG" ]; then echo -n "$SIZE_MSG:"; fi |
|
883 |
if [ -n "$SYM_MSG" ]; then echo -n "$SYM_MSG:"; fi |
|
884 |
if [ -n "$DEP_MSG" ]; then echo -n "$DEP_MSG:"; fi |
|
885 |
if [ -n "$ELF_MSG" ]; then echo -n "$ELF_MSG:"; fi |
|
886 |
if [ -n "$DIS_MSG" ]; then echo -n "$DIS_MSG:"; fi |
|
887 |
echo " $BIN_FILE" |
|
888 |
if [ "$SHOW_DIFFS" = "true" ]; then |
|
889 |
if [ -s "$WORK_FILE_BASE.symbols.diff" ]; then |
|
890 |
echo "Symbols diff:" |
|
891 |
$CAT $WORK_FILE_BASE.symbols.diff |
|
892 |
fi |
|
893 |
if [ -s "$WORK_FILE_BASE.deps.diff" ]; then |
|
894 |
echo "Deps diff:" |
|
895 |
$CAT $WORK_FILE_BASE.deps.diff |
|
896 |
fi |
|
897 |
if [ -s "$WORK_FILE_BASE.fulldump.diff" ]; then |
|
898 |
echo "Fulldump diff:" |
|
899 |
$CAT $WORK_FILE_BASE.fulldump.diff |
|
900 |
fi |
|
901 |
if [ -s "$WORK_FILE_BASE.dis.diff" ]; then |
|
902 |
echo "Disassembly diff:" |
|
903 |
$CAT $WORK_FILE_BASE.dis.diff |
|
904 |
fi |
|
905 |
fi |
|
906 |
return 1 |
|
907 |
fi |
|
908 |
return 0 |
|
909 |
} |
|
910 |
||
29157 | 911 |
################################################################################ |
14111 | 912 |
# Print binary diff header |
913 |
||
914 |
print_binary_diff_header() { |
|
915 |
if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi |
|
916 |
if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n " Size :"; fi |
|
917 |
if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi |
|
918 |
if [ -z "$SKIP_DEP_DIFF" ]; then echo -n " Deps :"; fi |
|
919 |
if [ -z "$SKIP_FULLDUMP_DIFF" ]; then echo -n " Fulldump :"; fi |
|
920 |
if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass :"; fi |
|
921 |
echo |
|
922 |
} |
|
923 |
||
29157 | 924 |
################################################################################ |
14111 | 925 |
# Compare all libraries |
926 |
||
927 |
compare_all_libs() { |
|
928 |
THIS_DIR=$1 |
|
929 |
OTHER_DIR=$2 |
|
930 |
WORK_DIR=$3 |
|
931 |
||
28356 | 932 |
LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \ |
933 |
-o -name '*.dll' -o -name '*.obj' -o -name '*.o' \ |
|
934 |
-o -name '*.cpl' \) | $SORT | $FILTER) |
|
14111 | 935 |
|
936 |
if [ -n "$LIBS" ]; then |
|
937 |
echo Libraries... |
|
938 |
print_binary_diff_header |
|
939 |
for l in $LIBS; do |
|
940 |
if [ -f "$OTHER_DIR/$l" ]; then |
|
941 |
compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l |
|
942 |
if [ "$?" != "0" ]; then |
|
943 |
return_value=1 |
|
944 |
fi |
|
945 |
fi |
|
946 |
done |
|
947 |
fi |
|
948 |
||
949 |
return $return_value |
|
950 |
} |
|
951 |
||
29157 | 952 |
################################################################################ |
14111 | 953 |
# Compare all executables |
954 |
||
955 |
compare_all_execs() { |
|
956 |
THIS_DIR=$1 |
|
957 |
OTHER_DIR=$2 |
|
958 |
WORK_DIR=$3 |
|
959 |
||
960 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
961 |
EXECS=$(cd $THIS_DIR && $FIND . -type f -name '*.exe' | $SORT | $FILTER) |
|
962 |
else |
|
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
963 |
EXECS=$(cd $THIS_DIR && $FIND . -name db -prune -o -type f -perm -100 \! \ |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
964 |
\( -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.cgi' \ |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
965 |
-o -name '*.jar' -o -name '*.diz' -o -name 'jcontrol' -o -name '*.properties' \ |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
966 |
-o -name '*.data' -o -name '*.bfc' -o -name '*.src' -o -name '*.txt' \ |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
967 |
-o -name '*.cfg' -o -name 'meta-index' -o -name '*.properties.ja' \ |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
968 |
-o -name 'classlist' \) | $SORT | $FILTER) |
14111 | 969 |
fi |
970 |
||
971 |
if [ -n "$EXECS" ]; then |
|
972 |
echo Executables... |
|
973 |
print_binary_diff_header |
|
974 |
for e in $EXECS; do |
|
975 |
if [ -f "$OTHER_DIR/$e" ]; then |
|
976 |
compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $e |
|
977 |
if [ "$?" != "0" ]; then |
|
978 |
return_value=1 |
|
979 |
fi |
|
980 |
fi |
|
981 |
done |
|
982 |
fi |
|
983 |
||
984 |
return $return_value |
|
985 |
} |
|
986 |
||
29157 | 987 |
################################################################################ |
14111 | 988 |
# Initiate configuration |
989 |
||
990 |
COMPARE_ROOT=/tmp/cimages.$USER |
|
991 |
$MKDIR -p $COMPARE_ROOT |
|
992 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
993 |
if [ "$(uname -o)" = "Cygwin" ]; then |
|
28356 | 994 |
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT) |
14111 | 995 |
fi |
996 |
fi |
|
997 |
||
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
998 |
THIS="$( cd "$( dirname "$0" )" > /dev/null && pwd )" |
14111 | 999 |
echo "$THIS" |
1000 |
THIS_SCRIPT="$0" |
|
1001 |
||
1002 |
if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1" = "/?" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then |
|
1003 |
echo "bash ./compare.sh [OPTIONS] [FILTER]" |
|
1004 |
echo "" |
|
1005 |
echo "-all Compare all files in all known ways" |
|
1006 |
echo "-names Compare the file names and directory structure" |
|
1007 |
echo "-perms Compare the permission bits on all files and directories" |
|
1008 |
echo "-types Compare the output of the file command on all files" |
|
1009 |
echo "-general Compare the files not convered by the specialized comparisons" |
|
1010 |
echo "-zips Compare the contents of all zip files" |
|
1011 |
echo "-jars Compare the contents of all jar files" |
|
1012 |
echo "-libs Compare all native libraries" |
|
1013 |
echo "-execs Compare all executables" |
|
1014 |
echo "-v Verbose output, does not hide known differences" |
|
1015 |
echo "-vv More verbose output, shows diff output of all comparisons" |
|
1016 |
echo "-o [OTHER] Compare with build in other directory. Will default to the old build directory" |
|
1017 |
echo "" |
|
1018 |
echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" |
|
1019 |
echo "Example:" |
|
1020 |
echo "bash ./common/bin/compareimages.sh CodePointIM.jar" |
|
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1021 |
echo "" |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1022 |
echo "-2zips <file1> <file2> Compare two zip files only" |
25854 | 1023 |
echo "-2bins <file1> <file2> Compare two binary files only" |
1024 |
echo "-2dirs <dir1> <dir2> Compare two directories as if they were images" |
|
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1025 |
echo "" |
14111 | 1026 |
exit 10 |
1027 |
fi |
|
1028 |
||
1029 |
CMP_NAMES=false |
|
1030 |
CMP_PERMS=false |
|
1031 |
CMP_TYPES=false |
|
1032 |
CMP_GENERAL=false |
|
1033 |
CMP_ZIPS=false |
|
1034 |
CMP_JARS=false |
|
1035 |
CMP_LIBS=false |
|
1036 |
CMP_EXECS=false |
|
1037 |
||
1038 |
while [ -n "$1" ]; do |
|
1039 |
case "$1" in |
|
1040 |
-v) |
|
1041 |
VERBOSE=true |
|
1042 |
;; |
|
1043 |
-vv) |
|
1044 |
VERBOSE=true |
|
1045 |
SHOW_DIFFS=true |
|
1046 |
;; |
|
1047 |
-o) |
|
1048 |
OTHER="$2" |
|
1049 |
shift |
|
1050 |
;; |
|
1051 |
-all) |
|
1052 |
CMP_NAMES=true |
|
1053 |
if [ "$OPENJDK_TARGET_OS" != "windows" ]; then |
|
1054 |
CMP_PERMS=true |
|
1055 |
fi |
|
1056 |
CMP_TYPES=true |
|
1057 |
CMP_GENERAL=true |
|
1058 |
CMP_ZIPS=true |
|
1059 |
CMP_JARS=true |
|
1060 |
CMP_LIBS=true |
|
1061 |
CMP_EXECS=true |
|
1062 |
;; |
|
1063 |
-names) |
|
1064 |
CMP_NAMES=true |
|
1065 |
;; |
|
1066 |
-perms) |
|
1067 |
CMP_PERMS=true |
|
1068 |
;; |
|
1069 |
-types) |
|
1070 |
CMP_TYPES=true |
|
1071 |
;; |
|
1072 |
-general) |
|
1073 |
CMP_GENERAL=true |
|
1074 |
;; |
|
1075 |
-zips) |
|
1076 |
CMP_ZIPS=true |
|
1077 |
;; |
|
1078 |
-jars) |
|
1079 |
CMP_JARS=true |
|
1080 |
;; |
|
1081 |
-libs) |
|
1082 |
CMP_LIBS=true |
|
1083 |
;; |
|
1084 |
-execs) |
|
1085 |
CMP_EXECS=true |
|
1086 |
;; |
|
25854 | 1087 |
-2dirs) |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1088 |
THIS="$(cd "$2" > /dev/null && pwd )" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1089 |
OTHER="$(cd "$3" > /dev/null && pwd )" |
25854 | 1090 |
THIS_BASE_DIR="$THIS" |
1091 |
OTHER_BASE_DIR="$OTHER" |
|
1092 |
SKIP_DEFAULT=true |
|
1093 |
shift |
|
1094 |
shift |
|
1095 |
;; |
|
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1096 |
-2zips) |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1097 |
CMP_2_ZIPS=true |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1098 |
THIS_FILE=$2 |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1099 |
OTHER_FILE=$3 |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1100 |
shift |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1101 |
shift |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1102 |
;; |
25854 | 1103 |
-2bins) |
1104 |
CMP_2_BINS=true |
|
1105 |
THIS_FILE=$2 |
|
1106 |
OTHER_FILE=$3 |
|
1107 |
shift |
|
1108 |
shift |
|
1109 |
;; |
|
14111 | 1110 |
*) |
1111 |
CMP_NAMES=false |
|
1112 |
CMP_PERMS=false |
|
1113 |
CMP_TYPES=false |
|
1114 |
CMP_ZIPS=true |
|
1115 |
CMP_JARS=true |
|
1116 |
CMP_LIBS=true |
|
1117 |
CMP_EXECS=true |
|
28356 | 1118 |
|
14111 | 1119 |
if [ -z "$FILTER" ]; then |
1120 |
FILTER="$GREP" |
|
1121 |
fi |
|
1122 |
FILTER="$FILTER -e $1" |
|
1123 |
;; |
|
1124 |
esac |
|
1125 |
shift |
|
1126 |
done |
|
1127 |
||
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1128 |
if [ "$CMP_2_ZIPS" = "true" ]; then |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1129 |
THIS_DIR="$(dirname $THIS_FILE)" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1130 |
THIS_DIR="$(cd "$THIS_DIR" > /dev/null && pwd )" |
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1131 |
OTHER_DIR="$(dirname $OTHER_FILE)" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1132 |
OTHER_DIR="$(cd "$OTHER_DIR" > /dev/null && pwd )" |
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1133 |
THIS_FILE_NAME="$(basename $THIS_FILE)" |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1134 |
OTHER_FILE_NAME="$(basename $OTHER_FILE)" |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1135 |
echo Comparing $THIS_DIR/$THIS_FILE_NAME and $OTHER_DIR/$OTHER_FILE_NAME |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1136 |
compare_zip_file $THIS_DIR $OTHER_DIR $COMPARE_ROOT/2zips $THIS_FILE_NAME $OTHER_FILE_NAME |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1137 |
exit |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1138 |
fi |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1139 |
|
25854 | 1140 |
if [ "$CMP_2_BINS" = "true" ]; then |
1141 |
THIS_DIR="$(dirname $THIS_FILE)" |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1142 |
THIS_DIR="$(cd "$THIS_DIR" > /dev/null && pwd )" |
25854 | 1143 |
OTHER_DIR="$(dirname $OTHER_FILE)" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1144 |
OTHER_DIR="$(cd "$OTHER_DIR" > /dev/null && pwd )" |
25854 | 1145 |
THIS_FILE_NAME="$(basename $THIS_FILE)" |
1146 |
OTHER_FILE_NAME="$(basename $OTHER_FILE)" |
|
1147 |
echo Comparing $THIS_DIR/$THIS_FILE_NAME and $OTHER_DIR/$OTHER_FILE_NAME |
|
1148 |
compare_bin_file $THIS_DIR $OTHER_DIR $COMPARE_ROOT/2bins $THIS_FILE_NAME $OTHER_FILE_NAME |
|
1149 |
exit |
|
1150 |
fi |
|
1151 |
||
14111 | 1152 |
if [ "$CMP_NAMES" = "false" ] && [ "$CMP_TYPES" = "false" ] && [ "$CMP_PERMS" = "false" ] && [ "$CMP_GENERAL" = "false" ] && [ "$CMP_ZIPS" = "false" ] && [ "$CMP_JARS" = "false" ] && [ "$CMP_LIBS" = "false" ] && [ "$CMP_EXECS" = "false" ]; then |
1153 |
CMP_NAMES=true |
|
1154 |
CMP_PERMS=true |
|
1155 |
CMP_TYPES=true |
|
1156 |
CMP_GENERAL=true |
|
1157 |
CMP_ZIPS=true |
|
1158 |
CMP_JARS=true |
|
1159 |
CMP_LIBS=true |
|
1160 |
CMP_EXECS=true |
|
1161 |
fi |
|
1162 |
||
1163 |
if [ -z "$FILTER" ]; then |
|
1164 |
FILTER="$CAT" |
|
1165 |
fi |
|
1166 |
||
25854 | 1167 |
if [ "$SKIP_DEFAULT" != "true" ]; then |
1168 |
if [ -z "$OTHER" ]; then |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1169 |
echo "Nothing to compare to, set with -o" |
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1170 |
exit 1 |
25854 | 1171 |
else |
1172 |
if [ ! -d "$OTHER" ]; then |
|
1173 |
echo "Other build directory does not exist:" |
|
1174 |
echo "$OTHER" |
|
1175 |
exit 1 |
|
1176 |
fi |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1177 |
OTHER="$( cd "$OTHER" > /dev/null && pwd )" |
25854 | 1178 |
echo "Comparing to:" |
14111 | 1179 |
echo "$OTHER" |
25854 | 1180 |
echo |
14111 | 1181 |
fi |
1182 |
||
1183 |
||
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1184 |
# Find the common images to compare, prioritizing later build stages |
27560 | 1185 |
if [ -d "$THIS/install/jdk" ] && [ -d "$OTHER/install/jdk" ]; then |
29157 | 1186 |
THIS_JDK="$THIS/install/jdk" |
1187 |
THIS_JRE="$THIS/install/jre" |
|
1188 |
OTHER_JDK="$OTHER/install/jdk" |
|
1189 |
OTHER_JRE="$OTHER/install/jre" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1190 |
echo "Selecting install images for compare" |
29157 | 1191 |
elif [ -d "$THIS/deploy/jdk" -o -d "$THIS/deploy/images/jdk" ] \ |
1192 |
&& [ -d "$OTHER/deploy/jdk" -o -d "$OTHER/deploy/images/jdk" ]; then |
|
1193 |
if [ -d "$THIS/deploy/images/jdk" ]; then |
|
1194 |
THIS_JDK="$THIS/deploy/images/jdk" |
|
1195 |
THIS_JRE="$THIS/deploy/images/jre" |
|
1196 |
else |
|
1197 |
THIS_JDK="$THIS/deploy/jdk" |
|
1198 |
THIS_JRE="$THIS/deploy/jre" |
|
1199 |
fi |
|
1200 |
if [ -d "$OTHER/deploy/images/jdk" ]; then |
|
1201 |
OTHER_JDK="$OTHER/deploy/images/jdk" |
|
1202 |
OTHER_JRE="$OTHER/deploy/images/jre" |
|
1203 |
else |
|
1204 |
OTHER_JDK="$OTHER/deploy/jdk" |
|
1205 |
OTHER_JRE="$OTHER/deploy/jre" |
|
1206 |
fi |
|
1207 |
echo "Selecting deploy images for compare" |
|
1208 |
elif [ -d "$THIS/deploy/images/jdk" ] && [ -d "$OTHER/deploy/jdk" ]; then |
|
1209 |
THIS_JDK="$THIS/deploy/jdk" |
|
1210 |
THIS_JRE="$THIS/deploy/jre" |
|
1211 |
OTHER_JDK="$OTHER/deploy/jdk" |
|
1212 |
OTHER_JRE="$OTHER/deploy/jre" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1213 |
echo "Selecting deploy images for compare" |
27560 | 1214 |
elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then |
29157 | 1215 |
THIS_JDK="$THIS/images/jdk" |
1216 |
THIS_JRE="$THIS/images/jre" |
|
1217 |
OTHER_JDK="$OTHER/images/jdk" |
|
1218 |
OTHER_JRE="$OTHER/images/jre" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1219 |
echo "Selecting jdk images for compare" |
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1220 |
else |
28356 | 1221 |
echo "No common images found." |
1222 |
exit 1 |
|
14111 | 1223 |
fi |
1224 |
||
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1225 |
if [ -d "$THIS/deploy/jdk-bundle" -o -d "$THIS/deploy/images/jdk-bundle" ] \ |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1226 |
&& [ -d "$OTHER/deploy/jdk-bundle" -o -d "$OTHER/deploy/images/jdk-bundle" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1227 |
if [ -d "$THIS/deploy/images/jdk-bundle" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1228 |
THIS_JDK_BUNDLE="$THIS/deploy/images/jdk-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1229 |
THIS_JRE_BUNDLE="$THIS/deploy/images/jre-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1230 |
else |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1231 |
THIS_JDK_BUNDLE="$THIS/deploy/jdk-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1232 |
THIS_JRE_BUNDLE="$THIS/deploy/jre-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1233 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1234 |
if [ -d "$OTHER/deploy/images/jdk-bundle" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1235 |
OTHER_JDK_BUNDLE="$OTHER/deploy/images/jdk-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1236 |
OTHER_JRE_BUNDLE="$OTHER/deploy/images/jre-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1237 |
else |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1238 |
OTHER_JDK_BUNDLE="$OTHER/deploy/jdk-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1239 |
OTHER_JRE_BUNDLE="$OTHER/deploy/jre-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1240 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1241 |
echo "Also comparing deploy macosx bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1242 |
elif [ -d "$THIS/images/jdk-bundle" ] && [ -d "$OTHER/images/jdk-bundle" ]; then |
29157 | 1243 |
THIS_JDK_BUNDLE="$THIS/images/jdk-bundle" |
1244 |
THIS_JRE_BUNDLE="$THIS/images/jre-bundle" |
|
1245 |
OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle" |
|
1246 |
OTHER_JRE_BUNDLE="$OTHER/images/jre-bundle" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1247 |
echo "Also comparing macosx bundles" |
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1248 |
fi |
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1249 |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1250 |
if [ -d "$THIS/deploy/bundles" -o -d "$THIS/deploy/images/bundles" ] \ |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1251 |
&& [ -d "$OTHER/deploy/bundles" -o -d "$OTHER/deploy/images/bundles" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1252 |
if [ -d "$THIS/deploy/images/bundles" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1253 |
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/images/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1254 |
else |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1255 |
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1256 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1257 |
if [ -d "$OTHER/deploy/images/bundles" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1258 |
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/images/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1259 |
else |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1260 |
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1261 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1262 |
echo "Also comparing deploy javadoc bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1263 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1264 |
|
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1265 |
if [ -d "$THIS/deploy/JavaAppletPlugin.plugin" -o -d "$THIS/deploy/images/JavaAppletPlugin.plugin" ] \ |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1266 |
&& [ -d "$OTHER/deploy/JavaAppletPlugin.plugin" -o -d "$OTHER/deploy/images/JavaAppletPlugin.plugin" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1267 |
if [ -d "$THIS/deploy/images/bundles" ]; then |
29157 | 1268 |
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/images/JavaAppletPlugin.plugin" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1269 |
else |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1270 |
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/JavaAppletPlugin.plugin" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1271 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1272 |
if [ -d "$OTHER/deploy/images/bundles" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1273 |
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/images/JavaAppletPlugin.plugin" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1274 |
else |
28356 | 1275 |
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/JavaAppletPlugin.plugin" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1276 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1277 |
echo "Also comparing deploy applet image" |
28356 | 1278 |
fi |
1279 |
||
25854 | 1280 |
if [ -d "$OTHER/images" ]; then |
1281 |
OTHER_SEC_DIR="$OTHER/images" |
|
1282 |
else |
|
1283 |
OTHER_SEC_DIR="$OTHER/tmp" |
|
1284 |
fi |
|
1285 |
OTHER_SEC_BIN="$OTHER_SEC_DIR/sec-bin.zip" |
|
1286 |
THIS_SEC_DIR="$THIS/images" |
|
1287 |
THIS_SEC_BIN="$THIS_SEC_DIR/sec-bin.zip" |
|
1288 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
1289 |
if [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then |
|
1290 |
JGSS_WINDOWS_BIN="jgss-windows-x64-bin.zip" |
|
1291 |
else |
|
1292 |
JGSS_WINDOWS_BIN="jgss-windows-i586-bin.zip" |
|
1293 |
fi |
|
1294 |
OTHER_SEC_WINDOWS_BIN="$OTHER_SEC_DIR/sec-windows-bin.zip" |
|
1295 |
OTHER_JGSS_WINDOWS_BIN="$OTHER_SEC_DIR/$JGSS_WINDOWS_BIN" |
|
1296 |
THIS_SEC_WINDOWS_BIN="$THIS_SEC_DIR/sec-windows-bin.zip" |
|
1297 |
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN" |
|
1298 |
fi |
|
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1299 |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1300 |
if [ -d "$THIS/docs" ] && [ -d "$OTHER/docs" ]; then |
25854 | 1301 |
THIS_DOCS="$THIS/docs" |
1302 |
OTHER_DOCS="$OTHER/docs" |
|
28356 | 1303 |
echo "Also comparing docs" |
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1304 |
else |
25854 | 1305 |
echo "WARNING! Docs haven't been built and won't be compared." |
1306 |
fi |
|
15063
16aa1979a584
8005723: build-infra: in new infra build, sec-windows-bin-zip and jgss-windows-*-bin.zip are missing
erikj
parents:
15062
diff
changeset
|
1307 |
fi |
15062 | 1308 |
|
29157 | 1309 |
################################################################################ |
14111 | 1310 |
# Do the work |
1311 |
||
1312 |
if [ "$CMP_NAMES" = "true" ]; then |
|
29157 | 1313 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1314 |
echo -n "JDK " |
|
1315 |
compare_dirs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
1316 |
echo -n "JRE " |
|
1317 |
compare_dirs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
|
28356 | 1318 |
|
29157 | 1319 |
echo -n "JDK " |
1320 |
compare_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
1321 |
echo -n "JRE " |
|
1322 |
compare_files $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
|
14111 | 1323 |
fi |
29157 | 1324 |
if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then |
1325 |
echo -n "JDK Bundle " |
|
1326 |
compare_dirs $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle |
|
1327 |
echo -n "JRE Bundle " |
|
1328 |
compare_dirs $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
|
28356 | 1329 |
|
29157 | 1330 |
echo -n "JDK Bundle " |
1331 |
compare_files $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle |
|
1332 |
echo -n "JRE Bundle " |
|
1333 |
compare_files $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
|
14111 | 1334 |
fi |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1335 |
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1336 |
echo -n "Docs " |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1337 |
compare_dirs $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1338 |
echo -n "Docs " |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1339 |
compare_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1340 |
fi |
25854 | 1341 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1342 |
compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1343 |
compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1344 |
fi |
|
28356 | 1345 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1346 |
echo -n "JavaAppletPlugin " |
|
1347 |
compare_dirs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1348 |
echo -n "JavaAppletPlugin " |
|
1349 |
compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1350 |
fi |
|
14111 | 1351 |
fi |
1352 |
||
1353 |
if [ "$CMP_PERMS" = "true" ]; then |
|
29157 | 1354 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1355 |
echo -n "JDK " |
|
1356 |
compare_permissions $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
1357 |
echo -n "JRE " |
|
1358 |
compare_permissions $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
|
14111 | 1359 |
fi |
25854 | 1360 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1361 |
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1362 |
fi |
|
28356 | 1363 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1364 |
echo -n "JavaAppletPlugin " |
|
1365 |
compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1366 |
fi |
|
14111 | 1367 |
fi |
1368 |
||
1369 |
if [ "$CMP_TYPES" = "true" ]; then |
|
29157 | 1370 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1371 |
echo -n "JDK " |
|
1372 |
compare_file_types $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
1373 |
echo -n "JRE " |
|
1374 |
compare_file_types $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
|
14111 | 1375 |
fi |
29157 | 1376 |
if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then |
1377 |
echo -n "JDK Bundle " |
|
1378 |
compare_file_types $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle |
|
1379 |
echo -n "JRE Bundle " |
|
1380 |
compare_file_types $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
|
14111 | 1381 |
fi |
25854 | 1382 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1383 |
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1384 |
fi |
|
28356 | 1385 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1386 |
echo -n "JavaAppletPlugin " |
|
1387 |
compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1388 |
fi |
|
14111 | 1389 |
fi |
1390 |
||
1391 |
if [ "$CMP_GENERAL" = "true" ]; then |
|
29157 | 1392 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1393 |
echo -n "JDK " |
|
1394 |
compare_general_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
1395 |
echo -n "JRE " |
|
1396 |
compare_general_files $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
|
14111 | 1397 |
fi |
29157 | 1398 |
if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then |
1399 |
echo -n "JDK Bundle " |
|
1400 |
compare_general_files $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle |
|
1401 |
echo -n "JRE Bundle " |
|
1402 |
compare_general_files $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
|
14111 | 1403 |
fi |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1404 |
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1405 |
echo -n "Docs " |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1406 |
compare_general_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1407 |
fi |
25854 | 1408 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1409 |
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1410 |
fi |
|
28356 | 1411 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1412 |
echo -n "JavaAppletPlugin " |
|
1413 |
compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1414 |
fi |
|
14111 | 1415 |
fi |
1416 |
||
1417 |
if [ "$CMP_ZIPS" = "true" ]; then |
|
29157 | 1418 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1419 |
compare_all_zip_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
14111 | 1420 |
fi |
15062 | 1421 |
if [ -n "$THIS_SEC_BIN" ] && [ -n "$OTHER_SEC_BIN" ]; then |
1422 |
if [ -n "$(echo $THIS_SEC_BIN | $FILTER)" ]; then |
|
1423 |
echo "sec-bin.zip..." |
|
15068
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1424 |
compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin sec-bin.zip |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1425 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1426 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1427 |
if [ -n "$THIS_SEC_WINDOWS_BIN" ] && [ -n "$OTHER_SEC_WINDOWS_BIN" ]; then |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1428 |
if [ -n "$(echo $THIS_SEC_WINDOWS_BIN | $FILTER)" ]; then |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1429 |
echo "sec-windows-bin.zip..." |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1430 |
compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin sec-windows-bin.zip |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1431 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1432 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1433 |
if [ -n "$THIS_JGSS_WINDOWS_BIN" ] && [ -n "$OTHER_JGSS_WINDOWS_BIN" ]; then |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1434 |
if [ -n "$(echo $THIS_JGSS_WINDOWS_BIN | $FILTER)" ]; then |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1435 |
echo "$JGSS_WINDOWS_BIN..." |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1436 |
compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin $JGSS_WINDOWS_BIN |
15062 | 1437 |
fi |
1438 |
fi |
|
25854 | 1439 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1440 |
compare_all_zip_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1441 |
fi |
|
28356 | 1442 |
if [ -n "$THIS_DEPLOY_BUNDLE_DIR" ] && [ -n "$OTHER_DEPLOY_BUNDLE_DIR" ]; then |
1443 |
compare_all_zip_files $THIS_DEPLOY_BUNDLE_DIR $OTHER_DEPLOY_BUNDLE_DIR $COMPARE_ROOT/deploy-bundle |
|
1444 |
fi |
|
1445 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
|
1446 |
compare_all_zip_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1447 |
fi |
|
14111 | 1448 |
fi |
1449 |
||
1450 |
if [ "$CMP_JARS" = "true" ]; then |
|
29157 | 1451 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1452 |
compare_all_jar_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
14111 | 1453 |
fi |
25854 | 1454 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1455 |
compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1456 |
fi |
|
28356 | 1457 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1458 |
compare_all_jar_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1459 |
fi |
|
14111 | 1460 |
fi |
1461 |
||
1462 |
if [ "$CMP_LIBS" = "true" ]; then |
|
29157 | 1463 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1464 |
echo -n "JDK " |
|
1465 |
compare_all_libs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
14458 | 1466 |
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then |
29157 | 1467 |
echo -n "JRE " |
1468 |
compare_all_libs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
|
14458 | 1469 |
fi |
14111 | 1470 |
fi |
25854 | 1471 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1472 |
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1473 |
fi |
|
28356 | 1474 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1475 |
echo -n "JavaAppletPlugin " |
|
1476 |
compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1477 |
fi |
|
14111 | 1478 |
fi |
1479 |
||
1480 |
if [ "$CMP_EXECS" = "true" ]; then |
|
29157 | 1481 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1482 |
compare_all_execs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
28356 | 1483 |
if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then |
29157 | 1484 |
echo -n "JRE " |
1485 |
compare_all_execs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
|
28356 | 1486 |
fi |
14111 | 1487 |
fi |
25854 | 1488 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1489 |
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1490 |
fi |
|
28356 | 1491 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1492 |
echo -n "JavaAppletPlugin " |
|
1493 |
compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1494 |
fi |
|
14111 | 1495 |
fi |
1496 |
||
1497 |
echo |
|
1498 |
||
1499 |
if [ -n "$REGRESSIONS" ]; then |
|
1500 |
echo "REGRESSIONS FOUND!" |
|
1501 |
echo |
|
1502 |
exit 1 |
|
1503 |
else |
|
1504 |
echo "No regressions found" |
|
1505 |
echo |
|
1506 |
exit 0 |
|
1507 |
fi |