From 50f8b70f0dba1bfa3242c6de9991fdd04457ca04 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 1 May 2008 21:01:36 +0200 Subject: [PATCH] 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. --- ChangeLog | 13 +++++++++++++ modules/vc-list-files-tests | 4 +++- tests/test-vc-list-files-cvs.sh | 3 --- tests/test-vc-list-files-git.sh | 3 --- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index f3b5bf936..b39f3b0f6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-05-01 Jim Meyering + + 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 * lib/getndelim2.c (getndelim2): Fix newsize computation during diff --git a/modules/vc-list-files-tests b/modules/vc-list-files-tests index d0a423460..2650c4445 100644 --- a/modules/vc-list-files-tests +++ b/modules/vc-list-files-tests @@ -5,8 +5,10 @@ tests/test-vc-list-files-cvs.sh 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" diff --git a/tests/test-vc-list-files-cvs.sh b/tests/test-vc-list-files-cvs.sh index 91bdeac62..febd13b43 100755 --- 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 . */ -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 diff --git a/tests/test-vc-list-files-git.sh b/tests/test-vc-list-files-git.sh index 7fffc8357..5b8d94fb7 100755 --- 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 . */ -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 -- 2.11.0