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