common/bin/compare.sh
changeset 29157 e911c898c14c
parent 28356 3b985eeacb08
child 29158 5d46751992d9
--- a/common/bin/compare.sh	Fri Feb 27 11:56:57 2015 +0100
+++ b/common/bin/compare.sh	Fri Feb 27 17:27:11 2015 +0100
@@ -26,7 +26,7 @@
 # the root of the build directory.
 
 
-##########################################################################################
+################################################################################
 
 # Check that we are run via the wrapper generated by configure
 if [ -z "$SRC_ROOT" ]; then
@@ -35,7 +35,7 @@
 fi
 
 if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
-    FULLDUMP_CMD="$OTOOL -v -V -h -X -t -d"
+    FULLDUMP_CMD="$OTOOL -v -V -h -X -d"
     LDD_CMD="$OTOOL -L"
     DIS_CMD="$OTOOL -v -t"
     STAT_PRINT_SIZE="-f %z"
@@ -61,7 +61,7 @@
 # Include exception definitions
 . "$COMPARE_EXCEPTIONS_INCLUDE"
 
-##########################################################################################
+################################################################################
 # Compare text files and ignore specific differences:
 #
 #  * Timestamps in Java sources generated by idl2java
@@ -134,9 +134,15 @@
             $SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d')
     fi
     if test "x$SUFFIX" = "xhtml"; then
-        TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
+	# Some javadoc versions do not put quotes around font size
+	HTML_FILTER="$SED \
+            -e 's/<font size=-1>/<font size=\"-1\">/g'"
+	$CAT $THIS_FILE | eval "$HTML_FILTER" > $THIS_FILE.filtered
+	$CAT $OTHER_FILE | eval "$HTML_FILTER" > $OTHER_FILE.filtered
+        TMP=$(LC_ALL=C $DIFF $OTHER_FILE.filtered $THIS_FILE.filtered | \
             $GREP '^[<>]' | \
-            $SED -e '/[<>] <!-- Generated by javadoc .* on .* -->/d' )
+            $SED -e '/[<>] <!-- Generated by javadoc .* on .* -->/d' \
+	         -e '/[<>] <meta name="date" content=".*">/d' )
     fi
     if test -n "$TMP"; then
         echo Files $OTHER_FILE and $THIS_FILE differ
@@ -146,7 +152,7 @@
     return 0
 }
 
-##########################################################################################
+################################################################################
 # Compare directory structure
 
 compare_dirs() {
@@ -182,7 +188,7 @@
 }
 
 
-##########################################################################################
+################################################################################
 # Compare file structure
 
 compare_files() {
@@ -218,7 +224,7 @@
 }
 
 
-##########################################################################################
+################################################################################
 # Compare permissions
 
 compare_permissions() {
@@ -249,7 +255,7 @@
     fi
 }
 
-##########################################################################################
+################################################################################
 # Compare file command output
 
 compare_file_types() {
@@ -289,7 +295,7 @@
     fi
 }
 
-##########################################################################################
+################################################################################
 # Compare the rest of the files
 
 compare_general_files() {
@@ -297,12 +303,14 @@
     OTHER_DIR=$2
     WORK_DIR=$3
 
-    GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" ! -name "*.zip" \
-        ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" ! -name "*.jimage" \
-        ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" ! -name "*.cpl" \
-        ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
+    GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" \
+        ! -name "*.zip" ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
+        ! -name "*.jimage" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
+        ! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
         ! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
-        ! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" ! -name "JavaUpdater" \
+        ! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \
+        ! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \
+        ! -name "jspawnhelper" \
         | $GREP -v "./bin/"  | $SORT | $FILTER)
 
     echo General files...
@@ -357,7 +365,7 @@
 
 }
 
