< prev index next >

common/bin/compare.sh

Print this page




 289     else
 290         REGRESSIONS=true
 291     fi
 292 }
 293 
 294 ################################################################################
 295 # Compare the rest of the files
 296 
 297 compare_general_files() {
 298     THIS_DIR=$1
 299     OTHER_DIR=$2
 300     WORK_DIR=$3
 301 
 302     GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" \
 303         ! -name "*.zip" ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
 304         ! -name "*.jimage" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
 305         ! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
 306         ! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
 307         ! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \
 308         ! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \
 309         ! -name "jspawnhelper" \
 310         | $GREP -v "./bin/"  | $SORT | $FILTER)
 311 
 312     echo Other files with binary differences...
 313     for f in $GENERAL_FILES
 314     do
 315         if [ -e $OTHER_DIR/$f ]; then
 316             SUFFIX="${f##*.}"
 317             if [ "$(basename $f)" = "release" ]; then
 318                 # Ignore differences in change numbers in release file.
 319                 OTHER_FILE=$WORK_DIR/$f.other
 320                 THIS_FILE=$WORK_DIR/$f.this
 321                 $MKDIR -p $(dirname $OTHER_FILE)
 322                 $MKDIR -p $(dirname $THIS_FILE)
 323                 $CAT $OTHER_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $OTHER_FILE
 324                 $CAT $THIS_DIR/$f  | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $THIS_FILE
 325             elif [ "x$SUFFIX" = "xhtml" ]; then
 326                 # Ignore time stamps in docs files
 327                 OTHER_FILE=$WORK_DIR/$f.other
 328                 THIS_FILE=$WORK_DIR/$f.this
 329                 $MKDIR -p $(dirname $OTHER_FILE)


 922 
 923 print_binary_diff_header() {
 924     if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi
 925     if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n "   Size    :"; fi
 926     if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi
 927     if [ -z "$SKIP_DEP_DIFF" ]; then echo -n "  Deps   :"; fi
 928     if [ -z "$SKIP_FULLDUMP_DIFF" ]; then echo -n " Fulldump :"; fi
 929     if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass   :"; fi
 930     echo
 931 }
 932 
 933 ################################################################################
 934 # Compare all libraries
 935 
 936 compare_all_libs() {
 937     THIS_DIR=$1
 938     OTHER_DIR=$2
 939     WORK_DIR=$3
 940 
 941     LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \
 942         -o -name '*.dll' -o -name '*.obj' -o -name '*.o' \
 943         -o -name '*.cpl' \) | $SORT | $FILTER)
 944 
 945     if [ -n "$LIBS" ]; then
 946         echo Libraries...
 947         print_binary_diff_header
 948         for l in $LIBS; do
 949             if [ -f "$OTHER_DIR/$l" ]; then
 950                 compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l
 951                 if [ "$?" != "0" ]; then
 952                     return_value=1
 953                 fi
 954             fi
 955         done
 956     fi
 957 
 958     return $return_value
 959 }
 960 
 961 ################################################################################
 962 # Compare all executables




 289     else
 290         REGRESSIONS=true
 291     fi
 292 }
 293 
 294 ################################################################################
 295 # Compare the rest of the files
 296 
 297 compare_general_files() {
 298     THIS_DIR=$1
 299     OTHER_DIR=$2
 300     WORK_DIR=$3
 301 
 302     GENERAL_FILES=$(cd $THIS_DIR && $FIND . -type f ! -name "*.so" ! -name "*.jar" \
 303         ! -name "*.zip" ! -name "*.debuginfo" ! -name "*.dylib" ! -name "jexec" \
 304         ! -name "*.jimage" ! -name "ct.sym" ! -name "*.diz" ! -name "*.dll" \
 305         ! -name "*.cpl" ! -name "*.pdb" ! -name "*.exp" ! -name "*.ilk" \
 306         ! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
 307         ! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \
 308         ! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \
 309         ! -name "jspawnhelper" ! -name "*.a" \
 310         | $GREP -v "./bin/"  | $SORT | $FILTER)
 311 
 312     echo Other files with binary differences...
 313     for f in $GENERAL_FILES
 314     do
 315         if [ -e $OTHER_DIR/$f ]; then
 316             SUFFIX="${f##*.}"
 317             if [ "$(basename $f)" = "release" ]; then
 318                 # Ignore differences in change numbers in release file.
 319                 OTHER_FILE=$WORK_DIR/$f.other
 320                 THIS_FILE=$WORK_DIR/$f.this
 321                 $MKDIR -p $(dirname $OTHER_FILE)
 322                 $MKDIR -p $(dirname $THIS_FILE)
 323                 $CAT $OTHER_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $OTHER_FILE
 324                 $CAT $THIS_DIR/$f  | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $THIS_FILE
 325             elif [ "x$SUFFIX" = "xhtml" ]; then
 326                 # Ignore time stamps in docs files
 327                 OTHER_FILE=$WORK_DIR/$f.other
 328                 THIS_FILE=$WORK_DIR/$f.this
 329                 $MKDIR -p $(dirname $OTHER_FILE)


 922 
 923 print_binary_diff_header() {
 924     if [ -z "$SKIP_BIN_DIFF" ]; then echo -n " Binary :"; fi
 925     if [ -z "$SKIP_SIZE_DIFF" ]; then echo -n "   Size    :"; fi
 926     if [ -z "$SKIP_SYM_DIFF" ]; then echo -n " Symbols :"; fi
 927     if [ -z "$SKIP_DEP_DIFF" ]; then echo -n "  Deps   :"; fi
 928     if [ -z "$SKIP_FULLDUMP_DIFF" ]; then echo -n " Fulldump :"; fi
 929     if [ -z "$SKIP_DIS_DIFF" ]; then echo -n " Disass   :"; fi
 930     echo
 931 }
 932 
 933 ################################################################################
 934 # Compare all libraries
 935 
 936 compare_all_libs() {
 937     THIS_DIR=$1
 938     OTHER_DIR=$2
 939     WORK_DIR=$3
 940 
 941     LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \
 942         -o -name '*.dll' -o -name '*.obj' -o -name '*.o' -o -name '*.a' \
 943         -o -name '*.cpl' \) | $SORT | $FILTER)
 944 
 945     if [ -n "$LIBS" ]; then
 946         echo Libraries...
 947         print_binary_diff_header
 948         for l in $LIBS; do
 949             if [ -f "$OTHER_DIR/$l" ]; then
 950                 compare_bin_file $THIS_DIR $OTHER_DIR $WORK_DIR $l
 951                 if [ "$?" != "0" ]; then
 952                     return_value=1
 953                 fi
 954             fi
 955         done
 956     fi
 957 
 958     return $return_value
 959 }
 960 
 961 ################################################################################
 962 # Compare all executables


< prev index next >