]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
Fix spurious testsuite failures on AIX due on NFS mounts due to
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 12 Feb 2007 22:29:05 +0000 (22:29 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 12 Feb 2007 22:29:05 +0000 (22:29 +0000)
shared library images that cannot be removed without `slibclean'
which needs superuser privileges.

* tests/testsuite.at (PREPARE_TESTS): Define $mkdir_p globally.
(LT_AT_MVDIR): New macro to emulate `mv dir dest'.
* tests/destdir.at: Use LT_AT_MVDIR.
* tests/shlibpath.at: Likewise.
* tests/static.at: Likewise.

ChangeLog
tests/destdir.at
tests/shlibpath.at
tests/static.at
tests/testsuite.at

index 4b59e448e1c9003f83d4f2d03cc73e51a78b741c..6805db739021ca64541e6c1e2d3cb4f98fcb7999 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2007-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix spurious testsuite failures on AIX due on NFS mounts due to
+       shared library images that cannot be removed without `slibclean'
+       which needs superuser privileges.
+
+       * tests/testsuite.at (PREPARE_TESTS): Define $mkdir_p globally.
+       (LT_AT_MVDIR): New macro to emulate `mv dir dest'.
+       * tests/destdir.at: Use LT_AT_MVDIR.
+       * tests/shlibpath.at: Likewise.
+       * tests/static.at: Likewise.
+
 2007-02-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * tests/export.at: Exporting is not fully functional with
index 9ead46f553bbe9705737603866656474886c8502..b403235a4109c0711b74f7cef05453b9ecd68198 100644 (file)
@@ -33,7 +33,6 @@ else
 fi
 libdir=$prefix/lib
 bindir=$prefix/bin
-: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
 $mkdir_p src $prefix $DESTDIR $DESTDIR$prefix
 eval `$LIBTOOL --config | $EGREP '^(FGREP|OBJDUMP)='`
 ])
@@ -57,8 +56,8 @@ AT_CHECK([$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la],
 AT_CHECK([$LIBTOOL --mode=install cp m $DESTDIR$bindir/m],
         [], [ignore], [ignore])
 $LIBTOOL --mode=clean rm -f liba.la m
-mv $DESTDIR$libdir $libdir
-mv $DESTDIR$bindir $bindir
+LT_AT_MVDIR(["$DESTDIR$libdir"], ["$libdir"])
+LT_AT_MVDIR(["$DESTDIR$bindir"], ["$bindir"])
 # We ignore failure on purpose here: we may not be root.
 AT_CHECK([$LIBTOOL --mode=finish $libdir], [ignore], [ignore], [ignore])
 LT_AT_EXEC_CHECK([$bindir/m])
@@ -96,9 +95,9 @@ AT_CHECK([$LIBTOOL --mode=install cp liba.la $DESTDIR$libdir/liba.la],
 AT_CHECK([$LIBTOOL --mode=install cp m $DESTDIR$bindir/m],
         [], [ignore], [ignore])
 $LIBTOOL --mode=clean rm -f liba1dep.la liba2dep.la liba.la m
-mv $DESTDIR$libdir $libdir
-mv $DESTDIR${libdir}2 ${libdir}2
-mv $DESTDIR$bindir $bindir
+LT_AT_MVDIR(["$DESTDIR$libdir"], ["$libdir"])
+LT_AT_MVDIR(["$DESTDIR${libdir}2"], ["${libdir}2"])
+LT_AT_MVDIR(["$DESTDIR$bindir"], ["$bindir"])
 # We ignore failure on purpose here: we may not be root.
 AT_CHECK([$LIBTOOL --mode=finish $libdir ${libdir}2], [ignore], [ignore], [ignore])
 
index 0d91432a87a53f1ce3cbc813a5293c70f302ae97..0fa750acf451754f6c15ced4598acb92da9a3fcc 100644 (file)
@@ -35,7 +35,7 @@ AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m m.$OBJEXT -Lsub/lib -la
 AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o m2 m.$OBJEXT -Lsub/lib -la],
          [], [ignore], [ignore])
 
-mv sub moved
+LT_AT_MVDIR([sub], [moved])
 mkdir sub sub/lib sub/bin
 echo 'int wrong_lib () { return 0; }' > a.c
 $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c a.c
index 680ee895983504c2be95f0bee8580121db92bd91..2e0d1e793fa4862abcf9fd6f1d0d36fdcb2b7e5d 100644 (file)
@@ -100,18 +100,18 @@ mkdir $srcdir_broken $libdir_broken
 
 func_move_libs ()
 {
-  mv ${1} ${1}-moved
-  mv ${2} ${2}-moved
-  mv $srcdir_broken ${1}
-  mv $libdir_broken ${2}
+  LT_AT_MVDIR(["${1}"], ["${1}-moved"])
+  LT_AT_MVDIR(["${2}"], ["${2}-moved"])
+  LT_AT_MVDIR(["$srcdir_broken"], ["${1}"])
+  LT_AT_MVDIR(["$libdir_broken"], ["${2}"])
 }
 
 func_restore_libs ()
 {
-  mv ${2} $libdir_broken
-  mv ${1} $srcdir_broken
-  mv ${2}-moved ${2}
-  mv ${1}-moved ${1}
+  LT_AT_MVDIR(["${2}"], ["$libdir_broken"])
+  LT_AT_MVDIR(["${1}"], ["$srcdir_broken"])
+  LT_AT_MVDIR(["${2}-moved"], ["${2}"])
+  LT_AT_MVDIR(["${1}-moved"], ["${1}"])
 }
 
 # make sure the program can be run.
index 37e83b4e69bcd648ada038400e8e5095adf4c22e..f25fd3e3ec2c35c63720e0e7efc78e830d8c5484 100644 (file)
@@ -40,6 +40,7 @@ if (FOO=bar; unset FOO) >/dev/null 2>&1; then
 else
   unset=false
 fi
+: ${mkdir_p="$abs_top_srcdir/libltdl/config/install-sh -d"}
 m4_divert_pop([PREPARE_TESTS])dnl
 
 
@@ -185,6 +186,21 @@ AT_CHECK([{ test -n "[$]$1" && test "X[$]$1" != Xno; } || (exit 77)])
 ])
 
 
+# LT_AT_MVDIR(SRC, DEST)
+# ----------------------
+# Move contents of a directory recursively.
+# Avoid `mv DIR ...' due to issues with non-deletable shared libraries
+# on AIX on NFS mounts.  We cannot use slibclean as non-superuser.
+m4_define([LT_AT_MVDIR],
+[$mkdir_p $2
+(cd $1 && find . -type d) | (cd $2 && xargs $mkdir_p)
+for file in `cd $1 && find . -type f -print -o -type l -print`
+do
+  mv $1/$file $2/$file
+done
+rm -rf $1
+])
+
 ## ------------------------------- ##
 ## Files for a small ltdl project. ##
 ## ------------------------------- ##