From: Dan Kegel Date: Fri, 1 Apr 2022 19:38:36 +0000 (+0000) Subject: abicheck.sh: implement --refresh-if option as documented. X-Git-Tag: 2.1.0-beta1~285 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8117b0e7147922e5530fa70977ece0fb913054c2;p=thirdparty%2Fzlib-ng.git 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. --- diff --git a/.github/workflows/pkgcheck.yml b/.github/workflows/pkgcheck.yml index 41daf5f3..1c4b1dcb 100644 --- a/.github/workflows/pkgcheck.yml +++ b/.github/workflows/pkgcheck.yml @@ -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 }} diff --git a/test/abicheck.md b/test/abicheck.md index 3e291264..57337f58 100644 --- a/test/abicheck.md +++ b/test/abicheck.md @@ -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?) diff --git a/test/abicheck.sh b/test/abicheck.sh index 89199a59..5c142556 100755 --- a/test/abicheck.sh +++ b/test/abicheck.sh @@ -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