changeset 10029:8f3d95672dd7

vc-list-files: make the stand-alone gnulib test work * modules/vc-list-files-tests (configure.ac): Define and AC_SUBST abs_aux_dir. (Makefile.am) [TESTS_ENVIRONMENT]: Rather than passing $(abs_top_srcdir) to each script and having each of them duplicate the work of setting PATH, set PATH here, using the new variable, abs_aux_dir instead. * tests/test-vc-list-files-cvs.sh: Don't set PATH here. * tests/test-vc-list-files-git.sh: Likewise. Reported by Bruno Haible.
author Jim Meyering <meyering@redhat.com>
date Thu, 01 May 2008 21:01:36 +0200
parents bd5f3690f627
children 64792faf3cbe
files ChangeLog modules/vc-list-files-tests tests/test-vc-list-files-cvs.sh tests/test-vc-list-files-git.sh
diffstat 4 files changed, 16 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2008-05-01  Jim Meyering  <meyering@redhat.com>
+
+	vc-list-files: make the stand-alone gnulib test work
+	* modules/vc-list-files-tests (configure.ac):
+	Define and AC_SUBST abs_aux_dir.
+	(Makefile.am) [TESTS_ENVIRONMENT]: Rather than passing
+	$(abs_top_srcdir) to each script and having each of them
+	duplicate the work of setting PATH, set PATH here, using
+	the new variable, abs_aux_dir instead.
+	* tests/test-vc-list-files-cvs.sh: Don't set PATH here.
+	* tests/test-vc-list-files-git.sh: Likewise.
+	Reported by Bruno Haible.
+
 2008-05-01  Bruno Haible  <bruno@clisp.org>
 
 	* lib/getndelim2.c (getndelim2): Fix newsize computation during
--- a/modules/vc-list-files-tests
+++ b/modules/vc-list-files-tests
@@ -5,8 +5,10 @@
 Depends-on:
 
 configure.ac:
+abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+AC_SUBST([abs_aux_dir])
 
 Makefile.am:
 TESTS += test-vc-list-files-git.sh
 TESTS += test-vc-list-files-cvs.sh
-TESTS_ENVIRONMENT += abs_top_srcdir='$(abs_top_srcdir)'
+TESTS_ENVIRONMENT += PATH='$(abs_aux_dir)':"$$PATH"
--- a/tests/test-vc-list-files-cvs.sh
+++ b/tests/test-vc-list-files-cvs.sh
@@ -16,9 +16,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-PATH="$abs_top_srcdir/build-aux":$PATH
-export PATH
-
 tmpdir=vc-cvs-$$
 trap 'st=$?; cd '"`pwd`"' && rm -rf $tmpdir; exit $st' 0
 trap '(exit $?); exit $?' 1 2 13 15
--- a/tests/test-vc-list-files-git.sh
+++ b/tests/test-vc-list-files-git.sh
@@ -16,9 +16,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-PATH="$abs_top_srcdir/build-aux":$PATH
-export PATH
-
 if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
   compare() { diff -u "$@"; }
 elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then