From cb23608ac99ce2b62f53f5100f19d1cf8607423d Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Fri, 5 Nov 2010 18:10:41 +0100 Subject: [PATCH] Tests defs: $testsbuilddir is now AC_SUBST'ed. * tests/defs.in ($testsbuilddir): Substitute from @abs_builddir@. Add sanity check on $testsbuilddir, similar to those on $testsrcdir and $top_testsrcdir. --- ChangeLog | 5 +++++ tests/defs.in | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ea0955525..587e91e20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2010-11-10 Stefano Lattarini + Tests defs: $testsbuilddir is now AC_SUBST'ed. + * tests/defs.in ($testsbuilddir): Substitute from @abs_builddir@. + 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 b9765d243..5124d2d40 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 . 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 -- 2.47.2