]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests setup: unset CDPATH
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 Jul 2012 09:50:54 +0000 (11:50 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 1 Jul 2012 09:50:54 +0000 (11:50 +0200)
So that our test scripts can safely chdir around using relative
paths as well, without having to worry abut possible CDPATH
interferences.

* defs-static.in: unset CDPATH.
* t/ax/tests-init.sh: Remove a now-unneeded workaround.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
defs-static.in
t/ax/test-init.sh

index a1878cca21af806bf931fed61d7c37c720f1e458..69012128aecab19ac9c90963f83d51a8dc1424a3 100644 (file)
@@ -25,6 +25,9 @@
 #     shell, not only with configure-time detected $SHELL and/or
 #     $AM_TEST_RUNNER_SHELL.
 
+# CDPATH is evil if exported in the environment.
+CDPATH=; unset CDPATH
+
 # Be more Bourne compatible.
 # (Snippet inspired to configure's initialization in Autoconf 2.64)
 DUALCASE=1; export DUALCASE # for MKS sh
index c6d2abdb4574c2a3de88e333f6f80d70aa273003..e038c5b5a3614b19d29abc7618b8076d1b824c09 100644 (file)
@@ -992,8 +992,7 @@ else
     || framework_failure_ "removing old test subdirectory"
   $MKDIR_P $am_test_subdir \
     || framework_failure_ "creating test subdirectory"
-  # The leading './' is to avoid CDPATH issues.
-  cd ./$am_test_subdir \
+  cd $am_test_subdir \
     || framework_failure_ "cannot chdir into test subdirectory"
   if test x"$am_create_testdir" != x"empty"; then
     cp "$am_scriptdir"/install-sh "$am_scriptdir"/missing \