1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/common/autoconf/compare.sh.in Tue Sep 18 11:29:16 2012 -0700 1.3 @@ -0,0 +1,1669 @@ 1.4 +#!/bin/bash 1.5 +# 1.6 +# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 1.7 +# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 +# 1.9 +# This code is free software; you can redistribute it and/or modify it 1.10 +# under the terms of the GNU General Public License version 2 only, as 1.11 +# published by the Free Software Foundation. 1.12 +# 1.13 +# This code is distributed in the hope that it will be useful, but WITHOUT 1.14 +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1.15 +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1.16 +# version 2 for more details (a copy is included in the LICENSE file that 1.17 +# accompanied this code). 1.18 +# 1.19 +# You should have received a copy of the GNU General Public License version 1.20 +# 2 along with this work; if not, write to the Free Software Foundation, 1.21 +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1.22 +# 1.23 +# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1.24 +# or visit www.oracle.com if you need additional information or have any 1.25 +# questions. 1.26 +# 1.27 + 1.28 +# This script is processed by configure before it's usable. It is run from 1.29 +# the root of the build directory. 1.30 + 1.31 + 1.32 +########################################################################################## 1.33 +# Substitutions from autoconf 1.34 + 1.35 +LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@ 1.36 + 1.37 +OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@" 1.38 +OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@" 1.39 + 1.40 +AWK="@AWK@" 1.41 +CAT="@CAT@" 1.42 +CMP="@CMP@" 1.43 +CP="@CP@" 1.44 +CUT="@CUT@" 1.45 +DIFF="@DIFF@" 1.46 +DUMPBIN="@UNCYGDRIVE@ @DUMPBIN@" 1.47 +EXPR="@EXPR@" 1.48 +FILE="@FILE@" 1.49 +FIND="@FIND@" 1.50 +GREP="@GREP@" 1.51 +JAVAP="@UNCYGDRIVE@ @BOOT_JDK@/bin/javap" 1.52 +LDD="@LDD@" 1.53 +MKDIR="@MKDIR@" 1.54 +NM="@NM@" 1.55 +OBJDUMP="@OBJDUMP@" 1.56 +OTOOL="@OTOOL@" 1.57 +PRINTF="@PRINTF@" 1.58 +READELF="@READELF@" 1.59 +RM="@RM@" 1.60 +SED="@SED@" 1.61 +SORT="@SORT@" 1.62 +STRIP="@POST_STRIP_CMD@" 1.63 +TEE="@TEE@" 1.64 +UNIQ="@UNIQ@" 1.65 +UNZIP="@UNZIP@" 1.66 + 1.67 +SRC_ROOT="@SRC_ROOT@" 1.68 + 1.69 +if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then 1.70 + READELF_CMD="otool -v -V -h -X -t -d" 1.71 +elif [ -n "$READELF" ] && [ "$OPENJDK_TARGET_OS" != "windows" ]; then 1.72 + READELF_CMD="$READELF -a" 1.73 +fi 1.74 + 1.75 +if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then 1.76 + LDD_CMD="$OTOOL -L" 1.77 +elif [ -n "$LDD" ]; then 1.78 + LDD_CMD="$LDD" 1.79 +fi 1.80 + 1.81 +########################################################################################## 1.82 +# Diff exceptions 1.83 + 1.84 +if [ "$OPENJDK_TARGET_OS" = "linux" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then 1.85 +STRIP_BEFORE_COMPARE=" 1.86 +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so 1.87 +./demo/jvmti/gctest/lib/libgctest.so 1.88 +./demo/jvmti/heapTracker/lib/libheapTracker.so 1.89 +./demo/jvmti/heapViewer/lib/libheapViewer.so 1.90 +./demo/jvmti/hprof/lib/libhprof.so 1.91 +./demo/jvmti/minst/lib/libminst.so 1.92 +./demo/jvmti/mtrace/lib/libmtrace.so 1.93 +./demo/jvmti/versionCheck/lib/libversionCheck.so 1.94 +./demo/jvmti/waiters/lib/libwaiters.so 1.95 +" 1.96 + 1.97 +KNOWN_BIN_DIFF=" 1.98 +" 1.99 + 1.100 +ACCEPTED_BIN_DIFF=" 1.101 +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so 1.102 +./demo/jvmti/gctest/lib/libgctest.so 1.103 +./demo/jvmti/heapTracker/lib/libheapTracker.so 1.104 +./demo/jvmti/heapViewer/lib/libheapViewer.so 1.105 +./demo/jvmti/hprof/lib/libhprof.so 1.106 +./demo/jvmti/minst/lib/libminst.so 1.107 +./demo/jvmti/mtrace/lib/libmtrace.so 1.108 +./demo/jvmti/versionCheck/lib/libversionCheck.so 1.109 +./demo/jvmti/waiters/lib/libwaiters.so 1.110 +./jre/lib/amd64/libattach.so 1.111 +./jre/lib/amd64/libdt_socket.so 1.112 +./jre/lib/amd64/libhprof.so 1.113 +./jre/lib/amd64/libinstrument.so 1.114 +./jre/lib/amd64/libjava_crw_demo.so 1.115 +./jre/lib/amd64/libjsdt.so 1.116 +./jre/lib/amd64/libjsig.so 1.117 +./jre/lib/amd64/libmanagement.so 1.118 +./jre/lib/amd64/libnpt.so 1.119 +./jre/lib/amd64/libsaproc.so 1.120 +./jre/lib/amd64/libverify.so 1.121 +./jre/lib/amd64/server/libjsig.so 1.122 +./jre/lib/amd64/server/libjvm.so 1.123 +./bin/appletviewer 1.124 +./bin/extcheck 1.125 +./bin/idlj 1.126 +./bin/jar 1.127 +./bin/jarsigner 1.128 +./bin/java 1.129 +./bin/javac 1.130 +./bin/javadoc 1.131 +./bin/javah 1.132 +./bin/javap 1.133 +./bin/jcmd 1.134 +./bin/jconsole 1.135 +./bin/jdb 1.136 +./bin/jhat 1.137 +./bin/jinfo 1.138 +./bin/jmap 1.139 +./bin/jps 1.140 +./bin/jrunscript 1.141 +./bin/jsadebugd 1.142 +./bin/jstack 1.143 +./bin/jstat 1.144 +./bin/jstatd 1.145 +./bin/keytool 1.146 +./bin/native2ascii 1.147 +./bin/orbd 1.148 +./bin/pack200 1.149 +./bin/policytool 1.150 +./bin/rmic 1.151 +./bin/rmid 1.152 +./bin/rmiregistry 1.153 +./bin/schemagen 1.154 +./bin/serialver 1.155 +./bin/servertool 1.156 +./bin/tnameserv 1.157 +./bin/wsgen 1.158 +./bin/wsimport 1.159 +./bin/xjc 1.160 +./jre/bin/java 1.161 +./jre/bin/keytool 1.162 +./jre/bin/orbd 1.163 +./jre/bin/pack200 1.164 +./jre/bin/policytool 1.165 +./jre/bin/rmid 1.166 +./jre/bin/rmiregistry 1.167 +./jre/bin/servertool 1.168 +./jre/bin/tnameserv 1.169 +" 1.170 + 1.171 +KNOWN_SIZE_DIFF=" 1.172 +" 1.173 + 1.174 +KNOWN_SYM_DIFF=" 1.175 +" 1.176 + 1.177 +KNOWN_ELF_DIFF=" 1.178 +./demo/jvmti/heapTracker/lib/libheapTracker.so 1.179 +./demo/jvmti/hprof/lib/libhprof.so 1.180 +./demo/jvmti/waiters/lib/libwaiters.so 1.181 +" 1.182 +fi 1.183 + 1.184 +if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86" ]; then 1.185 + 1.186 +STRIP_BEFORE_COMPARE=" 1.187 +./demo/jni/Poller/lib/libPoller.so 1.188 +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so 1.189 +./demo/jvmti/gctest/lib/libgctest.so 1.190 +./demo/jvmti/heapTracker/lib/libheapTracker.so 1.191 +./demo/jvmti/heapViewer/lib/libheapViewer.so 1.192 +./demo/jvmti/hprof/lib/libhprof.so 1.193 +./demo/jvmti/minst/lib/libminst.so 1.194 +./demo/jvmti/mtrace/lib/libmtrace.so 1.195 +./demo/jvmti/versionCheck/lib/libversionCheck.so 1.196 +./demo/jvmti/waiters/lib/libwaiters.so 1.197 +./jre/lib/i386/jexec 1.198 +" 1.199 + 1.200 +SORT_SYMBOLS=" 1.201 +./jre/lib/i386/client/libjvm.so 1.202 +./jre/lib/i386/server/libjvm.so 1.203 +" 1.204 + 1.205 +SKIP_BIN_DIFF="true" 1.206 + 1.207 +ACCEPTED_SMALL_SIZE_DIFF=" 1.208 +./demo/jni/Poller/lib/libPoller.so 1.209 +./demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so 1.210 +./demo/jvmti/gctest/lib/libgctest.so 1.211 +./demo/jvmti/heapTracker/lib/libheapTracker.so 1.212 +./demo/jvmti/heapViewer/lib/libheapViewer.so 1.213 +./demo/jvmti/hprof/lib/libhprof.so 1.214 +./demo/jvmti/minst/lib/libminst.so 1.215 +./demo/jvmti/mtrace/lib/libmtrace.so 1.216 +./demo/jvmti/versionCheck/lib/libversionCheck.so 1.217 +./demo/jvmti/waiters/lib/libwaiters.so 1.218 +./jre/lib/i386/client/libjvm.so 1.219 +./jre/lib/i386/jli/libjli.so 1.220 +./jre/lib/i386/libJdbcOdbc.so 1.221 +./jre/lib/i386/libattach.so 1.222 +./jre/lib/i386/libawt.so 1.223 +./jre/lib/i386/libawt_headless.so 1.224 +./jre/lib/i386/libawt_xawt.so 1.225 +./jre/lib/i386/libdcpr.so 1.226 +./jre/lib/i386/libdt_socket.so 1.227 +./jre/lib/i386/libfontmanager.so 1.228 +./jre/lib/i386/libhprof.so 1.229 +./jre/lib/i386/libinstrument.so 1.230 +./jre/lib/i386/libj2gss.so 1.231 +./jre/lib/i386/libj2pcsc.so 1.232 +./jre/lib/i386/libj2pkcs11.so 1.233 +./jre/lib/i386/libj2ucrypto.so 1.234 +./jre/lib/i386/libjaas_unix.so 1.235 +./jre/lib/i386/libjava.so 1.236 +./jre/lib/i386/libjava_crw_demo.so 1.237 +./jre/lib/i386/libjawt.so 1.238 +./jre/lib/i386/libjdwp.so 1.239 +./jre/lib/i386/libjfr.so 1.240 +./jre/lib/i386/libjpeg.so 1.241 +./jre/lib/i386/libjsdt.so 1.242 +./jre/lib/i386/libjsound.so 1.243 +./jre/lib/i386/libkcms.so 1.244 +./jre/lib/i386/libmanagement.so 1.245 +./jre/lib/i386/libmlib_image.so 1.246 +./jre/lib/i386/libnet.so 1.247 +./jre/lib/i386/libnio.so 1.248 +./jre/lib/i386/libnpt.so 1.249 +./jre/lib/i386/libsctp.so 1.250 +./jre/lib/i386/libsplashscreen.so 1.251 +./jre/lib/i386/libsunec.so 1.252 +./jre/lib/i386/libsunwjdga.so 1.253 +./jre/lib/i386/libt2k.so 1.254 +./jre/lib/i386/libunpack.so 1.255 +./jre/lib/i386/libverify.so 1.256 +./jre/lib/i386/libzip.so 1.257 +./jre/lib/i386/server/libjvm.so 1.258 +./bin/appletviewer 1.259 +./bin/extcheck 1.260 +./bin/idlj 1.261 +./bin/jar 1.262 +./bin/jarsigner 1.263 +./bin/java 1.264 +./bin/javac 1.265 +./bin/javadoc 1.266 +./bin/javah 1.267 +./bin/javap 1.268 +./bin/jcmd 1.269 +./bin/jconsole 1.270 +./bin/jdb 1.271 +./bin/jhat 1.272 +./bin/jinfo 1.273 +./bin/jmap 1.274 +./bin/jps 1.275 +./bin/jrunscript 1.276 +./bin/jsadebugd 1.277 +./bin/jstack 1.278 +./bin/jstat 1.279 +./bin/jstatd 1.280 +./bin/keytool 1.281 +./bin/native2ascii 1.282 +./bin/orbd 1.283 +./bin/pack200 1.284 +./bin/policytool 1.285 +./bin/rmic 1.286 +./bin/rmid 1.287 +./bin/rmiregistry 1.288 +./bin/schemagen 1.289 +./bin/serialver 1.290 +./bin/servertool 1.291 +./bin/tnameserv 1.292 +./bin/unpack200 1.293 +./bin/wsgen 1.294 +./bin/wsimport 1.295 +./bin/xjc 1.296 +./jre/bin/java 1.297 +./jre/bin/keytool 1.298 +./jre/bin/orbd 1.299 +./jre/bin/pack200 1.300 +./jre/bin/policytool 1.301 +./jre/bin/rmid 1.302 +./jre/bin/rmiregistry 1.303 +./jre/bin/servertool 1.304 +./jre/bin/tnameserv 1.305 +./jre/bin/unpack200 1.306 +./jre/lib/i386/jexec 1.307 +" 1.308 + 1.309 +SKIP_ELF_DIFF="true" 1.310 + 1.311 +# libjvm.so differs in the random 15 char prefix on some symbols. 1.312 +ACCEPTED_DIS_DIFF=" 1.313 +./jre/lib/i386/client/libjvm.so 1.314 +./jre/lib/i386/server/libjvm.so 1.315 +" 1.316 + 1.317 +fi 1.318 + 1.319 +if [ "$OPENJDK_TARGET_OS" = "solaris" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then 1.320 + 1.321 +STRIP_BEFORE_COMPARE=" 1.322 +./demo/jni/Poller/lib/amd64/libPoller.so 1.323 +./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so 1.324 +./demo/jvmti/gctest/lib/amd64/libgctest.so 1.325 +./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so 1.326 +./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so 1.327 +./demo/jvmti/hprof/lib/amd64/libhprof.so 1.328 +./demo/jvmti/minst/lib/amd64/libminst.so 1.329 +./demo/jvmti/mtrace/lib/amd64/libmtrace.so 1.330 +./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so 1.331 +./demo/jvmti/waiters/lib/amd64/libwaiters.so 1.332 +" 1.333 + 1.334 +SORT_SYMBOLS=" 1.335 +./jre/lib/amd64/server/libjvm.so 1.336 +" 1.337 + 1.338 +SKIP_BIN_DIFF="true" 1.339 + 1.340 +ACCEPTED_SMALL_SIZE_DIFF=" 1.341 +./demo/jni/Poller/lib/amd64/libPoller.so 1.342 +./demo/jvmti/compiledMethodLoad/lib/amd64/libcompiledMethodLoad.so 1.343 +./demo/jvmti/gctest/lib/amd64/libgctest.so 1.344 +./demo/jvmti/heapTracker/lib/amd64/libheapTracker.so 1.345 +./demo/jvmti/heapViewer/lib/amd64/libheapViewer.so 1.346 +./demo/jvmti/hprof/lib/amd64/libhprof.so 1.347 +./demo/jvmti/minst/lib/amd64/libminst.so 1.348 +./demo/jvmti/mtrace/lib/amd64/libmtrace.so 1.349 +./demo/jvmti/versionCheck/lib/amd64/libversionCheck.so 1.350 +./demo/jvmti/waiters/lib/amd64/libwaiters.so 1.351 +./jre/lib/amd64/jli/libjli.so 1.352 +./jre/lib/amd64/libJdbcOdbc.so 1.353 +./jre/lib/amd64/libattach.so 1.354 +./jre/lib/amd64/libawt.so 1.355 +./jre/lib/amd64/libawt_headless.so 1.356 +./jre/lib/amd64/libawt_xawt.so 1.357 +./jre/lib/amd64/libdcpr.so 1.358 +./jre/lib/amd64/libdt_socket.so 1.359 +./jre/lib/amd64/libfontmanager.so 1.360 +./jre/lib/amd64/libhprof.so 1.361 +./jre/lib/amd64/libinstrument.so 1.362 +./jre/lib/amd64/libj2gss.so 1.363 +./jre/lib/amd64/libj2pcsc.so 1.364 +./jre/lib/amd64/libj2pkcs11.so 1.365 +./jre/lib/amd64/libj2ucrypto.so 1.366 +./jre/lib/amd64/libjaas_unix.so 1.367 +./jre/lib/amd64/libjava.so 1.368 +./jre/lib/amd64/libjava_crw_demo.so 1.369 +./jre/lib/amd64/libjawt.so 1.370 +./jre/lib/amd64/libjdwp.so 1.371 +./jre/lib/amd64/libjfr.so 1.372 +./jre/lib/amd64/libjpeg.so 1.373 +./jre/lib/amd64/libjsdt.so 1.374 +./jre/lib/amd64/libjsound.so 1.375 +./jre/lib/amd64/libkcms.so 1.376 +./jre/lib/amd64/libmanagement.so 1.377 +./jre/lib/amd64/libmlib_image.so 1.378 +./jre/lib/amd64/libnet.so 1.379 +./jre/lib/amd64/libnio.so 1.380 +./jre/lib/amd64/libnpt.so 1.381 +./jre/lib/amd64/libsctp.so 1.382 +./jre/lib/amd64/libsplashscreen.so 1.383 +./jre/lib/amd64/libsunec.so 1.384 +./jre/lib/amd64/libsunwjdga.so 1.385 +./jre/lib/amd64/libt2k.so 1.386 +./jre/lib/amd64/libunpack.so 1.387 +./jre/lib/amd64/libverify.so 1.388 +./jre/lib/amd64/libzip.so 1.389 +./jre/lib/amd64/server/64/libjvm_db.so 1.390 +./jre/lib/amd64/server/64/libjvm_dtrace.so 1.391 +./bin/amd64/appletviewer 1.392 +./bin/amd64/extcheck 1.393 +./bin/amd64/idlj 1.394 +./bin/amd64/jar 1.395 +./bin/amd64/jarsigner 1.396 +./bin/amd64/java 1.397 +./bin/amd64/javac 1.398 +./bin/amd64/javadoc 1.399 +./bin/amd64/javah 1.400 +./bin/amd64/javap 1.401 +./bin/amd64/jcmd 1.402 +./bin/amd64/jconsole 1.403 +./bin/amd64/jdb 1.404 +./bin/amd64/jhat 1.405 +./bin/amd64/jinfo 1.406 +./bin/amd64/jmap 1.407 +./bin/amd64/jps 1.408 +./bin/amd64/jrunscript 1.409 +./bin/amd64/jsadebugd 1.410 +./bin/amd64/jstack 1.411 +./bin/amd64/jstat 1.412 +./bin/amd64/jstatd 1.413 +./bin/amd64/keytool 1.414 +./bin/amd64/native2ascii 1.415 +./bin/amd64/orbd 1.416 +./bin/amd64/pack200 1.417 +./bin/amd64/policytool 1.418 +./bin/amd64/rmic 1.419 +./bin/amd64/rmid 1.420 +./bin/amd64/rmiregistry 1.421 +./bin/amd64/schemagen 1.422 +./bin/amd64/serialver 1.423 +./bin/amd64/servertool 1.424 +./bin/amd64/tnameserv 1.425 +./bin/amd64/unpack200 1.426 +./bin/amd64/wsgen 1.427 +./bin/amd64/wsimport 1.428 +./bin/amd64/xjc 1.429 +./jre/bin/amd64/java 1.430 +./jre/bin/amd64/keytool 1.431 +./jre/bin/amd64/orbd 1.432 +./jre/bin/amd64/pack200 1.433 +./jre/bin/amd64/policytool 1.434 +./jre/bin/amd64/rmid 1.435 +./jre/bin/amd64/rmiregistry 1.436 +./jre/bin/amd64/servertool 1.437 +./jre/bin/amd64/tnameserv 1.438 +./jre/bin/amd64/unpack200 1.439 +./jre/lib/amd64/jexec 1.440 +" 1.441 + 1.442 +SKIP_ELF_DIFF="true" 1.443 + 1.444 +# Can't find an explaination for the diff in libmlib_image.so. 1.445 +KNOWN_DIS_DIFF=" 1.446 +./jre/lib/amd64/libmlib_image.so 1.447 +" 1.448 +# libjvm.so differs in the random 15 char prefix on some symbols. 1.449 +ACCEPTED_DIS_DIFF=" 1.450 +./jre/lib/amd64/server/libjvm.so 1.451 +" 1.452 + 1.453 +fi 1.454 + 1.455 +if [ "$OPENJDK_TARGET_OS" = "windows" ] && [ "$OPENJDK_TARGET_CPU" = "x86_64" ]; then 1.456 + 1.457 +ACCEPTED_BIN_DIFF=" 1.458 +./bin/jli.dll 1.459 +./demo/jvmti/compiledMethodLoad/lib/compiledMethodLoad.dll 1.460 +./demo/jvmti/gctest/lib/gctest.dll 1.461 +./demo/jvmti/heapTracker/lib/heapTracker.dll 1.462 +./demo/jvmti/heapViewer/lib/heapViewer.dll 1.463 +./demo/jvmti/hprof/lib/hprof.dll 1.464 +./demo/jvmti/minst/lib/minst.dll 1.465 +./demo/jvmti/mtrace/lib/mtrace.dll 1.466 +./demo/jvmti/versionCheck/lib/versionCheck.dll 1.467 +./demo/jvmti/waiters/lib/waiters.dll 1.468 +./jre/bin/attach.dll 1.469 +./jre/bin/awt.dll 1.470 +./jre/bin/dcpr.dll 1.471 +./jre/bin/dt_shmem.dll 1.472 +./jre/bin/dt_socket.dll 1.473 +./jre/bin/fontmanager.dll 1.474 +./jre/bin/hprof.dll 1.475 +./jre/bin/instrument.dll 1.476 +./jre/bin/j2pcsc.dll 1.477 +./jre/bin/j2pkcs11.dll 1.478 +./jre/bin/jaas_nt.dll 1.479 +./jre/bin/java.dll 1.480 +./jre/bin/java_crw_demo.dll 1.481 +./jre/bin/jawt.dll 1.482 +./jre/bin/JdbcOdbc.dll 1.483 +./jre/bin/jdwp.dll 1.484 +./jre/bin/jfr.dll 1.485 +./jre/bin/jli.dll 1.486 +./jre/bin/jpeg.dll 1.487 +./jre/bin/jsdt.dll 1.488 +./jre/bin/jsound.dll 1.489 +./jre/bin/jsoundds.dll 1.490 +./jre/bin/kcms.dll 1.491 +./jre/bin/management.dll 1.492 +./jre/bin/mlib_image.dll 1.493 +./jre/bin/net.dll 1.494 +./jre/bin/nio.dll 1.495 +./jre/bin/npt.dll 1.496 +./jre/bin/sawindbg.dll 1.497 +./jre/bin/server/jvm.dll 1.498 +./jre/bin/splashscreen.dll 1.499 +./jre/bin/sunec.dll 1.500 +./jre/bin/sunmscapi.dll 1.501 +./jre/bin/t2k.dll 1.502 +./jre/bin/unpack.dll 1.503 +./jre/bin/verify.dll 1.504 +./jre/bin/w2k_lsa_auth.dll 1.505 +./jre/bin/zip.dll 1.506 +./bin/appletviewer.exe 1.507 +./bin/extcheck.exe 1.508 +./bin/idlj.exe 1.509 +./bin/jar.exe 1.510 +./bin/jarsigner.exe 1.511 +./bin/java.exe 1.512 +./bin/javac.exe 1.513 +./bin/javadoc.exe 1.514 +./bin/javah.exe 1.515 +./bin/javap.exe 1.516 +./bin/java-rmi.exe 1.517 +./bin/javaw.exe 1.518 +./bin/jcmd.exe 1.519 +./bin/jconsole.exe 1.520 +./bin/jdb.exe 1.521 +./bin/jhat.exe 1.522 +./bin/jinfo.exe 1.523 +./bin/jmap.exe 1.524 +./bin/jps.exe 1.525 +./bin/jrunscript.exe 1.526 +./bin/jsadebugd.exe 1.527 +./bin/jstack.exe 1.528 +./bin/jstat.exe 1.529 +./bin/jstatd.exe 1.530 +./bin/keytool.exe 1.531 +./bin/kinit.exe 1.532 +./bin/klist.exe 1.533 +./bin/ktab.exe 1.534 +./bin/native2ascii.exe 1.535 +./bin/orbd.exe 1.536 +./bin/pack200.exe 1.537 +./bin/policytool.exe 1.538 +./bin/rmic.exe 1.539 +./bin/rmid.exe 1.540 +./bin/rmiregistry.exe 1.541 +./bin/schemagen.exe 1.542 +./bin/serialver.exe 1.543 +./bin/servertool.exe 1.544 +./bin/tnameserv.exe 1.545 +./bin/unpack200.exe 1.546 +./bin/wsgen.exe 1.547 +./bin/wsimport.exe 1.548 +./bin/xjc.exe 1.549 +./jre/bin/java.exe 1.550 +./jre/bin/java-rmi.exe 1.551 +./jre/bin/javaw.exe 1.552 +./jre/bin/keytool.exe 1.553 +./jre/bin/kinit.exe 1.554 +./jre/bin/klist.exe 1.555 +./jre/bin/ktab.exe 1.556 +./jre/bin/orbd.exe 1.557 +./jre/bin/pack200.exe 1.558 +./jre/bin/policytool.exe 1.559 +./jre/bin/rmid.exe 1.560 +./jre/bin/rmiregistry.exe 1.561 +./jre/bin/servertool.exe 1.562 +./jre/bin/tnameserv.exe 1.563 +./jre/bin/unpack200.exe 1.564 +" 1.565 + 1.566 +KNOWN_SIZE_DIFF=" 1.567 +./demo/jvmti/heapTracker/lib/heapTracker.dll 1.568 +./demo/jvmti/minst/lib/minst.dll 1.569 +./jre/bin/awt.dll 1.570 +./jre/bin/java_crw_demo.dll 1.571 +./bin/java.exe 1.572 +./bin/javaw.exe 1.573 +./bin/unpack200.exe 1.574 +./jre/bin/java.exe 1.575 +./jre/bin/javaw.exe 1.576 +./jre/bin/unpack200.exe 1.577 +" 1.578 + 1.579 +KNOWN_SYM_DIFF=" 1.580 +./jre/bin/awt.dll 1.581 +./jre/bin/java_crw_demo.dll 1.582 +" 1.583 +fi 1.584 + 1.585 + 1.586 + 1.587 +if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then 1.588 +ACCEPTED_JARZIP_CONTENTS=" 1.589 +/META-INF/INDEX.LIST 1.590 +" 1.591 + 1.592 +KNOWN_BIN_DIFF=" 1.593 +./jre/lib/libJObjC.dylib 1.594 +./jre/lib/libsaproc.dylib 1.595 +./jre/lib/server/libjvm.dylib 1.596 +" 1.597 + 1.598 +ACCEPTED_BIN_DIFF=" 1.599 +./bin/appletviewer 1.600 +./bin/extcheck 1.601 +./bin/idlj 1.602 +./bin/jar 1.603 +./bin/jarsigner 1.604 +./bin/java 1.605 +./bin/javac 1.606 +./bin/javadoc 1.607 +./bin/javah 1.608 +./bin/javap 1.609 +./bin/jcmd 1.610 +./bin/jconsole 1.611 +./bin/jdb 1.612 +./bin/jhat 1.613 +./bin/jinfo 1.614 +./bin/jmap 1.615 +./bin/jps 1.616 +./bin/jrunscript 1.617 +./bin/jsadebugd 1.618 +./bin/jstack 1.619 +./bin/jstat 1.620 +./bin/jstatd 1.621 +./bin/keytool 1.622 +./bin/native2ascii 1.623 +./bin/orbd 1.624 +./bin/pack200 1.625 +./bin/policytool 1.626 +./bin/rmic 1.627 +./bin/rmid 1.628 +./bin/rmiregistry 1.629 +./bin/schemagen 1.630 +./bin/serialver 1.631 +./bin/servertool 1.632 +./bin/tnameserv 1.633 +./bin/wsgen 1.634 +./bin/wsimport 1.635 +./bin/xjc 1.636 +./jre/bin/java 1.637 +./jre/bin/keytool 1.638 +./jre/bin/orbd 1.639 +./jre/bin/pack200 1.640 +./jre/bin/policytool 1.641 +./jre/bin/rmid 1.642 +./jre/bin/rmiregistry 1.643 +./jre/bin/servertool 1.644 +./jre/bin/tnameserv 1.645 +" 1.646 + 1.647 +KNOWN_SIZE_DIFF=" 1.648 +./jre/lib/libJObjC.dylib 1.649 +./jre/lib/server/libjvm.dylib 1.650 +" 1.651 + 1.652 +KNOWN_SYM_DIFF=" 1.653 +./jre/lib/libJObjC.dylib 1.654 +./jre/lib/server/libjvm.dylib 1.655 +" 1.656 + 1.657 +KNOWN_ELF_DIFF=" 1.658 +./jre/lib/libJObjC.dylib 1.659 +./jre/lib/server/libjvm.dylib 1.660 +" 1.661 + 1.662 +SKIP_DIS_DIFF="true" 1.663 + 1.664 +fi 1.665 + 1.666 +########################################################################################## 1.667 +# Compare text files and ignore specific differences: 1.668 +# 1.669 +# * Timestamps in Java sources generated by idl2java 1.670 +# * Sorting order and cleanup style in .properties files 1.671 + 1.672 +diff_text() { 1.673 + OTHER_FILE=$1 1.674 + THIS_FILE=$2 1.675 + 1.676 + SUFFIX="${THIS_FILE##*.}" 1.677 + 1.678 + TMP=1 1.679 + 1.680 + if [[ "$THIS_FILE" = *"META-INF/MANIFEST.MF" ]]; then 1.681 + TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \ 1.682 + $GREP '^[<>]' | \ 1.683 + $SED -e '/[<>] Ant-Version: Apache Ant .*/d' \ 1.684 + -e '/[<>] Created-By: .* (Oracle Corporation).*/d') 1.685 + fi 1.686 + if test "x$SUFFIX" = "xjava"; then 1.687 + TMP=$(LANG=C $DIFF $OTHER_FILE $THIS_FILE | \ 1.688 + $GREP '^[<>]' | \ 1.689 + $SED -e '/[<>] \* from.*\.idl/d' \ 1.690 + -e '/[<>] \*.*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \ 1.691 + -e '/[<>] \*.*[0-9]\{4\} [0-9][0-9]*:[0-9]\{2\}:[0-9]\{2\}.*/d' \ 1.692 + -e '/\/\/ Generated from input file.*/d' \ 1.693 + -e '/\/\/ This file was generated AUTOMATICALLY from a template file.*/d' \ 1.694 + -e '/\/\/ java GenerateCharacter.*/d') 1.695 + fi 1.696 + # Ignore date strings in class files. 1.697 + # On Macosx the system sources for generated java classes produce different output on 1.698 + # consequtive invokations seemingly randomly. 1.699 + # For example a method parameter randomly named "thePoint" or "aPoint". Ignore this. 1.700 + if test "x$SUFFIX" = "xclass"; then 1.701 + $JAVAP -c -constants -l -p ${OTHER_FILE} > ${OTHER_FILE}.javap 1.702 + $JAVAP -c -constants -l -p ${THIS_FILE} > ${THIS_FILE}.javap 1.703 + TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \ 1.704 + $GREP '^[<>]' | \ 1.705 + $SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \ 1.706 + -e '/[<>].*Point Lcom\/apple\/jobjc\/foundation\/NSPoint;/d' \ 1.707 + -e '/[<>].*public com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*itemsPtr();/d' \ 1.708 + -e '/[<>].*public void setItemsPtr(com\.apple\.jobjc\.Pointer<com\.apple\.jobjc\..*);/d') 1.709 + fi 1.710 + if test "x$SUFFIX" = "xproperties"; then 1.711 + $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \ 1.712 + | $SED -f "$SRC_ROOT/common/bin/unicode2x.sed" \ 1.713 + | $SED -e '/^#/d' -e '/^$/d' \ 1.714 + -e :a -e '/\\$/N; s/\\\n//; ta' \ 1.715 + -e 's/^[ \t]*//;s/[ \t]*$//' \ 1.716 + -e 's/\\=/=/' | LANG=C $SORT > $OTHER_FILE.cleaned 1.717 + TMP=$(LANG=C $DIFF $OTHER_FILE.cleaned $THIS_FILE) 1.718 + fi 1.719 + if test -n "$TMP"; then 1.720 + echo Files $OTHER_FILE and $THIS_FILE differ 1.721 + return 1 1.722 + fi 1.723 + 1.724 + return 0 1.725 +} 1.726 + 1.727 +########################################################################################## 1.728 +# Compare directory structure 1.729 + 1.730 +compare_dirs() { 1.731 + THIS_DIR=$1 1.732 + OTHER_DIR=$2 1.733 + WORK_DIR=$3 1.734 + 1.735 + mkdir -p $WORK_DIR 1.736 + 1.737 + (cd $OTHER_DIR && $FIND . -type d | $SORT > $WORK_DIR/other_dirs) 1.738 + (cd $THIS_DIR && $FIND . -type d | $SORT > $WORK_DIR/this_dirs) 1.739 + 1.740 + echo -n Directory structure... 1.741 + if $DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs > /dev/null; then 1.742 + echo Identical! 1.743 + else 1.744 + echo Differences found. 1.745 + REGRESSIONS=true 1.746 + # Differences in directories found. 1.747 + ONLY_OTHER=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '<') 1.748 + if [ "$ONLY_OTHER" ]; then 1.749 + echo Only in $OTHER 1.750 + echo $ONLY_OTHER | $SED 's|< ./|\t|g' | $SED 's/ /\n/g' 1.751 + fi 1.752 + # Differences in directories found. 1.753 + ONLY_THIS=$($DIFF $WORK_DIR/other_dirs $WORK_DIR/this_dirs | $GREP '>') 1.754 + if [ "$ONLY_THIS" ]; then 1.755 + echo Only in $THIS 1.756 + echo $ONLY_THIS | $SED 's|> ./|\t|g' | $SED 's/ /\n/g' 1.757 + fi 1.758 + fi 1.759 +} 1.760 + 1.761 + 1.762 +########################################################################################## 1.763 +# Compare file structure 1.764 + 1.765 +compare_files() { 1.766 + THIS_DIR=$1 1.767 + OTHER_DIR=$2 1.768 + WORK_DIR=$3 1.769 + 1.770 + mkdir -p $WORK_DIR 1.771 + 1.772 + (cd $OTHER_DIR && $FIND . -type f | $SORT > $WORK_DIR/other_files) 1.773 + (cd $THIS_DIR && $FIND . -type f | $SORT > $WORK_DIR/this_files) 1.774 + 1.775 + echo -n File names... 1.776 + if diff $WORK_DIR/other_files $WORK_DIR/this_files > /dev/null; then 1.777 + echo Identical! 1.778 + else 1.779 + echo Differences found. 1.780 + REGRESSIONS=true 1.781 + # Differences in directories found. 1.782 + ONLY_OTHER=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '<') 1.783 + if [ "$ONLY_OTHER" ]; then 1.784 + echo Only in $OTHER 1.785 + echo "$ONLY_OTHER" | sed 's|< ./| |g' 1.786 + fi 1.787 + # Differences in directories found. 1.788 + ONLY_THIS=$(diff $WORK_DIR/other_files $WORK_DIR/this_files | $GREP '>') 1.789 + if [ "$ONLY_THIS" ]; then 1.790 + echo Only in $THIS 1.791 + echo "$ONLY_THIS" | sed 's|> ./| |g' 1.792 + fi 1.793 + fi 1.794 +} 1.795 + 1.796 + 1.797 +########################################################################################## 1.798 +# Compare permissions 1.799 + 1.800 +compare_permissions() { 1.801 + THIS_DIR=$1 1.802 + OTHER_DIR=$2 1.803 + WORK_DIR=$3 1.804 + 1.805 + mkdir -p $WORK_DIR 1.806 + 1.807 + echo -n Permissions... 1.808 + found="" 1.809 + for f in `cd $OTHER_DIR && $FIND . -type f` 1.810 + do 1.811 + if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi 1.812 + if [ ! -f ${THIS_DIR}/$f ]; then continue; fi 1.813 + OP=`ls -l ${OTHER_DIR}/$f | awk '{printf("%.10s\n", $1);}'` 1.814 + TP=`ls -l ${THIS_DIR}/$f | awk '{printf("%.10s\n", $1);}'` 1.815 + if [ "$OP" != "$TP" ] 1.816 + then 1.817 + if [ -z "$found" ]; then echo ; found="yes"; fi 1.818 + $PRINTF "\told: ${OP} new: ${TP}\t$f\n" 1.819 + fi 1.820 + done 1.821 + if [ -z "$found" ]; then 1.822 + echo "Identical!" 1.823 + else 1.824 + REGRESSIONS=true 1.825 + fi 1.826 +} 1.827 + 1.828 +########################################################################################## 1.829 +# Compare file command output 1.830 + 1.831 +compare_file_types() { 1.832 + THIS_DIR=$1 1.833 + OTHER_DIR=$2 1.834 + WORK_DIR=$3 1.835 + 1.836 + $MKDIR -p $WORK_DIR 1.837 + 1.838 + echo -n File types... 1.839 + found="" 1.840 + for f in `cd $OTHER_DIR && $FIND . -type f` 1.841 + do 1.842 + if [ ! -f ${OTHER_DIR}/$f ]; then continue; fi 1.843 + if [ ! -f ${THIS_DIR}/$f ]; then continue; fi 1.844 + OF=`cd ${OTHER_DIR} && $FILE $f` 1.845 + TF=`cd ${THIS_DIR} && $FILE $f` 1.846 + if [ "$f" = "./src.zip" ] || [ "$f" = "./jre/lib/JObjC.jar" ] || [ "$f" = "./lib/JObjC.jar" ] 1.847 + then 1.848 + if [ "`echo $OF | $GREP -ic zip`" -gt 0 -a "`echo $TF | $GREP -ic zip`" -gt 0 ] 1.849 + then 1.850 + # the way we produces zip-files make it so that directories are stored in old file 1.851 + # but not in new (only files with full-path) 1.852 + # this makes file-5.09 report them as different 1.853 + continue; 1.854 + fi 1.855 + fi 1.856 + 1.857 + if [ "$OF" != "$TF" ] 1.858 + then 1.859 + if [ -z "$found" ]; then echo ; found="yes"; fi 1.860 + $PRINTF "\tother: ${OF}\n\tthis : ${TF}\n" 1.861 + fi 1.862 + done 1.863 + if [ -z "$found" ]; then 1.864 + echo "Identical!" 1.865 + else 1.866 + REGRESSIONS=true 1.867 + fi 1.868 +} 1.869 + 1.870 +########################################################################################## 1.871 +# Compare the rest of the files 1.872 + 1.873 +compare_general_files() { 1.874 + THIS_DIR=$1 1.875 + OTHER_DIR=$2 1.876 + WORK_DIR=$3 1.877 + 1.878 + GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \ 1.879 + ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \ 1.880 + ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \ 1.881 + ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \ 1.882 + ! -name "*.lib" \ 1.883 + | $GREP -v "./bin/" | $SORT | $FILTER) 1.884 + 1.885 + echo General files... 1.886 + for f in $GENERAL_FILES 1.887 + do 1.888 + if [ -e $OTHER_DIR/$f ]; then 1.889 + DIFF_OUT=$($DIFF $OTHER_DIR/$f $THIS_DIR/$f 2>&1) 1.890 + if [ -n "$DIFF_OUT" ]; then 1.891 + echo $f 1.892 + REGRESSIONS=true 1.893 + if [ "$SHOW_DIFFS" = "true" ]; then 1.894 + echo "$DIFF_OUT" 1.895 + fi 1.896 + fi 1.897 + fi 1.898 + done 1.899 + 1.900 + 1.901 +} 1.902 + 1.903 +########################################################################################## 1.904 +# Compare zip file 1.905 + 1.906 +compare_zip_file() { 1.907 + THIS_DIR=$1 1.908 + OTHER_DIR=$2 1.909 + WORK_DIR=$3 1.910 + ZIP_FILE=$4 1.911 + 1.912 + THIS_ZIP=$THIS_DIR/$ZIP_FILE 1.913 + OTHER_ZIP=$OTHER_DIR/$ZIP_FILE 1.914 + 1.915 + THIS_SUFFIX="${THIS_ZIP##*.}" 1.916 + OTHER_SUFFIX="${OTHER_ZIP##*.}" 1.917 + if [ "$THIS_SUFFIX" != "$OTHER_SUFFIX" ]; then 1.918 + echo The files do not have the same suffix type! 1.919 + return 2 1.920 + fi 1.921 + 1.922 + UNARCHIVE="$UNZIP -q" 1.923 + 1.924 + TYPE="$THIS_SUFFIX" 1.925 + 1.926 + if $CMP $OTHER_ZIP $THIS_ZIP > /dev/null 1.927 + then 1.928 + return 0 1.929 + fi 1.930 + # Not quite identical, the might still contain the same data. 1.931 + # Unpack the jar/zip files in temp dirs 1.932 + 1.933 + THIS_UNZIPDIR=$WORK_DIR/$ZIP_FILE.this 1.934 + OTHER_UNZIPDIR=$WORK_DIR/$ZIP_FILE.other 1.935 + $RM -rf $THIS_UNZIPDIR $OTHER_UNZIPDIR 1.936 + $MKDIR -p $THIS_UNZIPDIR 1.937 + $MKDIR -p $OTHER_UNZIPDIR 1.938 + (cd $THIS_UNZIPDIR && $UNARCHIVE $THIS_ZIP) 1.939 + (cd $OTHER_UNZIPDIR && $UNARCHIVE $OTHER_ZIP) 1.940 + 1.941 + CONTENTS_DIFF_FILE=$WORK_DIR/$ZIP_FILE.diff 1.942 + LANG=C $DIFF -rq $OTHER_UNZIPDIR $THIS_UNZIPDIR > $CONTENTS_DIFF_FILE 1.943 + 1.944 + ONLY_OTHER=$($GREP "^Only in $OTHER_UNZIPDIR" $CONTENTS_DIFF_FILE) 1.945 + ONLY_THIS=$($GREP "^Only in $THIS_UNZIPDIR" $CONTENTS_DIFF_FILE) 1.946 + 1.947 + return_value=0 1.948 + 1.949 + if [ -n "$ONLY_OTHER" ]; then 1.950 + echo " Only OTHER $ZIP_FILE contains:" 1.951 + echo "$ONLY_OTHER" | sed "s|Only in $OTHER_UNZIPDIR| |"g | sed 's|: |/|g' 1.952 + return_value=1 1.953 + fi 1.954 + 1.955 + if [ -n "$ONLY_THIS" ]; then 1.956 + echo " Only THIS $ZIP_FILE contains:" 1.957 + echo "$ONLY_THIS" | sed "s|Only in $THIS_UNZIPDIR| |"g | sed 's|: |/|g' 1.958 + return_value=1 1.959 + fi 1.960 + 1.961 + DIFFING_FILES=$($GREP differ $CONTENTS_DIFF_FILE | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g") 1.962 + 1.963 + $RM -f $WORK_DIR/$ZIP_FILE.diffs 1.964 + for file in $DIFFING_FILES; do 1.965 + if [[ "$ACCEPTED_JARZIP_CONTENTS" != *"$file"* ]]; then 1.966 + diff_text $OTHER_UNZIPDIR/$file $THIS_UNZIPDIR/$file >> $WORK_DIR/$ZIP_FILE.diffs 1.967 + fi 1.968 + done 1.969 + 1.970 + if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then 1.971 + return_value=1 1.972 + echo " Differing files in $ZIP_FILE" 1.973 + $CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP differ | cut -f 2 -d ' ' | \ 1.974 + $SED "s|$OTHER_UNZIPDIR| |g" > $WORK_DIR/$ZIP_FILE.difflist 1.975 + $CAT $WORK_DIR/$ZIP_FILE.difflist 1.976 + 1.977 + if [ -n "$SHOW_DIFFS" ]; then 1.978 + for i in $(cat $WORK_DIR/$ZIP_FILE.difflist) ; do 1.979 + if [ -f "${OTHER_UNZIPDIR}/$i.javap" ]; then 1.980 + LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.javap ${THIS_UNZIPDIR}/$i.javap 1.981 + elif [ -f "${OTHER_UNZIPDIR}/$i.cleaned" ]; then 1.982 + LANG=C $DIFF ${OTHER_UNZIPDIR}/$i.cleaned ${THIS_UNZIPDIR}/$i 1.983 + else 1.984 + LANG=C $DIFF ${OTHER_UNZIPDIR}/$i ${THIS_UNZIPDIR}/$i 1.985 + fi 1.986 + done 1.987 + fi 1.988 + fi 1.989 + 1.990 + return $return_value 1.991 +} 1.992 + 1.993 + 1.994 +########################################################################################## 1.995 +# Compare all zip files 1.996 + 1.997 +compare_all_zip_files() { 1.998 + THIS_DIR=$1 1.999 + OTHER_DIR=$2 1.1000 + WORK_DIR=$3 1.1001 + 1.1002 + ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.zip" | $SORT | $FILTER ) 1.1003 + 1.1004 + if [ -n "$ZIPS" ]; then 1.1005 + echo Zip files... 1.1006 + 1.1007 + return_value=0 1.1008 + for f in $ZIPS; do 1.1009 + if [ -f "$OTHER_DIR/$f" ]; then 1.1010 + compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f 1.1011 + if [ "$?" != "0" ]; then 1.1012 + return_value=1 1.1013 + REGRESSIONS=true 1.1014 + fi 1.1015 + fi 1.1016 + done 1.1017 + fi 1.1018 + 1.1019 + return $return_value 1.1020 +} 1.1021 + 1.1022 +########################################################################################## 1.1023 +# Compare all jar files 1.1024 + 1.1025 +compare_all_jar_files() { 1.1026 + THIS_DIR=$1 1.1027 + OTHER_DIR=$2 1.1028 + WORK_DIR=$3 1.1029 + 1.1030 + # TODO filter? 1.1031 + ZIPS=$(cd $THIS_DIR && $FIND . -type f -name "*.jar" | $SORT | $FILTER) 1.1032 + 1.1033 + if [ -n "$ZIPS" ]; then 1.1034 + echo Jar files... 1.1035 + 1.1036 + return_value=0 1.1037 + for f in $ZIPS; do 1.1038 + if [ -f "$OTHER_DIR/$f" ]; then 1.1039 + compare_zip_file $THIS_DIR $OTHER_DIR $WORK_DIR $f 1.1040 + if [ "$?" != "0" ]; then 1.1041 + return_value=1 1.1042 + REGRESSIONS=true 1.1043 + fi 1.1044 + fi 1.1045 + done 1.1046 + fi 1.1047 + 1.1048 + return $return_value 1.1049 +} 1.1050 + 1.1051 +########################################################################################## 1.1052 +# Compare binary (executable/library) file 1.1053 + 1.1054 +compare_bin_file() { 1.1055 + THIS_DIR=$1 1.1056 + OTHER_DIR=$2 1.1057 + WORK_DIR=$3 1.1058 + BIN_FILE=$4 1.1059 + 1.1060 + THIS_FILE=$THIS_DIR/$BIN_FILE 1.1061 + OTHER_FILE=$OTHER_DIR/$BIN_FILE 1.1062 + NAME=$(basename $BIN_FILE) 1.1063 + WORK_FILE_BASE=$WORK_DIR/$BIN_FILE 1.1064 + FILE_WORK_DIR=$(dirname $WORK_FILE_BASE) 1.1065 + 1.1066 + $MKDIR -p $FILE_WORK_DIR 1.1067 + 1.1068 + ORIG_THIS_FILE="$THIS_FILE" 1.1069 + ORIG_OTHER_FILE="$OTHER_FILE" 1.1070 + 1.1071 + if [[ "$STRIP_BEFORE_COMPARE" = *"$BIN_FILE"* ]]; then 1.1072 + THIS_STRIPPED_FILE=$FILE_WORK_DIR/this/$NAME 1.1073 + OTHER_STRIPPED_FILE=$FILE_WORK_DIR/other/$NAME 1.1074 + $MKDIR -p $FILE_WORK_DIR/this $FILE_WORK_DIR/other 1.1075 + $CP $THIS_FILE $THIS_STRIPPED_FILE 1.1076 + $CP $OTHER_FILE $OTHER_STRIPPED_FILE 1.1077 + $STRIP $THIS_STRIPPED_FILE 1.1078 + $STRIP $OTHER_STRIPPED_FILE 1.1079 + THIS_FILE="$THIS_STRIPPED_FILE" 1.1080 + OTHER_FILE="$OTHER_STRIPPED_FILE" 1.1081 + fi 1.1082 + 1.1083 + if [ -z "$SKIP_BIN_DIFF" ]; then 1.1084 + if cmp $OTHER_FILE $THIS_FILE > /dev/null; then 1.1085 + # The files were bytewise identical. 1.1086 + if [ -n "$VERBOSE" ]; then 1.1087 + echo " : : : : : $BIN_FILE" 1.1088 + fi 1.1089 + return 0 1.1090 + fi 1.1091 + BIN_MSG=" diff " 1.1092 + if [[ "$ACCEPTED_BIN_DIFF" != *"$BIN_FILE"* ]]; then 1.1093 + DIFF_BIN=true 1.1094 + if [[ "$KNOWN_BIN_DIFF" != *"$BIN_FILE"* ]]; then 1.1095 + BIN_MSG="*$BIN_MSG*" 1.1096 + REGRESSIONS=true 1.1097 + else 1.1098 + BIN_MSG=" $BIN_MSG " 1.1099 + fi 1.1100 + else 1.1101 + BIN_MSG="($BIN_MSG)" 1.1102 + DIFF_BIN= 1.1103 + fi 1.1104 + fi 1.1105 + 1.1106 + THIS_SIZE=$(ls -l "$THIS_FILE" | awk '{ print $5 }') 1.1107 + OTHER_SIZE=$(ls -l "$OTHER_FILE" | awk '{ print $5 }') 1.1108 + if [ $THIS_SIZE -ne $OTHER_SIZE ]; then 1.1109 + DIFF_SIZE_NUM=$($EXPR $THIS_SIZE - $OTHER_SIZE) 1.1110 + DIFF_SIZE_REL=$($EXPR $THIS_SIZE \* 100 / $OTHER_SIZE) 1.1111 + SIZE_MSG=$($PRINTF "%3d%% %4d" $DIFF_SIZE_REL $DIFF_SIZE_NUM) 1.1112 + if [[ "$ACCEPTED_SMALL_SIZE_DIFF" = *"$BIN_FILE"* ]] && [ "$DIFF_SIZE_REL" -gt 98 ] && [ "$DIFF_SIZE_REL" -lt 102 ]; then 1.1113 + SIZE_MSG="($SIZE_MSG)" 1.1114 + DIFF_SIZE= 1.1115 + else 1.1116 + if [[ "$ACCEPTED_SIZE_DIFF" != *"$BIN_FILE"* ]]; then 1.1117 + DIFF_SIZE=true 1.1118 + if [[ "$KNOWN_SIZE_DIFF" != *"$BIN_FILE"* ]]; then 1.1119 + SIZE_MSG="*$SIZE_MSG*" 1.1120 + REGRESSIONS=true 1.1121 + else 1.1122 + SIZE_MSG=" $SIZE_MSG " 1.1123 + fi 1.1124 + else 1.1125 + SIZE_MSG="($SIZE_MSG)" 1.1126 + DIFF_SIZE= 1.1127 + fi 1.1128 + fi 1.1129 + else 1.1130 + SIZE_MSG=" " 1.1131 + DIFF_SIZE= 1.1132 + if [[ "$KNOWN_SIZE_DIFF $ACCEPTED_SIZE_DIFF" = *"$BIN_FILE"* ]]; then 1.1133 + SIZE_MSG=" ! " 1.1134 + fi 1.1135 + fi 1.1136 + 1.1137 + if [[ "$SORT_SYMBOLS" = *"$BIN_FILE"* ]]; then 1.1138 + SYM_SORT_CMD="sort" 1.1139 + else 1.1140 + SYM_SORT_CMD="cat" 1.1141 + fi 1.1142 + 1.1143 + # Check symbols 1.1144 + if [ "$OPENJDK_TARGET_OS" = "windows" ]; then 1.1145 + $DUMPBIN -exports $OTHER_FILE | $GREP " = " | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other 1.1146 + $DUMPBIN -exports $THIS_FILE | $GREP " = " | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this 1.1147 + elif [ "$OPENJDK_TARGET_OS" = "solaris" ]; then 1.1148 + # Some symbols get seemingly random 15 character prefixes. Filter them out. 1.1149 + $NM -a $ORIG_OTHER_FILE | $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 1.1150 + $NM -a $ORIG_THIS_FILE | $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 1.1151 + else 1.1152 + $NM -a $ORIG_OTHER_FILE | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other 1.1153 + $NM -a $ORIG_THIS_FILE | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this 1.1154 + fi 1.1155 + 1.1156 + LANG=C $DIFF $WORK_FILE_BASE.symbols.other $WORK_FILE_BASE.symbols.this > $WORK_FILE_BASE.symbols.diff 1.1157 + if [ -s $WORK_FILE_BASE.symbols.diff ]; then 1.1158 + SYM_MSG=" diff " 1.1159 + if [[ "$ACCEPTED_SYM_DIFF" != *"$BIN_FILE"* ]]; then 1.1160 + DIFF_SYM=true 1.1161 + if [[ "$KNOWN_SYM_DIFF" != *"$BIN_FILE"* ]]; then 1.1162 + SYM_MSG="*$SYM_MSG*" 1.1163 + REGRESSIONS=true 1.1164 + else 1.1165 + SYM_MSG=" $SYM_MSG " 1.1166 + fi 1.1167 + else 1.1168 + SYM_MSG="($SYM_MSG)" 1.1169 + DIFF_SYM= 1.1170 + fi 1.1171 + else 1.1172 + SYM_MSG=" " 1.1173 + DIFF_SYM= 1.1174 + if [[ "$KNOWN_SYM_DIFF $ACCEPTED_SYM_DIFF" = *"$BIN_FILE"* ]]; then 1.1175 + SYM_MSG=" ! " 1.1176 + fi 1.1177 + fi 1.1178 + 1.1179 + # Check dependencies 1.1180 + if [ -n "$LDD_CMD" ];then 1.1181 + (cd $FILE_WORK_DIR && $CP $OTHER_FILE . && $LDD_CMD $NAME | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.other | $UNIQ > $WORK_FILE_BASE.deps.other.uniq) 1.1182 + (cd $FILE_WORK_DIR && $CP $THIS_FILE . && $LDD_CMD $NAME | $AWK '{ print $1;}' | $SORT | $TEE $WORK_FILE_BASE.deps.this | $UNIQ > $WORK_FILE_BASE.deps.this.uniq) 1.1183 + (cd $FILE_WORK_DIR && $RM -f $NAME) 1.1184 + 1.1185 + LANG=C $DIFF $WORK_FILE_BASE.deps.other $WORK_FILE_BASE.deps.this > $WORK_FILE_BASE.deps.diff 1.1186 + LANG=C $DIFF $WORK_FILE_BASE.deps.other.uniq $WORK_FILE_BASE.deps.this.uniq > $WORK_FILE_BASE.deps.diff.uniq 1.1187 + 1.1188 + if [ -s $WORK_FILE_BASE.deps.diff ]; then 1.1189 + if [ -s $WORK_FILE_BASE.deps.diff.uniq ]; then 1.1190 + DEP_MSG=" diff " 1.1191 + else 1.1192 + DEP_MSG=" redun " 1.1193 + fi 1.1194 + if [[ "$ACCEPTED_DEP_DIFF" != *"$BIN_FILE"* ]]; then 1.1195 + DIFF_DEP=true 1.1196 + if [[ "$KNOWN_DEP_DIFF" != *"$BIN_FILE"* ]]; then 1.1197 + DEP_MSG="*$DEP_MSG*" 1.1198 + REGRESSIONS=true 1.1199 + else 1.1200 + DEP_MSG=" $DEP_MSG " 1.1201 + fi 1.1202 + else 1.1203 + DEP_MSG="($DEP_MSG)" 1.1204 + DIFF_DEP= 1.1205 + fi 1.1206 + else 1.1207 + DEP_MSG=" " 1.1208 + DIFF_DEP= 1.1209 + if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then 1.1210 + DEP_MSG=" ! " 1.1211 + fi 1.1212 + fi 1.1213 + fi 1.1214 + 1.1215 + # Compare readelf output 1.1216 + if [ -n "$READELF_CMD" ] && [ -z "$SKIP_ELF_DIFF" ]; then 1.1217 + $READELF_CMD $OTHER_FILE > $WORK_FILE_BASE.readelf.other 2>&1 1.1218 + $READELF_CMD $THIS_FILE > $WORK_FILE_BASE.readelf.this 2>&1 1.1219 + 1.1220 + LANG=C $DIFF $WORK_FILE_BASE.readelf.other $WORK_FILE_BASE.readelf.this > $WORK_FILE_BASE.readelf.diff 1.1221 + 1.1222 + if [ -s $WORK_FILE_BASE.readelf.diff ]; then 1.1223 + ELF_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.readelf.diff | awk '{print $5}') 1.1224 + ELF_MSG=$($PRINTF "%8d" $ELF_DIFF_SIZE) 1.1225 + if [[ "$ACCEPTED_ELF_DIFF" != *"$BIN_FILE"* ]]; then 1.1226 + DIFF_ELF=true 1.1227 + if [[ "$KNOWN_ELF_DIFF" != *"$BIN_FILE"* ]]; then 1.1228 + ELF_MSG="*$ELF_MSG*" 1.1229 + REGRESSIONS=true 1.1230 + else 1.1231 + ELF_MSG=" $ELF_MSG " 1.1232 + fi 1.1233 + else 1.1234 + ELF_MSG="($ELF_MSG)" 1.1235 + DIFF_ELF= 1.1236 + fi 1.1237 + else 1.1238 + ELF_MSG=" " 1.1239 + DIFF_ELF= 1.1240 + if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then 1.1241 + ELF_MSG=" ! " 1.1242 + fi 1.1243 + fi 1.1244 + fi 1.1245 + 1.1246 + # Compare disassemble output 1.1247 + if [ -f "$OBJDUMP" ] && [ -z "$SKIP_DIS_DIFF" ]; then 1.1248 + $OBJDUMP -d $OTHER_FILE | $GREP -v $NAME > $WORK_FILE_BASE.dis.other 2>&1 1.1249 + $OBJDUMP -d $THIS_FILE | $GREP -v $NAME > $WORK_FILE_BASE.dis.this 2>&1 1.1250 + 1.1251 + LANG=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff 1.1252 + 1.1253 + if [ -s $WORK_FILE_BASE.dis.diff ]; then 1.1254 + DIS_DIFF_SIZE=$(ls -n $WORK_FILE_BASE.dis.diff | awk '{print $5}') 1.1255 + DIS_MSG=$($PRINTF "%8d" $DIS_DIFF_SIZE) 1.1256 + if [[ "$ACCEPTED_DIS_DIFF" != *"$BIN_FILE"* ]]; then 1.1257 + DIFF_DIS=true 1.1258 + if [[ "$KNOWN_DIS_DIFF" != *"$BIN_FILE"* ]]; then 1.1259 + DIS_MSG="*$DIS_MSG*" 1.1260 + REGRESSIONS=true 1.1261 + else 1.1262 + DIS_MSG=" $DIS_MSG " 1.1263 + fi 1.1264 + else 1.1265 + DIS_MSG="($DIS_MSG)" 1.1266 + DIFF_DIS= 1.1267 + fi 1.1268 + else 1.1269 + DIS_MSG=" " 1.1270 + DIFF_DIS= 1.1271 + if [[ "$KNOWN_DEP_DIFF $ACCEPTED_DEP_DIFF" = *"$BIN_FILE"* ]]; then 1.1272 + DIS_MSG=" ! " 1.1273 + fi 1.1274 + fi 1.1275 + fi 1.1276 + 1.1277 + 1.1278 + if [ -n "$DIFF_BIN$DIFF_SIZE$DIFF_SYM$DIFF_DEP$DIFF_ELF$DIFF_DIS" ] || [ -n "$VERBOSE" ]; then 1.1279 + if [ -n "$BIN_MSG" ]; then echo -n "$BIN_MSG:"; fi 1.1280 + if [ -n "$SIZE_MSG" ]; then echo -n "$SIZE_MSG:"; fi 1.1281 + if [ -n "$SYM_MSG" ]; then echo -n "$SYM_MSG:"; fi 1.1282 + if [ -n "$DEP_MSG" ]; then echo -n "$DEP_MSG:"; fi 1.1283 + if [ -n "$ELF_MSG" ]; then echo -n "$ELF_MSG:"; fi 1.1284 + if [ -n "$DIS_MSG" ]; then echo -n "$DIS_MSG:"; fi 1.1285 + echo " $BIN_FILE" 1.1286 + if [ "$SHOW_DIFFS" = "true" ]; then 1.1287 + if [ -s "$WORK_FILE_BASE.symbols.diff" ]; then 1.1288 + echo "Symbols diff:" 1.1289 + $CAT $WORK_FILE_BASE.symbols.diff 1.1290 + fi 1.1291 + if [ -s "$WORK_FILE_BASE.deps.diff" ]; then 1.1292 + echo "Deps diff:" 1.1293 + $CAT $WORK_FILE_BASE.deps.diff 1.1294 + fi 1.1295 + if [ -s "$WORK_FILE_BASE.readelf.diff" ]; then 1.1296 + echo "Readelf diff:" 1.1297 + $CAT $WORK_FILE_BASE.readelf.diff 1.1298 + fi 1.1299 + if [ -s "$WORK_FILE_BASE.dis.diff" ]; then 1.1300 + echo "Disassembly diff:" 1.1301 + $CAT $WORK_FILE_BASE.dis.diff 1.1302 + fi 1.1303 + fi 1.1304 + return 1 1.1305 + fi 1.1306 + return 0 1.1307 +} 1.1308 + 1.1309 +########################################################################################## 1.1310 +# Print binary diff header 1.1311 + 1.1312 +print_binary_diff_header() { 1.1313 + if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi 1.1314 + if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n " Size :"; fi 1.1315 + if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi 1.1316 + if [ -z "$SKIP_DEP_DIFF" ]; then echo -n " Deps :"; fi 1.1317 + if [ -z "$SKIP_ELF_DIFF" ]; then echo -n " Readelf :"; fi 1.1318 + if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass :"; fi 1.1319 + echo 1.1320 +} 1.1321 + 1.1322 +########################################################################################## 1.1323 +# Compare all libraries 1.1324 + 1.1325 +compare_all_libs() { 1.1326 + THIS_DIR=$1 1.1327 + OTHER_DIR=$2 1.1328 + WORK_DIR=$3 1.1329 + 1.1330 + LIBS=$(cd $THIS_DIR && $FIND . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | $SORT | $FILTER) 1.1331 + 1.1332 + if [ -n "$LIBS" ]; then 1.1333 + echo Libraries... 1.1334 + print_binary_diff_header 1.1335 + for l in $LIBS; do 1.1336 + if [ -f "$OTHER_DIR/$l" ]; then 1.1337 + compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l 1.1338 + if [ "$?" != "0" ]; then 1.1339 + return_value=1 1.1340 + fi 1.1341 + fi 1.1342 + done 1.1343 + fi 1.1344 + 1.1345 + return $return_value 1.1346 +} 1.1347 + 1.1348 +########################################################################################## 1.1349 +# Compare all executables 1.1350 + 1.1351 +compare_all_execs() { 1.1352 + THIS_DIR=$1 1.1353 + OTHER_DIR=$2 1.1354 + WORK_DIR=$3 1.1355 + 1.1356 + if [ "$OPENJDK_TARGET_OS" = "windows" ]; then 1.1357 + EXECS=$(cd $THIS_DIR && $FIND . -type f -name '*.exe' | $SORT | $FILTER) 1.1358 + else 1.1359 + EXECS=$(cd $THIS_DIR && $FIND . -name db -prune -o -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' -o -name '*.cgi' \) | $SORT | $FILTER) 1.1360 + fi 1.1361 + 1.1362 + if [ -n "$EXECS" ]; then 1.1363 + echo Executables... 1.1364 + print_binary_diff_header 1.1365 + for e in $EXECS; do 1.1366 + if [ -f "$OTHER_DIR/$e" ]; then 1.1367 + compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $e 1.1368 + if [ "$?" != "0" ]; then 1.1369 + return_value=1 1.1370 + fi 1.1371 + fi 1.1372 + done 1.1373 + fi 1.1374 + 1.1375 + return $return_value 1.1376 +} 1.1377 + 1.1378 +########################################################################################## 1.1379 +# Initiate configuration 1.1380 + 1.1381 +COMPARE_ROOT=/tmp/cimages.$USER 1.1382 +$MKDIR -p $COMPARE_ROOT 1.1383 +if [ "$OPENJDK_TARGET_OS" = "windows" ]; then 1.1384 + if [ "$(uname -o)" = "Cygwin" ]; then 1.1385 + COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT) 1.1386 + fi 1.1387 +fi 1.1388 + 1.1389 +THIS="$( cd "$( dirname "$0" )" && pwd )" 1.1390 +echo "$THIS" 1.1391 +THIS_SCRIPT="$0" 1.1392 + 1.1393 +if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1" = "/?" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then 1.1394 + echo "bash ./compare.sh [OPTIONS] [FILTER]" 1.1395 + echo "" 1.1396 + echo "-all Compare all files in all known ways" 1.1397 + echo "-names Compare the file names and directory structure" 1.1398 + echo "-perms Compare the permission bits on all files and directories" 1.1399 + echo "-types Compare the output of the file command on all files" 1.1400 + echo "-general Compare the files not convered by the specialized comparisons" 1.1401 + echo "-zips Compare the contents of all zip files" 1.1402 + echo "-jars Compare the contents of all jar files" 1.1403 + echo "-libs Compare all native libraries" 1.1404 + echo "-execs Compare all executables" 1.1405 + echo "-v Verbose output, does not hide known differences" 1.1406 + echo "-vv More verbose output, shows diff output of all comparisons" 1.1407 + echo "-o [OTHER] Compare with build in other directory. Will default to the old build directory" 1.1408 + echo "" 1.1409 + echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" 1.1410 + echo "Example:" 1.1411 + echo "bash ./common/bin/compareimages.sh CodePointIM.jar" 1.1412 + exit 10 1.1413 +fi 1.1414 + 1.1415 +CMP_NAMES=false 1.1416 +CMP_PERMS=false 1.1417 +CMP_TYPES=false 1.1418 +CMP_GENERAL=false 1.1419 +CMP_ZIPS=false 1.1420 +CMP_JARS=false 1.1421 +CMP_LIBS=false 1.1422 +CMP_EXECS=false 1.1423 + 1.1424 +while [ -n "$1" ]; do 1.1425 + case "$1" in 1.1426 + -v) 1.1427 + VERBOSE=true 1.1428 + ;; 1.1429 + -vv) 1.1430 + VERBOSE=true 1.1431 + SHOW_DIFFS=true 1.1432 + ;; 1.1433 + -o) 1.1434 + OTHER=$2 1.1435 + shift 1.1436 + ;; 1.1437 + -all) 1.1438 + CMP_NAMES=true 1.1439 + if [ "$OPENJDK_TARGET_OS" != "windows" ]; then 1.1440 + CMP_PERMS=true 1.1441 + fi 1.1442 + CMP_TYPES=true 1.1443 + CMP_GENERAL=true 1.1444 + CMP_ZIPS=true 1.1445 + CMP_JARS=true 1.1446 + CMP_LIBS=true 1.1447 + CMP_EXECS=true 1.1448 + ;; 1.1449 + -names) 1.1450 + CMP_NAMES=true 1.1451 + ;; 1.1452 + -perms) 1.1453 + CMP_PERMS=true 1.1454 + ;; 1.1455 + -types) 1.1456 + CMP_TYPES=true 1.1457 + ;; 1.1458 + -general) 1.1459 + CMP_GENERAL=true 1.1460 + ;; 1.1461 + -zips) 1.1462 + CMP_ZIPS=true 1.1463 + ;; 1.1464 + -jars) 1.1465 + CMP_JARS=true 1.1466 + ;; 1.1467 + -libs) 1.1468 + CMP_LIBS=true 1.1469 + ;; 1.1470 + -execs) 1.1471 + CMP_EXECS=true 1.1472 + ;; 1.1473 + *) 1.1474 + CMP_NAMES=false 1.1475 + CMP_PERMS=false 1.1476 + CMP_TYPES=false 1.1477 + CMP_ZIPS=true 1.1478 + CMP_JARS=true 1.1479 + CMP_LIBS=true 1.1480 + CMP_EXECS=true 1.1481 + 1.1482 + if [ -z "$FILTER" ]; then 1.1483 + FILTER="$GREP" 1.1484 + fi 1.1485 + FILTER="$FILTER -e $1" 1.1486 + ;; 1.1487 + esac 1.1488 + shift 1.1489 +done 1.1490 + 1.1491 +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 1.1492 + CMP_NAMES=true 1.1493 + CMP_PERMS=true 1.1494 + CMP_TYPES=true 1.1495 + CMP_GENERAL=true 1.1496 + CMP_ZIPS=true 1.1497 + CMP_JARS=true 1.1498 + CMP_LIBS=true 1.1499 + CMP_EXECS=true 1.1500 +fi 1.1501 + 1.1502 +if [ -z "$FILTER" ]; then 1.1503 + FILTER="$CAT" 1.1504 +fi 1.1505 + 1.1506 +if [ -z "$OTHER" ]; then 1.1507 + OTHER="$THIS/../$LEGACY_BUILD_DIR" 1.1508 + if [ -d "$OTHER" ]; then 1.1509 + OTHER="$( cd "$OTHER" && pwd )" 1.1510 + else 1.1511 + echo "Default old build directory does not exist:" 1.1512 + echo "$OTHER" 1.1513 + fi 1.1514 + echo "Comparing to default old build:" 1.1515 + echo "$OTHER" 1.1516 + echo 1.1517 +else 1.1518 + echo "Comparing to:" 1.1519 + echo "$OTHER" 1.1520 + echo 1.1521 +fi 1.1522 + 1.1523 +if [ ! -d "$OTHER" ]; then 1.1524 + echo "Other build directory does not exist:" 1.1525 + echo "$OTHER" 1.1526 + exit 1; 1.1527 +fi 1.1528 + 1.1529 +# Figure out the layout of the new build. Which kinds of images have been produced 1.1530 +if [ -d "$THIS/images/j2sdk-image" ]; then 1.1531 + THIS_J2SDK="$THIS/images/j2sdk-image" 1.1532 + THIS_J2RE="$THIS/images/j2re-image" 1.1533 +fi 1.1534 +if [ -d "$THIS/images/j2sdk-overlay-image" ]; then 1.1535 + THIS_J2SDK_OVERLAY="$THIS/images/j2sdk-overlay-image" 1.1536 + THIS_J2RE_OVERLAY="$THIS/images/j2re-overlay-image" 1.1537 +fi 1.1538 + 1.1539 +# Figure out the layout of the other build (old or new, normal or overlay image) 1.1540 +if [ -d "$OTHER/j2sdk-image" ]; then 1.1541 + if [ -f "$OTHER/j2sdk-image/LICENSE" ]; then 1.1542 + OTHER_J2SDK="$OTHER/j2sdk-image" 1.1543 + OTHER_J2RE="$OTHER/j2re-image" 1.1544 + else 1.1545 + OTHER_J2SDK_OVERLAY="$OTHER/j2sdk-image" 1.1546 + OTHER_J2RE_OVERLAY="$OTHER/j2re-image" 1.1547 + fi 1.1548 + 1.1549 +fi 1.1550 + 1.1551 +if [ -z "$OTHER_J2SDK" ] && [ -n "$OTHER_J2SDK_OVERLAY" ] && [ -z "$THIS_J2SDK_OVERLAY" ]; then 1.1552 + echo "OTHER build only has an overlay image while this build does not. Nothing to compare!" 1.1553 + exit 1 1.1554 +fi 1.1555 + 1.1556 + 1.1557 +########################################################################################## 1.1558 +# Do the work 1.1559 + 1.1560 +if [ "$CMP_NAMES" = "true" ]; then 1.1561 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1562 + echo -n "J2SDK " 1.1563 + compare_dirs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1564 + echo -n "J2RE " 1.1565 + compare_dirs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re 1.1566 + 1.1567 + echo -n "J2SDK " 1.1568 + compare_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1569 + echo -n "J2RE " 1.1570 + compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re 1.1571 + fi 1.1572 + if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then 1.1573 + echo -n "J2SDK Overlay " 1.1574 + compare_dirs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay 1.1575 + echo -n "J2RE Overlay " 1.1576 + compare_dirs $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay 1.1577 + 1.1578 + echo -n "J2SDK Overlay " 1.1579 + compare_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay 1.1580 + echo -n "J2RE Overlay " 1.1581 + compare_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay 1.1582 + fi 1.1583 +fi 1.1584 + 1.1585 +if [ "$CMP_PERMS" = "true" ]; then 1.1586 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1587 + echo -n "J2SDK " 1.1588 + compare_permissions $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1589 + echo -n "J2RE " 1.1590 + compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re 1.1591 + fi 1.1592 + if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then 1.1593 + echo -n "J2SDK Overlay " 1.1594 + compare_permissions $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay 1.1595 + echo -n "J2RE Overlay " 1.1596 + compare_permissions $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay 1.1597 + fi 1.1598 +fi 1.1599 + 1.1600 +if [ "$CMP_TYPES" = "true" ]; then 1.1601 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1602 + echo -n "J2SDK " 1.1603 + compare_file_types $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1604 + echo -n "J2RE " 1.1605 + compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re 1.1606 + fi 1.1607 + if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then 1.1608 + echo -n "J2SDK Overlay " 1.1609 + compare_file_types $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay 1.1610 + echo -n "J2RE Overlay " 1.1611 + compare_file_types $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay 1.1612 + fi 1.1613 +fi 1.1614 + 1.1615 +if [ "$CMP_GENERAL" = "true" ]; then 1.1616 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1617 + echo -n "J2SDK " 1.1618 + compare_general_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1619 + echo -n "J2RE " 1.1620 + compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re 1.1621 + fi 1.1622 + if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then 1.1623 + echo -n "J2SDK Overlay " 1.1624 + compare_general_files $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay 1.1625 + echo -n "J2RE Overlay " 1.1626 + compare_general_files $THIS_J2RE_OVERLAY $OTHER_J2RE_OVERLAY $COMPARE_ROOT/j2re-overlay 1.1627 + fi 1.1628 +fi 1.1629 + 1.1630 +if [ "$CMP_ZIPS" = "true" ]; then 1.1631 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1632 + compare_all_zip_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1633 + fi 1.1634 +fi 1.1635 + 1.1636 +if [ "$CMP_JARS" = "true" ]; then 1.1637 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1638 + compare_all_jar_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1639 + fi 1.1640 +fi 1.1641 + 1.1642 +if [ "$CMP_LIBS" = "true" ]; then 1.1643 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1644 + compare_all_libs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1645 + fi 1.1646 + if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then 1.1647 + echo -n "Overlay " 1.1648 + compare_all_libs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay 1.1649 + fi 1.1650 +fi 1.1651 + 1.1652 +if [ "$CMP_EXECS" = "true" ]; then 1.1653 + if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then 1.1654 + compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk 1.1655 + fi 1.1656 + if [ -n "$THIS_J2SDK_OVERLAY" ] && [ -n "$OTHER_J2SDK_OVERLAY" ]; then 1.1657 + echo -n "Overlay " 1.1658 + compare_all_execs $THIS_J2SDK_OVERLAY $OTHER_J2SDK_OVERLAY $COMPARE_ROOT/j2sdk-overlay 1.1659 + fi 1.1660 +fi 1.1661 + 1.1662 +echo 1.1663 + 1.1664 +if [ -n "$REGRESSIONS" ]; then 1.1665 + echo "REGRESSIONS FOUND!" 1.1666 + echo 1.1667 + exit 1 1.1668 +else 1.1669 + echo "No regressions found" 1.1670 + echo 1.1671 + exit 0 1.1672 +fi