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-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.
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=:
#
# 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
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
$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
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)
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP(1 a)
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP