* tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
* tests/Makefile.am ($(parallel_tests)): Generation of derived
tests updated.
2010-09-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Tests defs: $srcdir and $top_srcdir renaming.
+ * tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
+ * tests/Makefile.am ($(parallel_tests)): Generation of derived
+ tests updated.
+
Tests defs: new variable $top_testsrcdir.
* tests/defs.in ($top_testsrcdir): Define unconditionally
to @abs_top_srcdir@. Use it throughout.
{ echo '#!/bin/sh'; \
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
- echo '# Ensure proper definition of $$srcdir.'; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
echo 'am_skip_defs=yes'; \
echo '. ./defs || exit 99'; \
- echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "# Run the test with Automake's parallel-tests driver enabled."; \
echo 'parallel_tests=yes'; \
echo "if test -f \"./$$input\"; then"; \
echo " . \"./$$input\""; \
echo 'else'; \
- echo " . \"\$$srcdir/$$input\""; \
+ echo " . \"\$$testsrcdir/$$input\""; \
echo 'fi'; \
} > $@-t
$(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
{ echo '#!/bin/sh'; \
echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
echo; \
- echo '# Ensure proper definition of $$srcdir.'; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
echo 'am_skip_defs=yes'; \
echo '. ./defs || exit 99'; \
- echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
echo; \
echo "# Run the test with Automake's parallel-tests driver enabled."; \
echo 'parallel_tests=yes'; \
echo "if test -f \"./$$input\"; then"; \
echo " . \"./$$input\""; \
echo 'else'; \
- echo " . \"\$$srcdir/$$input\""; \
+ echo " . \"\$$testsrcdir/$$input\""; \
echo 'fi'; \
} > $@-t
$(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
# Tom Tromey <tromey@cygnus.com>
# Absolutely necessary variable(s).
-srcdir='@abs_srcdir@'
+testsrcdir='@abs_srcdir@'
top_testsrcdir='@abs_top_srcdir@'
# Protect this file against multiple inclusion, useful for generated tests.
exit 1
}
-# Ensure $srcdir is set correctly.
-test -f "$srcdir/defs.in" || {
- echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
+# Ensure $testsrcdir is set correctly.
+test -f "$testsrcdir/defs.in" || {
+ echo "$testsrcdir/defs.in not found, check \$testsrcdir" 1>&2
exit 1
}
unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
unset htmldir includedir infodir libdir libexecdir localedir mandir
unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# The tests call `make -e' but we do not want $srcdir from the environment
+# to override the definition from the Makefile.
+unset srcdir
# Also unset variables that control our test driver. While not
# conceptually independent, they cause some changed semantics we
# need to control (and test for) in some of the tests to ensure
# Libtool cannot cope with spaces in the build tree. Our testsuite setup
# cannot cope with spaces in the source tree name for Libtool and gettext
# tests.
- case $srcdir,`pwd` in
+ case $testsrcdir,`pwd` in
*\ * | *\ *) Exit 77;;
esac
ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I $aclocaldir"
# and can be up to 3 seconds in the future w.r.t. the system clock.
sleep='sleep @MODIFICATION_DELAY@'
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-testsrcdir=$srcdir
-unset srcdir
-
# An old timestamp that can be given to a file, in "touch -t" format.
# The time stamp should be portable to all file systems of interest.
# Just for fun, choose the exact time of the announcement of the GNU project