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