From: Ralf Wildenhues Date: Sat, 23 May 2009 21:05:17 +0000 (+0200) Subject: testsuite: do not change the mode of installed Libtool files. X-Git-Tag: v1.11.1~15^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9bd0090cf471a088bc0119cd989c06a63d2408e;p=thirdparty%2Fautomake.git testsuite: do not change the mode of installed Libtool files. * tests/defs.in: Do not use `chmod -R' on the test directory, as that may change or try to change the mode of installed files: the test directory may contain symlinks to ltmain.sh files from a Libtool installation, and Solaris `chmod -R' touches symlink targets. Instead, use the cleanup strategy used in distdir.am. * NEWS: Update. Report by Dagobert Michelsen. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index cb0c44f15..c20ffbcde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-05-23 Ralf Wildenhues + testsuite: do not change the mode of installed Libtool files. + * tests/defs.in: Do not use `chmod -R' on the test directory, as + that may change or try to change the mode of installed files: + the test directory may contain symlinks to ltmain.sh files from + a Libtool installation, and Solaris `chmod -R' touches symlink + targets. Instead, use the cleanup strategy used in distdir.am. + * NEWS: Update. + Report by Dagobert Michelsen. + testsuite: do not fail in cleanup code. * tests/defs.in: Turn off errexit in the cleanup trap, to avoid a test failure due to a nonzero command. diff --git a/NEWS b/NEWS index 20d5080d2..48873d030 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,9 @@ Bugs fixed in 1.11.0a: `get_python_lib' function if it points outside the configured prefix, unless the `--prefix' argument was either `/usr' or below `/System'. + - The testsuite does not try to change the mode of `ltmain.sh' files from + a Libtool installation (symlinked to test directories) any more. + New in 1.11: diff --git a/tests/defs.in b/tests/defs.in index 7d74dd217..0254d3afe 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -247,8 +247,10 @@ Exit () curdir=`pwd` testSubDir=$me.dir -chmod -R u+rwx $testSubDir > /dev/null 2>&1 -rm -rf $testSubDir > /dev/null 2>&1 +test ! -d $testSubDir || { + find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";" + rm -rf $testSubDir +} mkdir $testSubDir sh_errexit_works=@sh_errexit_works@ @@ -258,8 +260,9 @@ if test "$sh_errexit_works" = yes; then cd "$curdir" case $exit_status,$keep_testdirs in 0,) - chmod -R a+rwx $testSubDir > /dev/null 2>&1 - rm -rf "$testSubDir" ;; + find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";" + rm -rf $testSubDir + ;; esac test "$signal" != 0 && echo "$as_me: caught signal $signal"