diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-05-31 09:14:31 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-05-31 09:23:31 +0200 |
commit | b1d7d6ece4e7d637c4a635477215a8a1de8cfdce (patch) | |
tree | 151260467224007004be8d7f853886e22726fba2 /tests/soname | |
parent | 4bc67882e72929732b1d9cccc73e606f3a44f542 (diff) | |
download | libtasn1-b1d7d6ece4e7d637c4a635477215a8a1de8cfdce.tar.gz |
tests: ensure that soname is not accidentally bumpedtmp-soname-check2
Based on patch by Andreas Metzler.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/soname')
-rwxr-xr-x | tests/soname | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/soname b/tests/soname new file mode 100755 index 0000000..ccc75f6 --- /dev/null +++ b/tests/soname @@ -0,0 +1,24 @@ +#!/bin/sh +set -e + +srcdir=${srcdir:-.} +top_builddir=${top_builddir:-.} +build_triplet=${build_triplet:-.} +host_triplet=${host_triplet:-.} + + +if [ "${build_triplet}" != "${host_triplet}" ]; then + echo "cross-compiling, not running soname check." 2>&1 + exit 77 +fi +if ! echo "${build_triplet}" | grep linux > /dev/null ; then + exit 77 +fi +if ! [ -x "$(command -v objdump)" ]; then + echo "objdump not available" 1>&2 + exit 77 +fi + +newsoname=$(objdump -p ${top_builddir}/lib/.libs/libtasn1.so | sed -n '/^ *SONAME /s/^ *SONAME *//p') + +[ "${newsoname}" = "libtasn1.so.6" ] |