-##########################################################################################
+################################################################################
 # Compare zip file
 
 compare_zip_file() {
@@ -456,8 +464,9 @@
     fi
 
     if [ "$OPENJDK_TARGET_OS" = "solaris" ]; then
-        DIFFING_FILES=$($GREP -e "differ$" -e "^diff " $CONTENTS_DIFF_FILE \
-            | $CUT -f 3 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g")
+        DIFFING_FILES=$($GREP -e 'differ$' -e '^diff ' $CONTENTS_DIFF_FILE \
+            | $SED -e 's/^Files //g' -e 's/diff -r //g' | $CUT -f 1 -d ' ' \
+            | $SED "s|$OTHER_UNZIPDIR/||g")
     else
         DIFFING_FILES=$($GREP -e "differ$" $CONTENTS_DIFF_FILE \
             | $CUT -f 2 -d ' ' | $SED "s|$OTHER_UNZIPDIR/||g")
@@ -473,7 +482,7 @@
     if [ -s "$WORK_DIR/$ZIP_FILE.diffs" ]; then
         return_value=1
         echo "        Differing files in $ZIP_FILE"
-        $CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP differ | cut -f 2 -d ' ' | \
+        $CAT $WORK_DIR/$ZIP_FILE.diffs | $GREP 'differ$' | cut -f 2 -d ' ' | \
             $SED "s|$OTHER_UNZIPDIR|            |g" > $WORK_DIR/$ZIP_FILE.difflist
         $CAT $WORK_DIR/$ZIP_FILE.difflist
 
@@ -494,7 +503,7 @@
 }
 
 
-##########################################################################################
+################################################################################
 # Compare all zip files
 
 compare_all_zip_files() {
@@ -522,7 +531,7 @@
     return $return_value
 }
 
-##########################################################################################
+################################################################################
 # Compare all jar files
 
 compare_all_jar_files() {
@@ -552,7 +561,7 @@
     return $return_value
 }
 
-##########################################################################################
+################################################################################
 # Compare binary (executable/library) file
 
 compare_bin_file() {
@@ -798,8 +807,12 @@
 
     # Compare fulldump output
     if [ -n "$FULLDUMP_CMD" ] && [ -z "$SKIP_FULLDUMP_DIFF" ]; then
-        $FULLDUMP_CMD $OTHER_FILE > $WORK_FILE_BASE.fulldump.other 2>&1
-        $FULLDUMP_CMD $THIS_FILE > $WORK_FILE_BASE.fulldump.this 2>&1
+        if [ -z "$FULLDUMP_DIFF_FILTER" ]; then
+            FULLDUMP_DIFF_FILTER="$CAT"
+        fi
+        $FULLDUMP_CMD $OTHER_FILE | eval "$FULLDUMP_DIFF_FILTER" > $WORK_FILE_BASE.fulldump.other 2>&1
+        $FULLDUMP_CMD $THIS_FILE  | eval "$FULLDUMP_DIFF_FILTER" > $WORK_FILE_BASE.fulldump.this  2>&1
+
         LC_ALL=C $DIFF $WORK_FILE_BASE.fulldump.other $WORK_FILE_BASE.fulldump.this > $WORK_FILE_BASE.fulldump.diff
 
         if [ -s $WORK_FILE_BASE.fulldump.diff ]; then
@@ -895,7 +908,7 @@
     return 0
 }
 
-##########################################################################################
+################################################################################
 # Print binary diff header
 
 print_binary_diff_header() {
@@ -908,7 +921,7 @@
     echo
 }
 
-##########################################################################################
+################################################################################
 # Compare all libraries
 
 compare_all_libs() {
@@ -936,7 +949,7 @@
     return $return_value
 }
 
-##########################################################################################
+################################################################################
 # Compare all executables
 
 compare_all_execs() {
@@ -971,7 +984,7 @@
     return $return_value
 }
 
-##########################################################################################
+################################################################################
 # Initiate configuration
 
 COMPARE_ROOT=/tmp/cimages.$USER
@@ -1170,22 +1183,39 @@
 
     # Find the common images to compare, prioritizing later build stages
     if [ -d "$THIS/install/jdk" ] && [ -d "$OTHER/install/jdk" ]; then
-        THIS_J2SDK="$THIS/install/jdk"
-        THIS_J2RE="$THIS/install/jre"
-        OTHER_J2SDK="$OTHER/install/jdk"
-        OTHER_J2RE="$OTHER/install/jre"
+        THIS_JDK="$THIS/install/jdk"
+        THIS_JRE="$THIS/install/jre"
+        OTHER_JDK="$OTHER/install/jdk"
+        OTHER_JRE="$OTHER/install/jre"
         echo "Selecting install images for compare"
-    elif [ -d "$THIS/deploy/jdk" ] && [ -d "$OTHER/deploy/jdk" ]; then
-        THIS_J2SDK="$THIS/deploy/jdk"
-        THIS_J2RE="$THIS/deploy/jre"
-        OTHER_J2SDK="$OTHER/deploy/jdk"
-        OTHER_J2RE="$OTHER/deploy/jre"
+    elif [ -d "$THIS/deploy/jdk" -o -d "$THIS/deploy/images/jdk" ] \
+	     && [ -d "$OTHER/deploy/jdk" -o -d "$OTHER/deploy/images/jdk" ]; then
+	if [ -d "$THIS/deploy/images/jdk" ]; then
+            THIS_JDK="$THIS/deploy/images/jdk"
+            THIS_JRE="$THIS/deploy/images/jre"
+	else
+            THIS_JDK="$THIS/deploy/jdk"
+            THIS_JRE="$THIS/deploy/jre"
+	fi
+	if [ -d "$OTHER/deploy/images/jdk" ]; then
+            OTHER_JDK="$OTHER/deploy/images/jdk"
+            OTHER_JRE="$OTHER/deploy/images/jre"
+	else
+            OTHER_JDK="$OTHER/deploy/jdk"
+            OTHER_JRE="$OTHER/deploy/jre"
+	fi
+        echo "Selecting deploy images for compare"
+    elif [ -d "$THIS/deploy/images/jdk" ] && [ -d "$OTHER/deploy/jdk" ]; then
+        THIS_JDK="$THIS/deploy/jdk"
+        THIS_JRE="$THIS/deploy/jre"
+        OTHER_JDK="$OTHER/deploy/jdk"
+        OTHER_JRE="$OTHER/deploy/jre"
         echo "Selecting deploy images for compare"
     elif [ -d "$THIS/images/jdk" ] && [ -d "$OTHER/images/jdk" ]; then
-        THIS_J2SDK="$THIS/images/jdk"
-        THIS_J2RE="$THIS/images/jre"
-        OTHER_J2SDK="$OTHER/images/jdk"
-        OTHER_J2RE="$OTHER/images/jre"
+        THIS_JDK="$THIS/images/jdk"
+        THIS_JRE="$THIS/images/jre"
+        OTHER_JDK="$OTHER/images/jdk"
+        OTHER_JRE="$OTHER/images/jre"
         echo "Selecting jdk images for compare"
     else
         echo "No common images found."
@@ -1193,19 +1223,19 @@
     fi
 
     if [ -d "$THIS/images/jdk-bundle" ] && [ -d "$OTHER/images/jdk-bundle" ]; then
-        THIS_J2SDK_BUNDLE="$THIS/images/jdk-bundle"
-        THIS_J2RE_BUNDLE="$THIS/images/jre-bundle"
-        OTHER_J2SDK_BUNDLE="$OTHER/images/jdk-bundle"
-        OTHER_J2RE_BUNDLE="$OTHER/images/jre-bundle"
+        THIS_JDK_BUNDLE="$THIS/images/jdk-bundle"
+        THIS_JRE_BUNDLE="$THIS/images/jre-bundle"
+        OTHER_JDK_BUNDLE="$OTHER/images/jdk-bundle"
+        OTHER_JRE_BUNDLE="$OTHER/images/jre-bundle"
         echo "Also comparing macosx bundles"
     fi
 
     if [ -d "$THIS/deploy" ] && [ -d "$OTHER/deploy" ]; then
-        THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/dist/installer/bundles"
+        THIS_DEPLOY_BUNDLE_DIR="$THIS/deploy/images/bundles"
         OTHER_DEPLOY_BUNDLE_DIR="$OTHER/deploy/bundles"
         echo "Also comparing deploy/bundles"
         if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
-            THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/JavaAppletPlugin.plugin"
+            THIS_DEPLOY_APPLET_PLUGIN_DIR="$THIS/deploy/images/JavaAppletPlugin.plugin"
             OTHER_DEPLOY_APPLET_PLUGIN_DIR="$OTHER/deploy/JavaAppletPlugin.plugin"
             echo "Also comparing JavaAppletPlugin"
         fi
@@ -1240,31 +1270,31 @@
     fi
 fi
 
-##########################################################################################
+################################################################################
 # Do the work
 
 if [ "$CMP_NAMES" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_dirs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_dirs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        echo -n "JDK "
+        compare_dirs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
+        echo -n "JRE  "
+        compare_dirs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre
 
-        echo -n "J2SDK "
-        compare_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
+        echo -n "JDK "
+        compare_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
+        echo -n "JRE  "
+        compare_files $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre
     fi
-    if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
-        echo -n "J2SDK Bundle "
-        compare_dirs $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
-        echo -n "J2RE  Bundle "
-        compare_dirs $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
+    if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then
+        echo -n "JDK Bundle "
+        compare_dirs $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
+        echo -n "JRE  Bundle "
+        compare_dirs $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle
 
-        echo -n "J2SDK Bundle "
-        compare_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
-        echo -n "J2RE  Bundle "
-        compare_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
+        echo -n "JDK Bundle "
+        compare_files $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
+        echo -n "JRE  Bundle "
+        compare_files $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle
     fi
     if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
         echo -n "Docs "
@@ -1285,11 +1315,11 @@
 fi
 
 if [ "$CMP_PERMS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_permissions $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_permissions $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        echo -n "JDK "
+        compare_permissions $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
+        echo -n "JRE  "
+        compare_permissions $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre
     fi
     if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
         compare_permissions $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
@@ -1301,17 +1331,17 @@
 fi
 
 if [ "$CMP_TYPES" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_file_types $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_file_types $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        echo -n "JDK "
+        compare_file_types $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
+        echo -n "JRE  "
+        compare_file_types $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre
     fi
-    if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
-        echo -n "J2SDK Bundle "
-        compare_file_types $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
-        echo -n "J2RE  Bundle "
-        compare_file_types $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
+    if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then
+        echo -n "JDK Bundle "
+        compare_file_types $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
+        echo -n "JRE  Bundle "
+        compare_file_types $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle
     fi
     if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
         compare_file_types $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
@@ -1323,17 +1353,17 @@
 fi
 
 if [ "$CMP_GENERAL" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_general_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
-        echo -n "J2RE  "
-        compare_general_files $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        echo -n "JDK "
+        compare_general_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
+        echo -n "JRE  "
+        compare_general_files $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre
     fi
-    if [ -n "$THIS_J2SDK_BUNDLE" ] && [ -n "$OTHER_J2SDK_BUNDLE" ]; then
-        echo -n "J2SDK Bundle "
-        compare_general_files $THIS_J2SDK_BUNDLE $OTHER_J2SDK_BUNDLE $COMPARE_ROOT/jdk-bundle
-        echo -n "J2RE  Bundle "
-        compare_general_files $THIS_J2RE_BUNDLE $OTHER_J2RE_BUNDLE $COMPARE_ROOT/jre-bundle
+    if [ -n "$THIS_JDK_BUNDLE" ] && [ -n "$OTHER_JDK_BUNDLE" ]; then
+        echo -n "JDK Bundle "
+        compare_general_files $THIS_JDK_BUNDLE $OTHER_JDK_BUNDLE $COMPARE_ROOT/jdk-bundle
+        echo -n "JRE  Bundle "
+        compare_general_files $THIS_JRE_BUNDLE $OTHER_JRE_BUNDLE $COMPARE_ROOT/jre-bundle
     fi
     if [ -n "$THIS_DOCS" ] && [ -n "$OTHER_DOCS" ]; then
         echo -n "Docs "
@@ -1349,8 +1379,8 @@
 fi
 
 if [ "$CMP_ZIPS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        compare_all_zip_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        compare_all_zip_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
     fi
     if [ -n "$THIS_SEC_BIN" ] && [ -n "$OTHER_SEC_BIN" ]; then
         if [ -n "$(echo $THIS_SEC_BIN | $FILTER)" ]; then
@@ -1382,8 +1412,8 @@
 fi
 
 if [ "$CMP_JARS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        compare_all_jar_files $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        compare_all_jar_files $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
     fi
     if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
         compare_all_jar_files $THIS_BASE_DIR $OTHER_BASE_DIR $COMPARE_ROOT/base_dir
@@ -1394,12 +1424,12 @@
 fi
 
 if [ "$CMP_LIBS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        echo -n "J2SDK "
-        compare_all_libs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        echo -n "JDK "
+        compare_all_libs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
         if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
-            echo -n "J2RE  "
-            compare_all_libs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
+            echo -n "JRE  "
+            compare_all_libs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre
         fi
     fi
     if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then
@@ -1412,11 +1442,11 @@
 fi
 
 if [ "$CMP_EXECS" = "true" ]; then
-    if [ -n "$THIS_J2SDK" ] && [ -n "$OTHER_J2SDK" ]; then
-        compare_all_execs $THIS_J2SDK $OTHER_J2SDK $COMPARE_ROOT/j2sdk
+    if [ -n "$THIS_JDK" ] && [ -n "$OTHER_JDK" ]; then
+        compare_all_execs $THIS_JDK $OTHER_JDK $COMPARE_ROOT/jdk
         if [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
-            echo -n "J2RE  "
-            compare_all_execs $THIS_J2RE $OTHER_J2RE $COMPARE_ROOT/j2re
+            echo -n "JRE  "
+            compare_all_execs $THIS_JRE $OTHER_JRE $COMPARE_ROOT/jre
         fi
     fi
     if [ -n "$THIS_BASE_DIR" ] && [ -n "$OTHER_BASE_DIR" ]; then