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