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