]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* tests/noinst-link.test: new test
authorAlexandre Oliva <oliva@dcc.unicamp.br>
Fri, 19 Mar 1999 16:54:29 +0000 (16:54 +0000)
committerAlexandre Oliva <aoliva@redhat.com>
Fri, 19 Mar 1999 16:54:29 +0000 (16:54 +0000)
* tests/Makefile.am (TESTS): added noinst-link.test
* doc/libtool.texi: document it

ChangeLog
doc/libtool.texi
tests/Makefile.am
tests/noinst-link.test [new file with mode: 0755]

index a634d5303e3feb136204d922d3f9d41cd565e61d..142da88af8a661561a1e2838381aa140bae99c06 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * tests/noinst-link.test: new test
+       * tests/Makefile.am (TESTS): added noinst-link.test
+       * doc/libtool.texi: document it
+
 1999-03-19  Gary V. Vaughan  <gvaughan@oranda.demon.co.uk>
 
        * ltmain.in (dependency_libs): There is no reason to infer that
index 38f09d827e0a89a1ea513ba129d57863d24dd176..4ebdfe9d657addd1fb889562edc7074fc00a6e16 100644 (file)
@@ -3150,6 +3150,11 @@ executables}.  This test checks the conditions under which your system
 linker hardcodes the library location, and guarantees that they
 correspond to libtool's own notion of how your linker behaves.
 
+@item noinst-link.test
+@pindex noinst-link.test
+Checks whether libtool will not try to link with a previously installed
+version of a library when it should be linking with a just-built one.
+
 @item link.test
 @pindex link.test
 This test guarantees that linking directly against a non-libtool static
index 2da711b4fe3c9c5a07abcd0a88c29d8d45d62984..3dd45e8b4bb13d716725694cdb858df7ba82a0ea 100644 (file)
@@ -22,7 +22,7 @@ TESTS = cdemo-static.test cdemo-make.test cdemo-exec.test \
        depdemo-inst.test depdemo-unst.test \
        cdemo-shared.test cdemo-make.test cdemo-exec.test \
        demo-shared.test demo-make.test demo-exec.test demo-inst.test \
-       hardcode.test build-relink.test demo-unst.test \
+       hardcode.test build-relink.test noinst-link.test demo-unst.test \
        depdemo-shared.test depdemo-make.test depdemo-exec.test \
        depdemo-inst.test depdemo-unst.test \
        mdemo-shared.test mdemo-make.test mdemo-exec.test \
diff --git a/tests/noinst-link.test b/tests/noinst-link.test
new file mode 100755 (executable)
index 0000000..bf20848
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh
+# noinst-link.test - make sure we do not link with an installed
+# library when an uninstalled one is to be used
+
+# Test script header.
+need_prefix=yes
+if test -z "$srcdir"; then
+  srcdir=`echo "$0" | sed 's%/[^/]*$%%'`
+  test "$srcdir" = "$0" && srcdir=.
+  test "${VERBOSE+set}" != "set" && VERBOSE=yes
+fi
+. $srcdir/defs || exit 1
+
+# Check that things are built.
+if test -f $prefix/lib/libhello.la; then :
+else
+  echo "You must run demo-inst.test before $0" 1>&2
+  exit 77
+fi
+
+# Change to our build directory.
+cd ../demo || exit 77
+
+echo "removing libhello.la and hell from ../demo"
+rm -f libhello.la hell
+
+echo "linking hell with a broken ../demo/libhello.la"
+if $make hell libhello_la_OBJECTS=hello.lo; then
+  echo "= Succeeded: this means the installed library was used, which is wrong"
+  status=1
+fi
+
+rm -f libhello.la hell
+
+exit $status