abicheck.sh: implement --refresh-if option as documented.

Also change exit status to nonzero if there is no abifile and --refresh or --refresh-if were not specified.
This commit is contained in:
Dan Kegel 2022-04-01 19:38:36 +00:00 committed by Hans Kristian Rosbach
parent f98729de07
commit 8117b0e714
3 changed files with 7 additions and 9 deletions

View File

@ -128,7 +128,7 @@ jobs:
# macOS runner does not contain abigail
if: runner.os != 'macOS'
run: |
sh test/abicheck.sh --refresh_if
sh test/abicheck.sh --refresh-if
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cxx-compiler }}
@ -143,7 +143,7 @@ jobs:
# macOS runner does not contain abigail
if: runner.os != 'macOS'
run: |
sh test/abicheck.sh --zlib-compat --refresh_if
sh test/abicheck.sh --zlib-compat --refresh-if
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cxx-compiler }}

View File

@ -29,7 +29,7 @@ means someone has to check out and build
the previous source tree and extract its .abi
using abidw. This can be slow.
If you don't mind the slowness, run abicheck.sh --refresh_if,
If you don't mind the slowness, run abicheck.sh --refresh-if,
and it will download and build the reference version
and extract the .abi on the spot if needed.
(FIXME: should this be the default?)

View File

@ -49,7 +49,7 @@ do
--refresh)
refresh=true
;;
--refresh_if)
--refresh-if)
refresh_if=true
;;
--help)
@ -134,12 +134,10 @@ then
# caching abi files in git (but that would slow builds down).
fi
if test -f "$ABIFILE"
if ! test -f "$ABIFILE"
then
ABIFILE="$ABIFILE"
else
echo "abicheck: SKIP: $ABIFILE not found; rerun with --refresh or --refresh_if"
exit 0
echo "abicheck: SKIP: $ABIFILE not found; rerun with --refresh or --refresh-if"
exit 1
fi
# Build unstripped, uninstalled, very debug shared library