* tests/defs.in ($testsbuilddir): Initialize "statically" with the value AC_SUBST'ed from @abs_builddir@, rather than "dinamically" with the value returned by `pwd`. Add sanity check on $testsbuilddir, similar to those on $testsrcdir and $top_testsrcdir. --- ChangeLog | 7 +++++++ tests/defs.in | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-)
From 030523a8fc6069d482f91d95bdcc632147b1b2da Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Fri, 5 Nov 2010 18:10:41 +0100 Subject: [PATCH 5/7] Tests defs: $testsbuilddir is now AC_SUBST'ed. * tests/defs.in ($testsbuilddir): Initialize "statically" with the value AC_SUBST'ed from @abs_builddir@, rather than "dinamically" with the value returned by `pwd`. Add sanity check on $testsbuilddir, similar to those on $testsrcdir and $top_testsrcdir. --- ChangeLog | 7 +++++++ tests/defs.in | 10 +++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 415cba9..3f89d8f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-11-06 Stefano Lattarini <stefano.lattar...@gmail.com> + Tests defs: $testsbuilddir is now AC_SUBST'ed. + * tests/defs.in ($testsbuilddir): Initialize "statically" + with the value AC_SUBST'ed from @abs_builddir@, rather than + "dinamically" with the value returned by `pwd`. + Add sanity check on $testsbuilddir, similar to those on + $testsrcdir and $top_testsrcdir. + Tests defs: do not print message "Running test $0" anymore. * tests/defs.in: Printing the message "=== Running test $0" at the beginning of each tests made sense when Automake used the old diff --git a/tests/defs.in b/tests/defs.in index b9765d2..5124d2d 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -28,6 +28,7 @@ # Absolutely necessary variable(s). testsrcdir='@abs_srcdir@' top_testsrcdir='@abs_top_srcdir@' +testbuilddir='@abs_builddir@' # Protect this file against multiple inclusion, useful for generated tests. if test x"$am_skip_defs" = xyes; then @@ -99,9 +100,6 @@ sleep='sleep @MODIFICATION_DELAY@' # in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>. old_timestamp=198309271735.59 -# Absolute path of the testsuite buildir. -testbuilddir=`pwd` - # Make our wrapper scripts accessible by default. PATH="$testbuilddir$PATH_SEPARATOR$PATH"; export PATH @@ -122,6 +120,12 @@ test -f "$testsrcdir/defs.in" || { exit 1 } +# Ensure $testbuilddir is set correctly. +test -f "$testbuilddir/defs" || { + echo "$me: $testbuilddir/defs not found, check \$testbuilddir" >&2 + exit 1 +} + # Unset some MAKE... variables that may cause $MAKE to act like a # recursively invoked sub-make. Any $MAKE invocation in a test is # conceptually an independent invocation, not part of the main -- 1.7.1