]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autotest/general.m4 (AT_INIT): Don't be ridiculous: adjust
authorAkim Demaille <akim@epita.fr>
Mon, 28 Jan 2002 10:46:00 +0000 (10:46 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 28 Jan 2002 10:46:00 +0000 (10:46 +0000)
AUTOTEST_PATH *after* it was set.
Don't put `.' in the PATH: the user should be precise and `./' if
needed.  In addition, given that the test suite does some `cd', if
`.' is in the path, the `tested programs' sections will report
programs found in the test suite's directory, while during the
tests (performed in their own directory), these programs are no
longer visible.  In other words, the results is confusing and
useless.
* tests/m4sh.at: Adjust: don't rely on `.' being in the PATH.

ChangeLog
lib/autotest/general.m4
tests/m4sh.at

index b7e319bebf6bb4a85c0f33b7108b3bc240126893..5b6220d9eefdd2f9a40d3fbb1c81fe2395c513e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2002-01-28  Akim Demaille  <akim@epita.fr>
+
+       * lib/autotest/general.m4 (AT_INIT): Don't be ridiculous: adjust
+       AUTOTEST_PATH *after* it was set.
+       Don't put `.' in the PATH: the user should be precise and `./' if
+       needed.  In addition, given that the test suite does some `cd', if
+       `.' is in the path, the `tested programs' sections will report
+       programs found in the test suite's directory, while during the
+       tests (performed in their own directory), these programs are no
+       longer visible.  In other words, the results is confusing and
+       useless.
+       * tests/m4sh.at: Adjust: don't rely on `.' being in the PATH.
+
 2002-01-24  Akim Demaille  <akim@epita.fr>
 
        Version 2.52g.
index 1940bfcbc306d200cfed5efe5b3ec39365924058..646d23bc21a583706ea6dd02511ebe100f933dcd 100644 (file)
@@ -120,8 +120,6 @@ if test -n "$at_top_srcdir"; then
   done
 fi
 
-AUTOTEST_PATH=`echo $AUTOTEST_PATH | tr ':' $PATH_SEPARATOR`
-
 # Not all shells have the 'times' builtin; the subshell is needed to make
 # sure we discard the 'times: not found' message from the shell.
 at_times=:
@@ -352,6 +350,7 @@ fi
 #
 # There might be directories that don't exist, but don't redirect
 # builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
+AUTOTEST_PATH=`echo $AUTOTEST_PATH | tr ':' $PATH_SEPARATOR`
 at_path=
 _AS_PATH_WALK([$AUTOTEST_PATH $PATH],
 [case $as_dir in
@@ -371,9 +370,7 @@ _AS_PATH_WALK([$AUTOTEST_PATH $PATH],
 esac])
 
 # Now build and simplify PATH.
-# Be sure to put `.' in front too: we will `cd', and we must be
-# run to run what is in the current directory (e.g., in a group directory).
-PATH=.
+PATH=
 _AS_PATH_WALK([$at_path],
 [as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
 test -d "$as_dir" || continue
@@ -382,7 +379,9 @@ case $PATH in
                   $as_dir$PATH_SEPARATOR* | \
   *$PATH_SEPARATOR$as_dir                 | \
   *$PATH_SEPARATOR$as_dir$PATH_SEPARATOR* ) ;;
-  *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
+
+  '') PATH=$as_dir ;;
+   *) PATH=$PATH$PATH_SEPARATOR$as_dir ;;
 esac])
 export PATH
 
index a8177e0d381d7ed720d20ec5fd54c3a20c7cbec1..a452a13d7cbc3fe0ab8e8fceac9e26674266199f 100644 (file)
@@ -71,16 +71,16 @@ AT_CHECK([mkdir test || exit 77])
 
 AT_DATA_LINENO([test/test-1.as], [false], [$@&t@LINENO], [LINENO])
 AT_CHECK([autom4te -l m4sh test/test-1.as -o test/test-1])
-AT_CHECK([test/test-1],                            0, [expout])
+AT_CHECK([./test/test-1],                          0, [expout])
 AT_CHECK([PATH=test$PATH_SEPARATOR$PATH test-1],   0, [expout])
-AT_CHECK([sh test/test-1],                         0, [expout])
+AT_CHECK([sh ./test/test-1],                       0, [expout])
 
 # Now using a disabled LINENO, with different call conventions.
 AT_DATA_LINENO([test/test-2.as], [true], [$@&t@LINENO], [LINENO])
 AT_CHECK([autom4te -l m4sh test/test-2.as -o test/test-2])
-AT_CHECK([test/test-2],                            0, [expout])
+AT_CHECK([./test/test-2],                          0, [expout])
 AT_CHECK([PATH=test$PATH_SEPARATOR$PATH test-2],   0, [expout])
-AT_CHECK([sh test/test-2],                         0, [expout])
+AT_CHECK([sh ./test/test-2],                       0, [expout])
 
 # Beware that *.lineno scripts can be *here* while the masters are in test/.
 AT_CLEANUP(reference test test-1.lineno test-2.lineno)
@@ -141,7 +141,7 @@ AS_EXIT(0)
 ]])
 
 AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
 
 AT_CLEANUP
 
@@ -198,7 +198,7 @@ AS_EXIT(0)
 ]])
 
 AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
 
 AT_CLEANUP
 
@@ -228,7 +228,7 @@ AS_EXIT(0)
 ]])
 
 AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
 
 AT_CLEANUP(1 a)
 
@@ -258,6 +258,6 @@ esac
 ]])
 
 AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
 
 AT_CLEANUP