[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04-fyi-no-dot-in-autotest-path.patch
From: |
Akim Demaille |
Subject: |
04-fyi-no-dot-in-autotest-path.patch |
Date: |
Mon, 28 Jan 2002 11:51:37 +0100 |
Index: ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: lib/autotest/general.m4
--- lib/autotest/general.m4 Sat, 05 Jan 2002 15:20:22 +0100 akim
+++ lib/autotest/general.m4 Sat, 26 Jan 2002 15:16:08 +0100 akim
@@ -120,8 +120,6 @@ m4_define([AT_banner_ordinal], 0)
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 @@ Usage: $[0] [[OPTION]... [VARIABLE=VALUE
#
# 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 @@ Usage: $[0] [[OPTION]... [VARIABLE=VALUE
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 @@ Usage: $[0] [[OPTION]... [VARIABLE=VALUE
$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: tests/m4sh.at
--- tests/m4sh.at Wed, 14 Nov 2001 20:54:00 +0100 akim
+++ tests/m4sh.at Sun, 27 Jan 2002 17:37:18 +0100 akim
@@ -71,16 +71,16 @@ m4_define([AT_DATA_LINENO],
AT_DATA_LINENO([test/test-1.as], [false], [$@&address@hidden, [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], [$@&address@hidden, [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 @@ m4_define([DIRNAME_TEST],
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP
@@ -198,7 +198,7 @@ m4_define([BASENAME_TEST],
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP
@@ -228,7 +228,7 @@ m4_define([BASENAME_TEST],
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP(1 a)
@@ -258,6 +258,6 @@ m4_define([BASENAME_TEST],
]])
AT_CHECK_M4SH
-AT_CHECK([script])
+AT_CHECK([./script])
AT_CLEANUP
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- 04-fyi-no-dot-in-autotest-path.patch,
Akim Demaille <=