X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=devtools%2Fcheck-abi.sh;h=ca523eb94c6d4c16d77453affd5f223d5f3f69e1;hb=45570d7e4439ca8cc676eaf414497000e4e9fb1a;hp=ab6748cfbc6b9f8934542a99047bfe30822d4c0d;hpb=cfe4ca10210b6f2d5fce5f423681e69c1a4fa86f;p=dpdk.git diff --git a/devtools/check-abi.sh b/devtools/check-abi.sh index ab6748cfbc..ca523eb94c 100755 --- a/devtools/check-abi.sh +++ b/devtools/check-abi.sh @@ -3,7 +3,7 @@ # Copyright (c) 2019 Red Hat, Inc. if [ $# != 2 ] && [ $# != 3 ]; then - echo "Usage: $0 refdir newdir [warnonly]" + echo "Usage: $0 refdir newdir [warnonly]" >&2 exit 1 fi @@ -13,23 +13,23 @@ warnonly=${3:-} ABIDIFF_OPTIONS="--suppr $(dirname $0)/libabigail.abignore --no-added-syms" if [ ! -d $refdir ]; then - echo "Error: reference directory '$refdir' does not exist." + echo "Error: reference directory '$refdir' does not exist." >&2 exit 1 fi incdir=$(find $refdir -type d -a -name include) if [ -z "$incdir" ] || [ ! -e "$incdir" ]; then - echo "WARNING: could not identify a include directory for $refdir, expect false positives..." + echo "WARNING: could not identify an include directory for $refdir, expect false positives..." >&2 else ABIDIFF_OPTIONS="$ABIDIFF_OPTIONS --headers-dir1 $incdir" fi if [ ! -d $newdir ]; then - echo "Error: directory to check '$newdir' does not exist." + echo "Error: directory to check '$newdir' does not exist." >&2 exit 1 fi incdir2=$(find $newdir -type d -a -name include) if [ -z "$incdir2" ] || [ ! -e "$incdir2" ]; then - echo "WARNING: could not identify a include directory for $newdir, expect false positives..." + echo "WARNING: could not identify an include directory for $newdir, expect false positives..." >&2 else ABIDIFF_OPTIONS="$ABIDIFF_OPTIONS --headers-dir2 $incdir2" fi @@ -44,25 +44,29 @@ for dump in $(find $refdir -name "*.dump"); do echo "Skipped glue library $name." continue fi + if grep -qE "\&2 error=1 continue fi abidiff $ABIDIFF_OPTIONS $dump $dump2 || { abiret=$? - echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'" + echo "Error: ABI issue reported for 'abidiff $ABIDIFF_OPTIONS $dump $dump2'" >&2 error=1 echo if [ $(($abiret & 3)) -ne 0 ]; then - echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, this could be a script or environment issue." + echo "ABIDIFF_ERROR|ABIDIFF_USAGE_ERROR, this could be a script or environment issue." >&2 fi if [ $(($abiret & 4)) -ne 0 ]; then - echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)." + echo "ABIDIFF_ABI_CHANGE, this change requires a review (abidiff flagged this as a potential issue)." >&2 fi if [ $(($abiret & 8)) -ne 0 ]; then - echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI." + echo "ABIDIFF_ABI_INCOMPATIBLE_CHANGE, this change breaks the ABI." >&2 fi echo }