From: Stefano Lattarini Date: Wed, 23 Feb 2011 20:38:04 +0000 (+0100) Subject: Merge branch 'maint' X-Git-Tag: ng-0.5a~230 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd22dca159cfa10ecbb822d0dd6cc677cf333aab;p=thirdparty%2Fautomake.git Merge branch 'maint' --- fd22dca159cfa10ecbb822d0dd6cc677cf333aab diff --cc tests/defs index a32ef1563,fd0cc9cd5..99c9b3fe8 --- a/tests/defs +++ b/tests/defs @@@ -451,20 -248,22 +451,20 @@@ case " $required " i ;; esac -# We use a trap below for cleanup. This requires us to go through -# hoops to get the right exit status transported through the signal. -# So use `Exit STATUS' instead of `exit STATUS' inside of the tests. -# Turn off errexit here so that we don't trip the bug with OSF1/Tru64 -# sh inside this function. -Exit () -{ - set +e - (exit $1) - exit $1 -} -curdir=`pwd` +## ---------------------------------------------------------------- ## +## Create and set up of the temporary directory used by the test. ## +## Set up of the exit trap for cleanup of said directory. ## +## ---------------------------------------------------------------- ## + +# The subdirectory where the current test script will run and write its +# temporary/data files. This will be created shortly, and will be removed +# by the cleanup trap below if the test passes. If the test doesn't pass, +# this directory will be kept, to facilitate debugging. testSubDir=$me.dir + test ! -d $testSubDir || { - find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";" + find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";" rm -rf $testSubDir } mkdir $testSubDir @@@ -474,10 -272,10 +474,10 @@@ cd ./$testSubDi if test "$sh_errexit_works" = yes; then trap 'exit_status=$? set +e - cd "$curdir" + cd "$testbuilddir" case $exit_status,$keep_testdirs in 0,) - find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";" + find $testSubDir -type d ! -perm -700 -exec chmod u+rwx {} ";" rm -rf $testSubDir ;; esac