summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2020-12-16 14:54:45 +0200
committerPanu Matilainen <pmatilai@redhat.com>2021-03-22 12:12:12 +0200
commitf2a21fa2d9bf1bcdc706bcbbf7851321aceda506 (patch)
tree16caad73293e01893a705a90434471cc8e8ecdf6
parent392c2399386104526e92e871a4783cb4f380ecdf (diff)
downloadrpm-f2a21fa2d9bf1bcdc706bcbbf7851321aceda506.tar.gz
Add test for libtool versioning sanity
Test that the shared objects created during compilation matches the expectations of the person bumping the libtool version, which is oh so easy to get wrong. This of course needs to be skipped for static builds. Backported from commit 1c6d2f9352537fe391237e292566224ca7d22515
-rw-r--r--tests/atlocal.in4
-rw-r--r--tests/rpmgeneral.at15
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 0974693a3..436db82f2 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -1,5 +1,7 @@
-LD_LIBRARY_PATH="${abs_builddir}/testing@usrlibdir@"
+RPMLIBDIR="@usrlibdir@"
+LD_LIBRARY_PATH="${abs_builddir}/testing/${RPMLIBDIR}"
export LD_LIBRARY_PATH
+export RPMLIBDIR
PATH="${abs_builddir}/testing@rpmbindir@:${abs_builddir}/testing@usrbindir@:${abs_builddir}/testing@usrlibexecdir@:$PATH"
export PATH
diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at
index 4cfc7cd2f..3d02e7767 100644
--- a/tests/rpmgeneral.at
+++ b/tests/rpmgeneral.at
@@ -35,6 +35,21 @@ AT_CHECK([runroot rpmbuild --version],[0],
])
AT_CLEANUP
+# Check that libtool versioning matches expectations, it's easy to screw up.
+AT_SETUP([rpm library version])
+AT_KEYWORDS([basic])
+AT_SKIP_IF(test -f "${RPMTEST}/${RPMLIBDIR}/librpm.a")
+AT_CHECK([
+cd ${RPMTEST}/${RPMLIBDIR}
+ls lib*.so.*.*
+],
+[0],
+[librpm.so.9.0.1
+librpmbuild.so.9.0.1
+librpmio.so.9.0.1
+librpmsign.so.9.0.1
+])
+AT_CLEANUP
# ------------------------------
AT_SETUP([rpm --showrc])