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