[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Honor AUTOTEST_PATH [installcheck]
From: |
Noah Misch |
Subject: |
Honor AUTOTEST_PATH [installcheck] |
Date: |
Wed, 8 Dec 2004 23:18:21 -0800 |
User-agent: |
Mutt/1.5.6i |
Autotest inadvertantly prepends an empty path member to the testsuite PATH,
which makes uninstalled wrapper scripts take precedence over installed scripts
despite any AUTOTEST_PATH="...". I fixed this and a nearby standards nit and
added missing dependencies to installcheck. Since autom4te uses autotest.m4f to
generate `testsuite', I moved `tests' after `lib' in SUBDIRS; that way, a
`testsuite' rebuild in response to m4 changes picks up the updated m4f.
Patch is against HEAD. All regressions continue to pass, and I have verified
with `ps' that the test suite exercises the correct scripts in both the `make
check' and `make installcheck' cases.
2004-12-08 Noah Misch <address@hidden>
* lib/autotest/general.m4 (AT_INIT): Replace a `tr' with a `sed'. Join
PATH members so as to not prepend an empty element. Move a comment.
* Makefile.am (SUBDIRS): Build in `tests' last.
* tests/Makefile.am (installcheck-local): Add check-local dependencies.
diff -X dontdiff -urp ac-clean/lib/autotest/general.m4
ac-installcheck/lib/autotest/general.m4
--- ac-clean/lib/autotest/general.m4 2004-09-05 18:26:41.000000000 -0400
+++ ac-installcheck/lib/autotest/general.m4 2004-12-09 01:26:28.714744869
-0500
@@ -440,29 +440,30 @@ m4_divert_push([PREPARE_TESTS])dnl
# For embedded test suites, AUTOTEST_PATH is relative to the top level
# of the package. Then expand it into build/src parts, since users
# may create executables in both places.
-#
-# 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`
+AUTOTEST_PATH=`echo $AUTOTEST_PATH | sed "s,:,$PATH_SEPARATOR,g"`
at_path=
_AS_PATH_WALK([$AUTOTEST_PATH $PATH],
-[case $as_dir in
+[test -n "$at_path" && at_path=$at_path$PATH_SEPARATOR
+case $as_dir in
[[\\/]]* | ?:[[\\/]]* )
- at_path=$at_path$PATH_SEPARATOR$as_dir
+ at_path=$at_path$as_dir
;;
* )
if test -z "$at_top_builddir"; then
# Stand-alone test suite.
- at_path=$at_path$PATH_SEPARATOR$as_dir
+ at_path=$at_path$as_dir
else
# Embedded test suite.
- at_path=$at_path$PATH_SEPARATOR$at_top_builddir/$as_dir
- at_path=$at_path$PATH_SEPARATOR$at_top_srcdir/$as_dir
+ at_path=$at_path$at_top_builddir/$as_dir$PATH_SEPARATOR
+ at_path=$at_path$at_top_srcdir/$as_dir
fi
;;
esac])
# Now build and simplify PATH.
+#
+# There might be directories that don't exist, but don't redirect
+# builtins' (eg., cd) stderr directly: Ultrix's sh hates that.
PATH=
_AS_PATH_WALK([$at_path],
[as_dir=`(cd "$as_dir" && pwd) 2>/dev/null`
diff -X dontdiff -urp ac-clean/Makefile.am ac-installcheck/Makefile.am
--- ac-clean/Makefile.am 2004-01-05 02:05:22.000000000 -0500
+++ ac-installcheck/Makefile.am 2004-12-09 01:26:28.714744869 -0500
@@ -22,7 +22,7 @@
# bin/ and tests/ must be run first, as they build the tests executables
# (tests/autom4te etc.), that we happen to use here.
-SUBDIRS = bin tests . lib config man doc
+SUBDIRS = bin . lib config man doc tests
ACLOCAL_AMFLAGS = -I config
diff -X dontdiff -urp ac-clean/tests/Makefile.am
ac-installcheck/tests/Makefile.am
--- ac-clean/tests/Makefile.am 2004-05-24 19:29:43.000000000 -0400
+++ ac-installcheck/tests/Makefile.am 2004-12-09 01:27:05.457069691 -0500
@@ -105,7 +105,7 @@ check-local: atconfig atlocal $(TESTSUIT
$(SHELL) $(TESTSUITE)
# Run the test suite on the *installed* tree.
-installcheck-local:
+installcheck-local: atconfig atlocal $(TESTSUITE)
$(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
- Honor AUTOTEST_PATH [installcheck],
Noah Misch <=