author | coleenp |
Mon, 08 Jan 2018 09:46:31 -0500 | |
changeset 48619 | 1703d83b3ffe |
parent 47252 | fdac20095dff |
child 48912 | 01237b276b8b |
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 |
|
47252 | 32 |
if [ -z "$TOPDIR" ]; then |
14111 | 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 |
||
47252 | 59 |
COMPARE_EXCEPTIONS_INCLUDE="$TOPDIR/make/scripts/compare_exceptions.sh.incl" |
14111 | 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 \ |
47217 | 366 |
-e 's/20[0-9]\{2\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6,7\}/<DATE>/g' \ |
39112 | 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 |
|
41949 | 375 |
elif [[ "$f" = *"/lib/classlist" ]]; then |
39204 | 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. |
47217 | 455 |
EXCEPTIONS="pie.jar.pack.gz jdk.pack" |
456 |
for pack in $($FIND $THIS_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a \ |
|
457 |
! -name pie.jar.pack.gz -a ! -name jdk.pack); do |
|
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
458 |
($UNPACK200 $pack $pack.jar) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
459 |
# Filter out the unzipped archives from the diff below. |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
460 |
EXCEPTIONS="$EXCEPTIONS $pack $pack.jar" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
461 |
done |
47217 | 462 |
for pack in $($FIND $OTHER_UNZIPDIR \( -name "*.pack" -o -name "*.pack.gz" \) -a \ |
463 |
! -name pie.jar.pack.gz -a ! -name jdk.pack); do |
|
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
464 |
($UNPACK200 $pack $pack.jar) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
465 |
EXCEPTIONS="$EXCEPTIONS $pack $pack.jar" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
466 |
done |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
467 |
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
|
468 |
$MKDIR $zip.unzip |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
469 |
(cd $zip.unzip && $UNARCHIVE $zip) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
470 |
EXCEPTIONS="$EXCEPTIONS $zip" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
471 |
done |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
472 |
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
|
473 |
$MKDIR $zip.unzip |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
474 |
(cd $zip.unzip && $UNARCHIVE $zip) |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
475 |
EXCEPTIONS="$EXCEPTIONS $zip" |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
476 |
done |
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
477 |
|
14111 | 478 |
CONTENTS_DIFF_FILE=$WORK_DIR/$ZIP_FILE.diff |
479 |
# On solaris, there is no -q option. |
|
480 |
if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then |
|
20049 | 481 |
LC_ALL=C $DIFF -r $OTHER_UNZIPDIR $THIS_UNZIPDIR \ |
14111 | 482 |
| $GREP -v -e "^<" -e "^>" -e "^Common subdirectories:" \ |
483 |
> $CONTENTS_DIFF_FILE |
|
484 |
else |
|
20049 | 485 |
LC_ALL=C $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE |
14111 | 486 |
fi |
487 |
||
488 |
ONLY_OTHER=$($GREP "^Only in $OTHER_UNZIPDIR" $CONTENTS_DIFF_FILE) |
|
489 |
ONLY_THIS=$($GREP "^Only in $THIS_UNZIPDIR" $CONTENTS_DIFF_FILE) |
|
490 |
||
491 |
return_value=0 |
|
492 |
||
493 |
if [ -n "$ONLY_OTHER" ]; then |
|
494 |
echo " Only OTHER $ZIP_FILE contains:" |
|
495 |
echo "$ONLY_OTHER" | sed "s|Only in $OTHER_UNZIPDIR| |"g | sed 's|: |/|g' |
|
496 |
return_value=1 |
|
497 |
fi |
|
498 |
||
499 |
if [ -n "$ONLY_THIS" ]; then |
|
500 |
echo " Only THIS $ZIP_FILE contains:" |
|
501 |
echo "$ONLY_THIS" | sed "s|Only in $THIS_UNZIPDIR| |"g | sed 's|: |/|g' |
|
502 |
return_value=1 |
|
503 |
fi |
|
504 |
||
505 |
if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then |
|
29157 | 506 |
DIFFING_FILES=$($GREP -e 'differ$' -e '^diff ' $CONTENTS_DIFF_FILE \ |
507 |
| $SED -e 's/^Files //g' -e 's/diff -r //g' | $CUT -f 1 -d ' ' \ |
|
508 |
| $SED "s|$OTHER_UNZIPDIR/||g") |
|
14111 | 509 |
else |
510 |
DIFFING_FILES=$($GREP -e "differ$" $CONTENTS_DIFF_FILE \ |
|
511 |
| $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g") |
|
512 |
fi |
|
513 |
||
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
514 |
if [ "$CMP_ZIPS_CONTENTS" = "true" ]; then |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
515 |
$RM -f $WORK_DIR/$ZIP_FILE.diffs |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
516 |
for file in $DIFFING_FILES; do |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
517 |
if [[ "$ACCEPTED_JARZIP_CONTENTS $EXCEPTIONS" != *"$file"* ]]; then |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
518 |
diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
519 |
fi |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
520 |
done |
14111 | 521 |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
522 |
if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
523 |
return_value=1 |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
524 |
echo " Differing files in $ZIP_FILE" |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
525 |
$CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP 'differ$' | cut -f 2 -d ' ' | \ |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
526 |
$SED "s|$OTHER_UNZIPDIR| |g" > $WORK_DIR/$ZIP_FILE.difflist |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
527 |
$CAT $WORK_DIR/$ZIP_FILE.difflist |
14111 | 528 |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
529 |
if [ -n "$SHOW_DIFFS" ]; then |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
530 |
for i in $(cat $WORK_DIR/$ZIP_FILE.difflist) ; do |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
531 |
if [ -f "${OTHER_UNZIPDIR}/$i.javap" ]; then |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
532 |
LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
533 |
elif [ -f "${OTHER_UNZIPDIR}/$i.cleaned" ]; then |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
534 |
LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
535 |
else |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
536 |
LC_ALL=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
537 |
fi |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
538 |
done |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
539 |
fi |
14111 | 540 |
fi |
541 |
fi |
|
542 |
||
543 |
return $return_value |
|
544 |
} |
|
545 |
||
546 |
||
29157 | 547 |
################################################################################ |
14111 | 548 |
# Compare all zip files |
549 |
||
550 |
compare_all_zip_files() { |
|
551 |
THIS_DIR=$1 |
|
552 |
OTHER_DIR=$2 |
|
553 |
WORK_DIR=$3 |
|
554 |
||
37972 | 555 |
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" -o -name "*.tar.gz" \ |
556 |
| $SORT | $FILTER ) |
|
14111 | 557 |
|
558 |
if [ -n "$ZIPS" ]; then |
|
37972 | 559 |
echo Zip/tar.gz files... |
14111 | 560 |
|
561 |
return_value=0 |
|
562 |
for f in $ZIPS; do |
|
563 |
if [ -f "$OTHER_DIR/$f" ]; then |
|
564 |
compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f |
|
565 |
if [ "$?" != "0" ]; then |
|
566 |
return_value=1 |
|
567 |
REGRESSIONS=true |
|
568 |
fi |
|
569 |
fi |
|
570 |
done |
|
571 |
fi |
|
572 |
||
573 |
return $return_value |
|
574 |
} |
|
575 |
||
29157 | 576 |
################################################################################ |
14111 | 577 |
# Compare all jar files |
578 |
||
579 |
compare_all_jar_files() { |
|
580 |
THIS_DIR=$1 |
|
581 |
OTHER_DIR=$2 |
|
582 |
WORK_DIR=$3 |
|
583 |
||
584 |
# TODO filter? |
|
25854 | 585 |
ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" -o -name "*.war" \ |
36789 | 586 |
-o -name "modules" | $SORT | $FILTER) |
14111 | 587 |
|
588 |
if [ -n "$ZIPS" ]; then |
|
589 |
echo Jar files... |
|
590 |
||
591 |
return_value=0 |
|
592 |
for f in $ZIPS; do |
|
593 |
if [ -f "$OTHER_DIR/$f" ]; then |
|
594 |
compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f |
|
595 |
if [ "$?" != "0" ]; then |
|
596 |
return_value=1 |
|
597 |
REGRESSIONS=true |
|
598 |
fi |
|
599 |
fi |
|
600 |
done |
|
601 |
fi |
|
602 |
||
603 |
return $return_value |
|
604 |
} |
|
605 |
||
29157 | 606 |
################################################################################ |
14111 | 607 |
# Compare binary (executable/library) file |
608 |
||
609 |
compare_bin_file() { |
|
610 |
THIS_DIR=$1 |
|
611 |
OTHER_DIR=$2 |
|
612 |
WORK_DIR=$3 |
|
613 |
BIN_FILE=$4 |
|
25854 | 614 |
OTHER_BIN_FILE=$5 |
14111 | 615 |
|
616 |
THIS_FILE=$THIS_DIR/$BIN_FILE |
|
25854 | 617 |
if [ -n "$OTHER_BIN_FILE" ]; then |
618 |
OTHER_FILE=$OTHER_DIR/$OTHER_BIN_FILE |
|
619 |
else |
|
620 |
OTHER_FILE=$OTHER_DIR/$BIN_FILE |
|
621 |
fi |
|
14111 | 622 |
NAME=$(basename $BIN_FILE) |
623 |
WORK_FILE_BASE=$WORK_DIR/$BIN_FILE |
|
624 |
FILE_WORK_DIR=$(dirname $WORK_FILE_BASE) |
|
625 |
||
626 |
$MKDIR -p $FILE_WORK_DIR |
|
627 |
||
28356 | 628 |
# Make soft links to original files from work dir to facilitate debugging |
629 |
$LN -f -s $THIS_FILE $WORK_FILE_BASE.this |
|
630 |
$LN -f -s $OTHER_FILE $WORK_FILE_BASE.other |
|
631 |
||
14111 | 632 |
ORIG_THIS_FILE="$THIS_FILE" |
633 |
ORIG_OTHER_FILE="$OTHER_FILE" |
|
634 |
||
32811
df82db312e58
8135060: Stop building Xcode projects in install build
erikj
parents:
31310
diff
changeset
|
635 |
if [ "$STRIP_ALL" = "true" ] || [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then |
14111 | 636 |
THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME |
637 |
OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME |
|
638 |
$MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other |
|
639 |
$CP $THIS_FILE $THIS_STRIPPED_FILE |
|
640 |
$CP $OTHER_FILE $OTHER_STRIPPED_FILE |
|
641 |
$STRIP $THIS_STRIPPED_FILE |
|
642 |
$STRIP $OTHER_STRIPPED_FILE |
|
643 |
THIS_FILE="$THIS_STRIPPED_FILE" |
|
644 |
OTHER_FILE="$OTHER_STRIPPED_FILE" |
|
645 |
fi |
|
646 |
||
647 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
28356 | 648 |
unset _NT_SYMBOL_PATH |
41949 | 649 |
if [ "$(uname -o)" = "Cygwin" ]; then |
650 |
THIS=$(cygpath -msa $THIS) |
|
651 |
OTHER=$(cygpath -msa $OTHER) |
|
28356 | 652 |
fi |
41949 | 653 |
# Build an _NT_SYMBOL_PATH that contains all known locations for |
654 |
# pdb files. |
|
655 |
PDB_DIRS="$(ls -d \ |
|
656 |
{$OTHER,$THIS}/support/modules_{cmds,libs}/{*,*/*} \ |
|
657 |
{$OTHER,$THIS}/support/demos/image/jvmti/*/lib \ |
|
658 |
{$OTHER,$THIS}/support/native/java.base/java_objs \ |
|
659 |
)" |
|
660 |
export _NT_SYMBOL_PATH="$(echo $PDB_DIRS | tr ' ' ';')" |
|
14111 | 661 |
fi |
662 |
||
663 |
if [ -z "$SKIP_BIN_DIFF" ]; then |
|
664 |
if cmp $OTHER_FILE $THIS_FILE > /dev/null; then |
|
665 |
# The files were bytewise identical. |
|
666 |
if [ -n "$VERBOSE" ]; then |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
667 |
echo " : : : : : : $BIN_FILE" |
14111 | 668 |
fi |
669 |
return 0 |
|
670 |
fi |
|
671 |
BIN_MSG=" diff " |
|
672 |
if [[ "$ACCEPTED_BIN_DIFF" != *"$BIN_FILE"* ]]; then |
|
673 |
DIFF_BIN=true |
|
674 |
if [[ "$KNOWN_BIN_DIFF" != *"$BIN_FILE"* ]]; then |
|
675 |
BIN_MSG="*$BIN_MSG*" |
|
676 |
REGRESSIONS=true |
|
677 |
else |
|
678 |
BIN_MSG=" $BIN_MSG " |
|
679 |
fi |
|
680 |
else |
|
681 |
BIN_MSG="($BIN_MSG)" |
|
682 |
DIFF_BIN= |
|
683 |
fi |
|
684 |
fi |
|
685 |
||
686 |
if [ -n "$STAT" ]; then |
|
687 |
THIS_SIZE=$($STAT $STAT_PRINT_SIZE "$THIS_FILE") |
|
688 |
OTHER_SIZE=$($STAT $STAT_PRINT_SIZE "$OTHER_FILE") |
|
689 |
else |
|
690 |
THIS_SIZE=$(ls -l "$THIS_FILE" | awk '{ print $5 }') |
|
691 |
OTHER_SIZE=$(ls -l "$OTHER_FILE" | awk '{ print $5 }') |
|
692 |
fi |
|
693 |
if [ $THIS_SIZE -ne $OTHER_SIZE ]; then |
|
694 |
DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE) |
|
695 |
DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE) |
|
696 |
SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM) |
|
14458 | 697 |
if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] \ |
28356 | 698 |
&& [ "$DIFF_SIZE_REL" -lt 102 ]; then |
14111 | 699 |
SIZE_MSG="($SIZE_MSG)" |
700 |
DIFF_SIZE= |
|
14458 | 701 |
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \ |
28356 | 702 |
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \ |
703 |
&& [ "$DIFF_SIZE_NUM" = 512 ]; then |
|
704 |
# On windows, size of binaries increase in 512 increments. |
|
14458 | 705 |
SIZE_MSG="($SIZE_MSG)" |
706 |
DIFF_SIZE= |
|
707 |
elif [ "$OPENJDK_TARGET_OS" = "windows" ] \ |
|
28356 | 708 |
&& [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] \ |
709 |
&& [ "$DIFF_SIZE_NUM" = -512 ]; then |
|
710 |
# On windows, size of binaries increase in 512 increments. |
|
14111 | 711 |
SIZE_MSG="($SIZE_MSG)" |
712 |
DIFF_SIZE= |
|
713 |
else |
|
714 |
if [[ "$ACCEPTED_SIZE_DIFF" != *"$BIN_FILE"* ]]; then |
|
715 |
DIFF_SIZE=true |
|
716 |
if [[ "$KNOWN_SIZE_DIFF" != *"$BIN_FILE"* ]]; then |
|
717 |
SIZE_MSG="*$SIZE_MSG*" |
|
718 |
REGRESSIONS=true |
|
719 |
else |
|
720 |
SIZE_MSG=" $SIZE_MSG " |
|
721 |
fi |
|
722 |
else |
|
723 |
SIZE_MSG="($SIZE_MSG)" |
|
724 |
DIFF_SIZE= |
|
725 |
fi |
|
726 |
fi |
|
727 |
else |
|
728 |
SIZE_MSG=" " |
|
729 |
DIFF_SIZE= |
|
730 |
if [[ "$KNOWN_SIZE_DIFF $ACCEPTED_SIZE_DIFF" = *"$BIN_FILE"* ]]; then |
|
731 |
SIZE_MSG=" ! " |
|
732 |
fi |
|
733 |
fi |
|
734 |
||
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
735 |
if [ "$SORT_ALL_SYMBOLS" = "true" ] || [[ "$SORT_SYMBOLS" = *"$BIN_FILE"* ]]; then |
14111 | 736 |
SYM_SORT_CMD="sort" |
737 |
else |
|
738 |
SYM_SORT_CMD="cat" |
|
739 |
fi |
|
740 |
||
37402 | 741 |
if [ -n "$SYMBOLS_DIFF_FILTER" ] && [ -z "$NEED_SYMBOLS_DIFF_FILTER" ] \ |
742 |
|| [[ "$NEED_SYMBOLS_DIFF_FILTER" = *"$BIN_FILE"* ]]; then |
|
743 |
this_SYMBOLS_DIFF_FILTER="$SYMBOLS_DIFF_FILTER" |
|
744 |
else |
|
745 |
this_SYMBOLS_DIFF_FILTER="$CAT" |
|
746 |
fi |
|
747 |
||
14111 | 748 |
# Check symbols |
749 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
750 |
# The output from dumpbin on windows differs depending on if the debug symbol |
|
751 |
# files are still around at the location the binary is pointing too. Need |
|
28356 | 752 |
# to filter out that extra information. |
753 |
$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 |
|
754 |
$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 | 755 |
elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then |
756 |
# Some symbols get seemingly random 15 character prefixes. Filter them out. |
|
757 |
$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 | 758 |
$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
|
759 |
elif [ "$OPENJDK_TARGET_OS" = "aix" ]; then |
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
760 |
$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
|
761 |
$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 | 762 |
elif [ "$OPENJDK_TARGET_OS" = "macosx" ]; then |
763 |
$NM -j $ORIG_OTHER_FILE 2> /dev/null | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other |
|
764 |
$NM -j $ORIG_THIS_FILE 2> /dev/null | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this |
|
14111 | 765 |
else |
37402 | 766 |
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME \ |
767 |
| $AWK '{print $2, $3, $4, $5}' \ |
|
768 |
| eval "$this_SYMBOLS_DIFF_FILTER" \ |
|
769 |
| $SYM_SORT_CMD \ |
|
770 |
> $WORK_FILE_BASE.symbols.other |
|
771 |
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME \ |
|
772 |
| $AWK '{print $2, $3, $4, $5}' \ |
|
773 |
| eval "$this_SYMBOLS_DIFF_FILTER" \ |
|
774 |
| $SYM_SORT_CMD \ |
|
775 |
> $WORK_FILE_BASE.symbols.this |
|
14111 | 776 |
fi |
28356 | 777 |
|
20049 | 778 |
LC_ALL=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff |
14111 | 779 |
if [ -s $WORK_FILE_BASE.symbols.diff ]; then |
780 |
SYM_MSG=" diff " |
|
781 |
if [[ "$ACCEPTED_SYM_DIFF" != *"$BIN_FILE"* ]]; then |
|
782 |
DIFF_SYM=true |
|
783 |
if [[ "$KNOWN_SYM_DIFF" != *"$BIN_FILE"* ]]; then |
|
784 |
SYM_MSG="*$SYM_MSG*" |
|
785 |
REGRESSIONS=true |
|
786 |
else |
|
787 |
SYM_MSG=" $SYM_MSG " |
|
788 |
fi |
|
789 |
else |
|
28356 | 790 |
SYM_MSG="($SYM_MSG)" |
14111 | 791 |
DIFF_SYM= |
792 |
fi |
|
793 |
else |
|
794 |
SYM_MSG=" " |
|
795 |
DIFF_SYM= |
|
796 |
if [[ "$KNOWN_SYM_DIFF $ACCEPTED_SYM_DIFF" = *"$BIN_FILE"* ]]; then |
|
797 |
SYM_MSG=" ! " |
|
798 |
fi |
|
799 |
fi |
|
800 |
||
801 |
# Check dependencies |
|
802 |
if [ -n "$LDD_CMD" ]; then |
|
37032
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
803 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
804 |
LDD_FILTER="$GREP \.dll" |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
805 |
else |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
806 |
LDD_FILTER="$CAT" |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
807 |
fi |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
808 |
(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
|
809 |
| $LDD_FILTER | $AWK '{ print $1;}' | $SORT \ |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
810 |
| $TEE $WORK_FILE_BASE.deps.other \ |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
811 |
| $UNIQ > $WORK_FILE_BASE.deps.other.uniq) |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
812 |
(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
|
813 |
| $LDD_FILTER | $AWK '{ print $1;}' | $SORT \ |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
814 |
| $TEE $WORK_FILE_BASE.deps.this \ |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
815 |
| $UNIQ > $WORK_FILE_BASE.deps.this.uniq) |
28356 | 816 |
(cd $FILE_WORK_DIR && $RM -f $NAME) |
817 |
||
37032
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
818 |
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
|
819 |
> $WORK_FILE_BASE.deps.diff |
09347dc49ec8
8154237: Compare script broken for windows native library deps comparison
erikj
parents:
36789
diff
changeset
|
820 |
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
|
821 |
> $WORK_FILE_BASE.deps.diff.uniq |
28356 | 822 |
|
823 |
if [ -s $WORK_FILE_BASE.deps.diff ]; then |
|
14111 | 824 |
if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then |
28356 | 825 |
DEP_MSG=" diff " |
14111 | 826 |
else |
28356 | 827 |
DEP_MSG=" redun " |
14111 | 828 |
fi |
829 |
if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then |
|
28356 | 830 |
DIFF_DEP=true |
831 |
if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then |
|
14111 | 832 |
DEP_MSG="*$DEP_MSG*" |
833 |
REGRESSIONS=true |
|
28356 | 834 |
else |
14111 | 835 |
DEP_MSG=" $DEP_MSG " |
28356 | 836 |
fi |
14111 | 837 |
else |
28356 | 838 |
DEP_MSG="($DEP_MSG)" |
839 |
DIFF_DEP= |
|
14111 | 840 |
fi |
28356 | 841 |
else |
842 |
DEP_MSG=" " |
|
843 |
DIFF_DEP= |
|
14111 | 844 |
if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then |
845 |
DEP_MSG=" ! " |
|
846 |
fi |
|
28356 | 847 |
fi |
14111 | 848 |
else |
28356 | 849 |
DEP_MSG=" - " |
14111 | 850 |
fi |
28356 | 851 |
|
34596
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
852 |
# Some linux compilers add a unique Build ID |
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
853 |
if [ "$OPENJDK_TARGET_OS" = "linux" ]; then |
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
854 |
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
|
855 |
else |
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
856 |
BUILD_ID_FILTER="$CAT" |
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
857 |
fi |
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
858 |
|
14111 | 859 |
# Compare fulldump output |
860 |
if [ -n "$FULLDUMP_CMD" ] && [ -z "$SKIP_FULLDUMP_DIFF" ]; then |
|
29157 | 861 |
if [ -z "$FULLDUMP_DIFF_FILTER" ]; then |
862 |
FULLDUMP_DIFF_FILTER="$CAT" |
|
863 |
fi |
|
34596
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
864 |
$FULLDUMP_CMD $OTHER_FILE | eval "$BUILD_ID_FILTER" | eval "$FULLDUMP_DIFF_FILTER" \ |
37402 | 865 |
> $WORK_FILE_BASE.fulldump.other 2>&1 & |
34596
e8328ce5b64e
8142907: Integration of minor fixes from the build-infra project
ihse
parents:
33441
diff
changeset
|
866 |
$FULLDUMP_CMD $THIS_FILE | eval "$BUILD_ID_FILTER" | eval "$FULLDUMP_DIFF_FILTER" \ |
37402 | 867 |
> $WORK_FILE_BASE.fulldump.this 2>&1 & |
868 |
wait |
|
29157 | 869 |
|
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
870 |
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
|
871 |
> $WORK_FILE_BASE.fulldump.diff |
28356 | 872 |
|
14111 | 873 |
if [ -s $WORK_FILE_BASE.fulldump.diff ]; then |
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
874 |
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
|
875 |
FULLDUMP_MSG=$($PRINTF "%8d" $FULLDUMP_DIFF_SIZE) |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
876 |
if [[ "$ACCEPTED_FULLDUMP_DIFF" != *"$BIN_FILE"* ]]; then |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
877 |
DIFF_FULLDUMP=true |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
878 |
if [[ "$KNOWN_FULLDUMP_DIFF" != *"$BIN_FILE"* ]]; then |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
879 |
FULLDUMP_MSG="*$FULLDUMP_MSG*" |
14111 | 880 |
REGRESSIONS=true |
881 |
else |
|
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
882 |
FULLDUMP_MSG=" $FULLDUMP_MSG " |
14111 | 883 |
fi |
884 |
else |
|
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
885 |
FULLDUMP_MSG="($FULLDUMP_MSG)" |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
886 |
DIFF_FULLDUMP= |
14111 | 887 |
fi |
888 |
else |
|
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
889 |
FULLDUMP_MSG=" " |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
890 |
DIFF_FULLDUMP= |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
891 |
if [[ "$KNOWN_FULLDUMP_DIFF $ACCEPTED_FULLDUMP_DIFF" = *"$BIN_FILE"* ]]; then |
37972 | 892 |
FULLDUMP_MSG=" ! " |
14111 | 893 |
fi |
894 |
fi |
|
895 |
fi |
|
896 |
||
897 |
# Compare disassemble output |
|
898 |
if [ -n "$DIS_CMD" ] && [ -z "$SKIP_DIS_DIFF" ]; then |
|
37402 | 899 |
this_DIS_DIFF_FILTER="$CAT" |
900 |
if [ -n "$DIS_DIFF_FILTER" ]; then |
|
901 |
if [ -z "$NEED_DIS_DIFF_FILTER" ] \ |
|
902 |
|| [[ "$NEED_DIS_DIFF_FILTER" = *"$BIN_FILE"* ]]; then |
|
903 |
this_DIS_DIFF_FILTER="$DIS_DIFF_FILTER" |
|
904 |
fi |
|
28356 | 905 |
fi |
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
906 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
907 |
DIS_GREP_ARG=-a |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
908 |
else |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
909 |
DIS_GREP_ARG= |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
910 |
fi |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
911 |
$DIS_CMD $OTHER_FILE | $GREP $DIS_GREP_ARG -v $NAME \ |
37402 | 912 |
| 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
|
913 |
$DIS_CMD $THIS_FILE | $GREP $DIS_GREP_ARG -v $NAME \ |
37402 | 914 |
| eval "$this_DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1 & |
915 |
wait |
|
28356 | 916 |
|
20049 | 917 |
LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff |
28356 | 918 |
|
14111 | 919 |
if [ -s $WORK_FILE_BASE.dis.diff ]; then |
920 |
DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}') |
|
921 |
DIS_MSG=$($PRINTF "%8d" $DIS_DIFF_SIZE) |
|
922 |
if [[ "$ACCEPTED_DIS_DIFF" != *"$BIN_FILE"* ]]; then |
|
923 |
DIFF_DIS=true |
|
37402 | 924 |
if [ "$MAX_KNOWN_DIS_DIFF_SIZE" = "" ]; then |
925 |
MAX_KNOWN_DIS_DIFF_SIZE="0" |
|
926 |
fi |
|
927 |
if [[ "$KNOWN_DIS_DIFF" = *"$BIN_FILE"* ]] \ |
|
928 |
&& [ "$DIS_DIFF_SIZE" -lt "$MAX_KNOWN_DIS_DIFF_SIZE" ]; then |
|
929 |
DIS_MSG=" $DIS_MSG " |
|
930 |
else |
|
14111 | 931 |
DIS_MSG="*$DIS_MSG*" |
932 |
REGRESSIONS=true |
|
933 |
fi |
|
934 |
else |
|
935 |
DIS_MSG="($DIS_MSG)" |
|
936 |
DIFF_DIS= |
|
937 |
fi |
|
938 |
else |
|
939 |
DIS_MSG=" " |
|
940 |
DIFF_DIS= |
|
941 |
if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then |
|
942 |
DIS_MSG=" ! " |
|
943 |
fi |
|
944 |
fi |
|
945 |
fi |
|
946 |
||
947 |
||
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
948 |
if [ -n "$DIFF_BIN$DIFF_SIZE$DIFF_SYM$DIFF_DEP$DIFF_FULLDUMP$DIFF_DIS" ] || [ -n "$VERBOSE" ]; then |
14111 | 949 |
if [ -n "$BIN_MSG" ]; then echo -n "$BIN_MSG:"; fi |
950 |
if [ -n "$SIZE_MSG" ]; then echo -n "$SIZE_MSG:"; fi |
|
951 |
if [ -n "$SYM_MSG" ]; then echo -n "$SYM_MSG:"; fi |
|
952 |
if [ -n "$DEP_MSG" ]; then echo -n "$DEP_MSG:"; fi |
|
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
953 |
if [ -n "$FULLDUMP_MSG" ]; then echo -n "$FULLDUMP_MSG:"; fi |
14111 | 954 |
if [ -n "$DIS_MSG" ]; then echo -n "$DIS_MSG:"; fi |
955 |
echo " $BIN_FILE" |
|
956 |
if [ "$SHOW_DIFFS" = "true" ]; then |
|
957 |
if [ -s "$WORK_FILE_BASE.symbols.diff" ]; then |
|
958 |
echo "Symbols diff:" |
|
959 |
$CAT $WORK_FILE_BASE.symbols.diff |
|
960 |
fi |
|
961 |
if [ -s "$WORK_FILE_BASE.deps.diff" ]; then |
|
962 |
echo "Deps diff:" |
|
963 |
$CAT $WORK_FILE_BASE.deps.diff |
|
964 |
fi |
|
965 |
if [ -s "$WORK_FILE_BASE.fulldump.diff" ]; then |
|
966 |
echo "Fulldump diff:" |
|
967 |
$CAT $WORK_FILE_BASE.fulldump.diff |
|
968 |
fi |
|
969 |
if [ -s "$WORK_FILE_BASE.dis.diff" ]; then |
|
970 |
echo "Disassembly diff:" |
|
971 |
$CAT $WORK_FILE_BASE.dis.diff |
|
972 |
fi |
|
973 |
fi |
|
974 |
return 1 |
|
975 |
fi |
|
976 |
return 0 |
|
977 |
} |
|
978 |
||
29157 | 979 |
################################################################################ |
14111 | 980 |
# Print binary diff header |
981 |
||
982 |
print_binary_diff_header() { |
|
983 |
if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi |
|
984 |
if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n " Size :"; fi |
|
985 |
if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi |
|
986 |
if [ -z "$SKIP_DEP_DIFF" ]; then echo -n " Deps :"; fi |
|
987 |
if [ -z "$SKIP_FULLDUMP_DIFF" ]; then echo -n " Fulldump :"; fi |
|
988 |
if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass :"; fi |
|
989 |
echo |
|
990 |
} |
|
991 |
||
29157 | 992 |
################################################################################ |
14111 | 993 |
# Compare all libraries |
994 |
||
995 |
compare_all_libs() { |
|
996 |
THIS_DIR=$1 |
|
997 |
OTHER_DIR=$2 |
|
998 |
WORK_DIR=$3 |
|
999 |
||
28356 | 1000 |
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
|
1001 |
-o -name '*.dll' -o -name '*.obj' -o -name '*.o' -o -name '*.a' \ |
28356 | 1002 |
-o -name '*.cpl' \) | $SORT | $FILTER) |
14111 | 1003 |
|
1004 |
if [ -n "$LIBS" ]; then |
|
1005 |
echo Libraries... |
|
1006 |
print_binary_diff_header |
|
1007 |
for l in $LIBS; do |
|
1008 |
if [ -f "$OTHER_DIR/$l" ]; then |
|
1009 |
compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l |
|
1010 |
if [ "$?" != "0" ]; then |
|
1011 |
return_value=1 |
|
1012 |
fi |
|
1013 |
fi |
|
1014 |
done |
|
1015 |
fi |
|
1016 |
||
1017 |
return $return_value |
|
1018 |
} |
|
1019 |
||
29157 | 1020 |
################################################################################ |
14111 | 1021 |
# Compare all executables |
1022 |
||
1023 |
compare_all_execs() { |
|
1024 |
THIS_DIR=$1 |
|
1025 |
OTHER_DIR=$2 |
|
1026 |
WORK_DIR=$3 |
|
1027 |
||
1028 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
1029 |
EXECS=$(cd $THIS_DIR && $FIND . -type f -name '*.exe' | $SORT | $FILTER) |
|
1030 |
else |
|
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
1031 |
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
|
1032 |
\( -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
|
1033 |
-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
|
1034 |
-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
|
1035 |
-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
|
1036 |
-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
|
1037 |
-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
|
1038 |
-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
|
1039 |
-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
|
1040 |
-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
|
1041 |
-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
|
1042 |
-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
|
1043 |
-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
|
1044 |
-o -name 'COPYRIGHT' -o -name '*.1' \ |
14280
7d8ad47b2dbf
8002220: build-infra: update for mac, solaris 11 issues
erikj
parents:
14111
diff
changeset
|
1045 |
-o -name 'classlist' \) | $SORT | $FILTER) |
14111 | 1046 |
fi |
1047 |
||
1048 |
if [ -n "$EXECS" ]; then |
|
1049 |
echo Executables... |
|
1050 |
print_binary_diff_header |
|
1051 |
for e in $EXECS; do |
|
1052 |
if [ -f "$OTHER_DIR/$e" ]; then |
|
1053 |
compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $e |
|
1054 |
if [ "$?" != "0" ]; then |
|
1055 |
return_value=1 |
|
1056 |
fi |
|
1057 |
fi |
|
1058 |
done |
|
1059 |
fi |
|
1060 |
||
1061 |
return $return_value |
|
1062 |
} |
|
1063 |
||
29157 | 1064 |
################################################################################ |
14111 | 1065 |
# Initiate configuration |
1066 |
||
33441
ce975712c050
8141439: Fix compare.sh -o <otherdir> (broken by JDK-8136813)
ihse
parents:
33031
diff
changeset
|
1067 |
THIS="$SCRIPT_DIR" |
14111 | 1068 |
echo "$THIS" |
1069 |
THIS_SCRIPT="$0" |
|
1070 |
||
1071 |
if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1" = "/?" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then |
|
1072 |
echo "bash ./compare.sh [OPTIONS] [FILTER]" |
|
1073 |
echo "" |
|
1074 |
echo "-all Compare all files in all known ways" |
|
1075 |
echo "-names Compare the file names and directory structure" |
|
1076 |
echo "-perms Compare the permission bits on all files and directories" |
|
1077 |
echo "-types Compare the output of the file command on all files" |
|
1078 |
echo "-general Compare the files not convered by the specialized comparisons" |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1079 |
echo "-zips Compare the contents of all zip files and files in them" |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1080 |
echo "-zips-names Compare the file names inside all zip files" |
14111 | 1081 |
echo "-jars Compare the contents of all jar files" |
1082 |
echo "-libs Compare all native libraries" |
|
1083 |
echo "-execs Compare all executables" |
|
1084 |
echo "-v Verbose output, does not hide known differences" |
|
1085 |
echo "-vv More verbose output, shows diff output of all comparisons" |
|
1086 |
echo "-o [OTHER] Compare with build in other directory. Will default to the old build directory" |
|
1087 |
echo "" |
|
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
1088 |
echo "--sort-symbols Sort all symbols before comparing" |
32811
df82db312e58
8135060: Stop building Xcode projects in install build
erikj
parents:
31310
diff
changeset
|
1089 |
echo "--strip Strip all binaries before comparing" |
35747 | 1090 |
echo "--clean Clean all previous comparison results first" |
32811
df82db312e58
8135060: Stop building Xcode projects in install build
erikj
parents:
31310
diff
changeset
|
1091 |
echo "" |
14111 | 1092 |
echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" |
1093 |
echo "Example:" |
|
47217 | 1094 |
echo "bash ./make/scripts/compareimages.sh CodePointIM.jar" |
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1095 |
echo "" |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1096 |
echo "-2zips <file1> <file2> Compare two zip files only" |
25854 | 1097 |
echo "-2bins <file1> <file2> Compare two binary files only" |
1098 |
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
|
1099 |
echo "" |
14111 | 1100 |
exit 10 |
1101 |
fi |
|
1102 |
||
1103 |
CMP_NAMES=false |
|
1104 |
CMP_PERMS=false |
|
1105 |
CMP_TYPES=false |
|
1106 |
CMP_GENERAL=false |
|
1107 |
CMP_ZIPS=false |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1108 |
CMP_ZIPS_CONTENTS=true |
14111 | 1109 |
CMP_JARS=false |
1110 |
CMP_LIBS=false |
|
1111 |
CMP_EXECS=false |
|
1112 |
||
1113 |
while [ -n "$1" ]; do |
|
1114 |
case "$1" in |
|
1115 |
-v) |
|
1116 |
VERBOSE=true |
|
1117 |
;; |
|
1118 |
-vv) |
|
1119 |
VERBOSE=true |
|
1120 |
SHOW_DIFFS=true |
|
1121 |
;; |
|
1122 |
-o) |
|
1123 |
OTHER="$2" |
|
1124 |
shift |
|
1125 |
;; |
|
1126 |
-all) |
|
1127 |
CMP_NAMES=true |
|
1128 |
if [ "$OPENJDK_TARGET_OS" != "windows" ]; then |
|
1129 |
CMP_PERMS=true |
|
1130 |
fi |
|
1131 |
CMP_TYPES=true |
|
1132 |
CMP_GENERAL=true |
|
1133 |
CMP_ZIPS=true |
|
1134 |
CMP_JARS=true |
|
1135 |
CMP_LIBS=true |
|
1136 |
CMP_EXECS=true |
|
1137 |
;; |
|
1138 |
-names) |
|
1139 |
CMP_NAMES=true |
|
1140 |
;; |
|
1141 |
-perms) |
|
1142 |
CMP_PERMS=true |
|
1143 |
;; |
|
1144 |
-types) |
|
1145 |
CMP_TYPES=true |
|
1146 |
;; |
|
1147 |
-general) |
|
1148 |
CMP_GENERAL=true |
|
1149 |
;; |
|
1150 |
-zips) |
|
1151 |
CMP_ZIPS=true |
|
42506
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1152 |
CMP_ZIPS_CONTENTS=true |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1153 |
;; |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1154 |
-zips-names) |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1155 |
CMP_ZIPS=true |
54b0b4fffab5
8170878: JDK 9 fails to build when enabling Hotspot code coverage
erikj
parents:
42288
diff
changeset
|
1156 |
CMP_ZIPS_CONTENTS=false |
14111 | 1157 |
;; |
1158 |
-jars) |
|
1159 |
CMP_JARS=true |
|
1160 |
;; |
|
1161 |
-libs) |
|
1162 |
CMP_LIBS=true |
|
1163 |
;; |
|
1164 |
-execs) |
|
1165 |
CMP_EXECS=true |
|
1166 |
;; |
|
25854 | 1167 |
-2dirs) |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1168 |
THIS="$(cd "$2" > /dev/null && pwd )" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1169 |
OTHER="$(cd "$3" > /dev/null && pwd )" |
25854 | 1170 |
THIS_BASE_DIR="$THIS" |
1171 |
OTHER_BASE_DIR="$OTHER" |
|
1172 |
SKIP_DEFAULT=true |
|
1173 |
shift |
|
1174 |
shift |
|
1175 |
;; |
|
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1176 |
-2zips) |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1177 |
CMP_2_ZIPS=true |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1178 |
THIS_FILE=$2 |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1179 |
OTHER_FILE=$3 |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1180 |
shift |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1181 |
shift |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1182 |
;; |
25854 | 1183 |
-2bins) |
1184 |
CMP_2_BINS=true |
|
1185 |
THIS_FILE=$2 |
|
1186 |
OTHER_FILE=$3 |
|
1187 |
shift |
|
1188 |
shift |
|
1189 |
;; |
|
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
1190 |
--sort-symbols) |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
1191 |
SORT_ALL_SYMBOLS=true |
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
1192 |
;; |
32811
df82db312e58
8135060: Stop building Xcode projects in install build
erikj
parents:
31310
diff
changeset
|
1193 |
--strip) |
df82db312e58
8135060: Stop building Xcode projects in install build
erikj
parents:
31310
diff
changeset
|
1194 |
STRIP_ALL=true |
df82db312e58
8135060: Stop building Xcode projects in install build
erikj
parents:
31310
diff
changeset
|
1195 |
;; |
35747 | 1196 |
--clean) |
1197 |
CLEAN_OUTPUT=true |
|
1198 |
;; |
|
14111 | 1199 |
*) |
1200 |
CMP_NAMES=false |
|
1201 |
CMP_PERMS=false |
|
1202 |
CMP_TYPES=false |
|
1203 |
CMP_ZIPS=true |
|
1204 |
CMP_JARS=true |
|
1205 |
CMP_LIBS=true |
|
1206 |
CMP_EXECS=true |
|
28356 | 1207 |
|
14111 | 1208 |
if [ -z "$FILTER" ]; then |
1209 |
FILTER="$GREP" |
|
1210 |
fi |
|
1211 |
FILTER="$FILTER -e $1" |
|
1212 |
;; |
|
1213 |
esac |
|
1214 |
shift |
|
1215 |
done |
|
1216 |
||
35747 | 1217 |
if [ "$STRIP_ALL" = "true" ] && [ -z "$STRIP" ]; then |
1218 |
echo Warning: Not stripping even with --strip, since strip is missing on this platform |
|
1219 |
STRIP_ALL=false |
|
1220 |
fi |
|
1221 |
||
1222 |
COMPARE_ROOT=/tmp/cimages.$USER |
|
1223 |
if [ "$CLEAN_OUTPUT" = "true" ]; then |
|
1224 |
echo Cleaning old output in $COMPARE_ROOT. |
|
1225 |
$RM -rf $COMPARE_ROOT |
|
1226 |
fi |
|
1227 |
$MKDIR -p $COMPARE_ROOT |
|
1228 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
1229 |
if [ "$(uname -o)" = "Cygwin" ]; then |
|
1230 |
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT) |
|
1231 |
fi |
|
1232 |
fi |
|
1233 |
||
15179
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1234 |
if [ "$CMP_2_ZIPS" = "true" ]; then |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1235 |
THIS_DIR="$(dirname $THIS_FILE)" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1236 |
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
|
1237 |
OTHER_DIR="$(dirname $OTHER_FILE)" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1238 |
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
|
1239 |
THIS_FILE_NAME="$(basename $THIS_FILE)" |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1240 |
OTHER_FILE_NAME="$(basename $OTHER_FILE)" |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1241 |
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
|
1242 |
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
|
1243 |
exit |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1244 |
fi |
d5be3992e87e
8006663: build-infra: Compare two arbitrary zip/jar files with compare.sh
erikj
parents:
15068
diff
changeset
|
1245 |
|
25854 | 1246 |
if [ "$CMP_2_BINS" = "true" ]; then |
1247 |
THIS_DIR="$(dirname $THIS_FILE)" |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1248 |
THIS_DIR="$(cd "$THIS_DIR" > /dev/null && pwd )" |
25854 | 1249 |
OTHER_DIR="$(dirname $OTHER_FILE)" |
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1250 |
OTHER_DIR="$(cd "$OTHER_DIR" > /dev/null && pwd )" |
25854 | 1251 |
THIS_FILE_NAME="$(basename $THIS_FILE)" |
1252 |
OTHER_FILE_NAME="$(basename $OTHER_FILE)" |
|
1253 |
echo Comparing $THIS_DIR/$THIS_FILE_NAME and $OTHER_DIR/$OTHER_FILE_NAME |
|
1254 |
compare_bin_file $THIS_DIR $OTHER_DIR $COMPARE_ROOT/2bins $THIS_FILE_NAME $OTHER_FILE_NAME |
|
1255 |
exit |
|
1256 |
fi |
|
1257 |
||
14111 | 1258 |
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 |
1259 |
CMP_NAMES=true |
|
1260 |
CMP_PERMS=true |
|
1261 |
CMP_TYPES=true |
|
1262 |
CMP_GENERAL=true |
|
1263 |
CMP_ZIPS=true |
|
1264 |
CMP_JARS=true |
|
1265 |
CMP_LIBS=true |
|
1266 |
CMP_EXECS=true |
|
1267 |
fi |
|
1268 |
||
1269 |
if [ -z "$FILTER" ]; then |
|
1270 |
FILTER="$CAT" |
|
1271 |
fi |
|
1272 |
||
25854 | 1273 |
if [ "$SKIP_DEFAULT" != "true" ]; then |
1274 |
if [ -z "$OTHER" ]; then |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1275 |
echo "Nothing to compare to, set with -o" |
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1276 |
exit 1 |
25854 | 1277 |
else |
1278 |
if [ ! -d "$OTHER" ]; then |
|
1279 |
echo "Other build directory does not exist:" |
|
1280 |
echo "$OTHER" |
|
1281 |
exit 1 |
|
1282 |
fi |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1283 |
OTHER="$( cd "$OTHER" > /dev/null && pwd )" |
25854 | 1284 |
echo "Comparing to:" |
14111 | 1285 |
echo "$OTHER" |
25854 | 1286 |
echo |
14111 | 1287 |
fi |
1288 |
||
1289 |
||
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1290 |
# Find the common images to compare, prioritizing later build stages |
27560 | 1291 |
if [ -d "$THIS/install/jdk" ] && [ -d "$OTHER/install/jdk" ]; then |
29157 | 1292 |
THIS_JDK="$THIS/install/jdk" |
1293 |
THIS_JRE="$THIS/install/jre" |
|
1294 |
OTHER_JDK="$OTHER/install/jdk" |
|
1295 |
OTHER_JRE="$OTHER/install/jre" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1296 |
echo "Selecting install images for compare" |
31310 | 1297 |
elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/deploy/images/jdk" ]; then |
1298 |
THIS_JDK="$THIS/images/jdk" |
|
1299 |
THIS_JRE="$THIS/images/jre" |
|
1300 |
OTHER_JDK="$OTHER/deploy/images/jdk" |
|
1301 |
OTHER_JRE="$OTHER/deploy/images/jre" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1302 |
echo "Selecting deploy images for compare" |
27560 | 1303 |
elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then |
29157 | 1304 |
THIS_JDK="$THIS/images/jdk" |
1305 |
THIS_JRE="$THIS/images/jre" |
|
1306 |
OTHER_JDK="$OTHER/images/jdk" |
|
1307 |
OTHER_JRE="$OTHER/images/jre" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1308 |
echo "Selecting jdk images for compare" |
42288
600cfdaa270a
8170576: Silence error message in compare.sh when selecting images
ihse
parents:
41949
diff
changeset
|
1309 |
elif [ -d "$(ls -d $THIS/licensee-src/build/*/images/jdk 2> /dev/null)" ] \ |
600cfdaa270a
8170576: Silence error message in compare.sh when selecting images
ihse
parents:
41949
diff
changeset
|
1310 |
&& [ -d "$(ls -d $OTHER/licensee-src/build/*/images/jdk 2> /dev/null)" ] |
39204 | 1311 |
then |
1312 |
echo "Selecting licensee images for compare" |
|
1313 |
# Simply override the THIS and OTHER dir with the build dir from |
|
1314 |
# the nested licensee source build for the rest of the script |
|
1315 |
# execution. |
|
1316 |
OLD_THIS="$THIS" |
|
1317 |
OLD_OTHER="$OTHER" |
|
1318 |
THIS="$(ls -d $THIS/licensee-src/build/*)" |
|
1319 |
OTHER="$(ls -d $OTHER/licensee-src/build/*)" |
|
1320 |
THIS_JDK="$THIS/images/jdk" |
|
1321 |
THIS_JRE="$THIS/images/jre" |
|
1322 |
OTHER_JDK="$OTHER/images/jdk" |
|
1323 |
OTHER_JRE="$OTHER/images/jre" |
|
1324 |
# Rewrite the path to tools that are used from the build |
|
1325 |
JIMAGE="$(echo "$JIMAGE" | $SED "s|$OLD_THIS|$THIS|g")" |
|
1326 |
JAVAP="$(echo "$JAVAP" | $SED "s|$OLD_THIS|$THIS|g")" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1327 |
else |
28356 | 1328 |
echo "No common images found." |
1329 |
exit 1 |
|
14111 | 1330 |
fi |
31310 | 1331 |
echo " $THIS_JDK" |
1332 |
echo " $OTHER_JDK" |
|
14111 | 1333 |
|
31310 | 1334 |
if [ -d "$THIS/images/jdk-bundle" -o -d "$THIS/deploy/images/jdk-bundle" ] \ |
1335 |
&& [ -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
|
1336 |
if [ -d "$THIS/deploy/images/jdk-bundle" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1337 |
THIS_JDK_BUNDLE="$THIS/deploy/images/jdk-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1338 |
THIS_JRE_BUNDLE="$THIS/deploy/images/jre-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1339 |
else |
31310 | 1340 |
THIS_JDK_BUNDLE="$THIS/images/jdk-bundle" |
1341 |
THIS_JRE_BUNDLE="$THIS/images/jre-bundle" |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1342 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1343 |
if [ -d "$OTHER/deploy/images/jdk-bundle" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1344 |
OTHER_JDK_BUNDLE="$OTHER/deploy/images/jdk-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1345 |
OTHER_JRE_BUNDLE="$OTHER/deploy/images/jre-bundle" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1346 |
else |
31310 | 1347 |
OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle" |
1348 |
OTHER_JRE_BUNDLE="$OTHER/images/jre-bundle" |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1349 |
fi |
32720
7e0e586a6817
8137014: Various improvements in build infrastructure
ihse
parents:
31310
diff
changeset
|
1350 |
echo "Also comparing jdk macosx bundles" |
31310 | 1351 |
echo " $THIS_JDK_BUNDLE" |
1352 |
echo " $OTHER_JDK_BUNDLE" |
|
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1353 |
fi |
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1354 |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1355 |
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
|
1356 |
&& [ -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
|
1357 |
if [ -d "$THIS/deploy/images/bundles" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1358 |
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/images/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1359 |
else |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1360 |
THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1361 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1362 |
if [ -d "$OTHER/deploy/images/bundles" ]; then |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1363 |
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/images/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1364 |
else |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1365 |
OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1366 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1367 |
echo "Also comparing deploy javadoc bundles" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1368 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1369 |
|
31310 | 1370 |
if [ -d "$THIS/images/JavaAppletPlugin.plugin" ] \ |
1371 |
&& [ -d "$OTHER/images/JavaAppletPlugin.plugin" -o -d "$OTHER/deploy/images/JavaAppletPlugin.plugin" ]; then |
|
1372 |
if [ -d "$THIS/images/JavaAppletPlugin.plugin" ]; then |
|
1373 |
THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/images/JavaAppletPlugin.plugin" |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1374 |
else |
31310 | 1375 |
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
|
1376 |
fi |
31310 | 1377 |
if [ -d "$OTHER/images/JavaAppletPlugin.plugin" ]; then |
1378 |
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/images/JavaAppletPlugin.plugin" |
|
1379 |
else |
|
29158
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1380 |
OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/images/JavaAppletPlugin.plugin" |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1381 |
fi |
5d46751992d9
8074055: Improvements in compare.sh from build-infra
ihse
parents:
29157
diff
changeset
|
1382 |
echo "Also comparing deploy applet image" |
31310 | 1383 |
echo " $THIS_DEPLOY_APPLET_PLUGIN_DIR" |
1384 |
echo " $OTHER_DEPLOY_APPLET_PLUGIN_DIR" |
|
28356 | 1385 |
fi |
1386 |
||
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1387 |
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
|
1388 |
&& [ -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
|
1389 |
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
|
1390 |
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
|
1391 |
echo "Also comparing install sparkle framework" |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1392 |
echo " $THIS_SPARKLE_DIR" |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1393 |
echo " $OTHER_SPARKLE_DIR" |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1394 |
fi |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1395 |
|
25854 | 1396 |
if [ -d "$OTHER/images" ]; then |
1397 |
OTHER_SEC_DIR="$OTHER/images" |
|
1398 |
else |
|
1399 |
OTHER_SEC_DIR="$OTHER/tmp" |
|
1400 |
fi |
|
1401 |
OTHER_SEC_BIN="$OTHER_SEC_DIR/sec-bin.zip" |
|
1402 |
THIS_SEC_DIR="$THIS/images" |
|
1403 |
THIS_SEC_BIN="$THIS_SEC_DIR/sec-bin.zip" |
|
1404 |
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then |
|
1405 |
if [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then |
|
1406 |
JGSS_WINDOWS_BIN="jgss-windows-x64-bin.zip" |
|
1407 |
else |
|
1408 |
JGSS_WINDOWS_BIN="jgss-windows-i586-bin.zip" |
|
1409 |
fi |
|
1410 |
OTHER_SEC_WINDOWS_BIN="$OTHER_SEC_DIR/sec-windows-bin.zip" |
|
1411 |
OTHER_JGSS_WINDOWS_BIN="$OTHER_SEC_DIR/$JGSS_WINDOWS_BIN" |
|
1412 |
THIS_SEC_WINDOWS_BIN="$THIS_SEC_DIR/sec-windows-bin.zip" |
|
1413 |
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN" |
|
1414 |
fi |
|
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1415 |
|
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1416 |
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
|
1417 |
THIS_DOCS="$THIS/images/docs" |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1418 |
OTHER_DOCS="$OTHER/images/docs" |
28356 | 1419 |
echo "Also comparing docs" |
27595
cff167b3bfa2
8065914: Various improvements and cleanup of build system
ihse
parents:
25854
diff
changeset
|
1420 |
else |
25854 | 1421 |
echo "WARNING! Docs haven't been built and won't be compared." |
1422 |
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
|
1423 |
fi |
15062 | 1424 |
|
29157 | 1425 |
################################################################################ |
14111 | 1426 |
# Do the work |
1427 |
||
1428 |
if [ "$CMP_NAMES" = "true" ]; then |
|
29157 | 1429 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1430 |
echo -n "JDK " |
|
1431 |
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
|
1432 |
echo -n "JRE " |
29157 | 1433 |
compare_dirs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
28356 | 1434 |
|
29157 | 1435 |
echo -n "JDK " |
1436 |
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
|
1437 |
echo -n "JRE " |
29157 | 1438 |
compare_files $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
14111 | 1439 |
fi |
29157 | 1440 |
if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then |
1441 |
echo -n "JDK Bundle " |
|
1442 |
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
|
1443 |
echo -n "JRE Bundle " |
29157 | 1444 |
compare_dirs $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
28356 | 1445 |
|
29157 | 1446 |
echo -n "JDK Bundle " |
1447 |
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
|
1448 |
echo -n "JRE Bundle " |
29157 | 1449 |
compare_files $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
14111 | 1450 |
fi |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1451 |
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1452 |
echo -n "Docs " |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1453 |
compare_dirs $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1454 |
echo -n "Docs " |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1455 |
compare_files $THIS_DOCS $OTHER_DOCS $COMPARE_ROOT/docs |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1456 |
fi |
25854 | 1457 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1458 |
compare_dirs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1459 |
compare_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1460 |
fi |
|
28356 | 1461 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1462 |
echo -n "JavaAppletPlugin " |
|
1463 |
compare_dirs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1464 |
echo -n "JavaAppletPlugin " |
|
1465 |
compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1466 |
fi |
|
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1467 |
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
|
1468 |
echo -n "Sparkle.framework " |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1469 |
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
|
1470 |
echo -n "Sparkle.framework " |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1471 |
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
|
1472 |
fi |
14111 | 1473 |
fi |
1474 |
||
1475 |
if [ "$CMP_PERMS" = "true" ]; then |
|
29157 | 1476 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1477 |
echo -n "JDK " |
|
1478 |
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
|
1479 |
echo -n "JRE " |
29157 | 1480 |
compare_permissions $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
14111 | 1481 |
fi |
25854 | 1482 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1483 |
compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1484 |
fi |
|
28356 | 1485 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1486 |
echo -n "JavaAppletPlugin " |
|
1487 |
compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1488 |
fi |
|
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1489 |
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
|
1490 |
echo -n "Sparkle.framework " |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1491 |
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
|
1492 |
fi |
14111 | 1493 |
fi |
1494 |
||
1495 |
if [ "$CMP_TYPES" = "true" ]; then |
|
29157 | 1496 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1497 |
echo -n "JDK " |
|
1498 |
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
|
1499 |
echo -n "JRE " |
29157 | 1500 |
compare_file_types $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
14111 | 1501 |
fi |
29157 | 1502 |
if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then |
1503 |
echo -n "JDK Bundle " |
|
1504 |
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
|
1505 |
echo -n "JRE Bundle " |
29157 | 1506 |
compare_file_types $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
14111 | 1507 |
fi |
25854 | 1508 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1509 |
compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1510 |
fi |
|
28356 | 1511 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1512 |
echo -n "JavaAppletPlugin " |
|
1513 |
compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1514 |
fi |
|
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1515 |
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
|
1516 |
echo -n "Sparkle.framework " |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1517 |
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
|
1518 |
fi |
14111 | 1519 |
fi |
1520 |
||
1521 |
if [ "$CMP_GENERAL" = "true" ]; then |
|
29157 | 1522 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1523 |
echo -n "JDK " |
|
1524 |
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
|
1525 |
echo -n "JRE " |
29157 | 1526 |
compare_general_files $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
14111 | 1527 |
fi |
29157 | 1528 |
if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then |
1529 |
echo -n "JDK Bundle " |
|
1530 |
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
|
1531 |
echo -n "JRE Bundle " |
29157 | 1532 |
compare_general_files $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle |
14111 | 1533 |
fi |
14466
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1534 |
if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1535 |
echo -n "Docs " |
2f85b948660b
8003844: build-infra: docs target isn't working properly
erikj
parents:
14458
diff
changeset
|
1536 |
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
|
1537 |
fi |
25854 | 1538 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1539 |
compare_general_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1540 |
fi |
|
28356 | 1541 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1542 |
echo -n "JavaAppletPlugin " |
|
1543 |
compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1544 |
fi |
|
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1545 |
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
|
1546 |
echo -n "Sparkle.framework " |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1547 |
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
|
1548 |
fi |
14111 | 1549 |
fi |
1550 |
||
1551 |
if [ "$CMP_ZIPS" = "true" ]; then |
|
29157 | 1552 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1553 |
compare_all_zip_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
14111 | 1554 |
fi |
15062 | 1555 |
if [ -n "$THIS_SEC_BIN" ] && [ -n "$OTHER_SEC_BIN" ]; then |
1556 |
if [ -n "$(echo $THIS_SEC_BIN | $FILTER)" ]; then |
|
1557 |
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
|
1558 |
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
|
1559 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1560 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1561 |
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
|
1562 |
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
|
1563 |
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
|
1564 |
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
|
1565 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1566 |
fi |
4f8e8dd6e6d5
8005858: build-infra: Add missed comparison of sec-windows-bin.zip and friends to compare.sh
erikj
parents:
15063
diff
changeset
|
1567 |
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
|
1568 |
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
|
1569 |
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
|
1570 |
compare_zip_file $THIS_SEC_DIR $OTHER_SEC_DIR $COMPARE_ROOT/sec-bin $JGSS_WINDOWS_BIN |
15062 | 1571 |
fi |
1572 |
fi |
|
25854 | 1573 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1574 |
compare_all_zip_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1575 |
fi |
|
28356 | 1576 |
if [ -n "$THIS_DEPLOY_BUNDLE_DIR" ] && [ -n "$OTHER_DEPLOY_BUNDLE_DIR" ]; then |
1577 |
compare_all_zip_files $THIS_DEPLOY_BUNDLE_DIR $OTHER_DEPLOY_BUNDLE_DIR $COMPARE_ROOT/deploy-bundle |
|
1578 |
fi |
|
1579 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
|
1580 |
compare_all_zip_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1581 |
fi |
|
14111 | 1582 |
fi |
1583 |
||
1584 |
if [ "$CMP_JARS" = "true" ]; then |
|
29157 | 1585 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1586 |
compare_all_jar_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
14111 | 1587 |
fi |
25854 | 1588 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1589 |
compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1590 |
fi |
|
28356 | 1591 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1592 |
compare_all_jar_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1593 |
fi |
|
14111 | 1594 |
fi |
1595 |
||
1596 |
if [ "$CMP_LIBS" = "true" ]; then |
|
29157 | 1597 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1598 |
echo -n "JDK " |
|
1599 |
compare_all_libs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
14458 | 1600 |
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
|
1601 |
echo -n "JRE " |
29157 | 1602 |
compare_all_libs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
14458 | 1603 |
fi |
14111 | 1604 |
fi |
25854 | 1605 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1606 |
compare_all_libs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1607 |
fi |
|
28356 | 1608 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1609 |
echo -n "JavaAppletPlugin " |
|
1610 |
compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1611 |
fi |
|
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1612 |
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
|
1613 |
echo -n "Sparkle.framework " |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1614 |
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
|
1615 |
fi |
14111 | 1616 |
fi |
1617 |
||
1618 |
if [ "$CMP_EXECS" = "true" ]; then |
|
29157 | 1619 |
if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then |
1620 |
compare_all_execs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk |
|
28356 | 1621 |
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
|
1622 |
echo -n "JRE " |
29157 | 1623 |
compare_all_execs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre |
28356 | 1624 |
fi |
14111 | 1625 |
fi |
25854 | 1626 |
if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then |
1627 |
compare_all_execs $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir |
|
1628 |
fi |
|
28356 | 1629 |
if [ -n "$THIS_DEPLOY_APPLET_PLUGIN_DIR" ] && [ -n "$OTHER_DEPLOY_APPLET_PLUGIN_DIR" ]; then |
1630 |
echo -n "JavaAppletPlugin " |
|
1631 |
compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin |
|
1632 |
fi |
|
35744
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1633 |
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
|
1634 |
echo -n "Sparkle.framework " |
4f5e0998b6e9
8149479: Fix compare.sh to have a clean baseline with COMPARE_BUILD
erikj
parents:
35370
diff
changeset
|
1635 |
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
|
1636 |
fi |
14111 | 1637 |
fi |
1638 |
||
1639 |
echo |
|
1640 |
||
1641 |
if [ -n "$REGRESSIONS" ]; then |
|
1642 |
echo "REGRESSIONS FOUND!" |
|
1643 |
echo |
|
1644 |
exit 1 |
|
1645 |
else |
|
1646 |
echo "No regressions found" |
|
1647 |
echo |
|
1648 |
exit 0 |
|
1649 |
fi |