This is a follow-up to today's same-name commit
v1.12.4-181-g5ddf100,
which did the same for the test cases in master.
* All tests: To run the common setup, use the command:
. test-init.sh
instead of the older, "historical" one:
. ./defs || exit 1
Note that the "|| exit 1" wasn't really useful, since the 'errexit'
shell flag is in effect in both './defs' and 'test-init.sh', and all
the known shells that are good enough to run the automake testsuite
do automatically exit with error when a sourced file cannot be found
(at least, they do so in non-interactive mode, which is the only
mode that concerns us in the testsuite).
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
# - $(am.all-libs).
# - $(am.all-ltlibs).
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [who-cares])
# * cleaning rules and "make distcheck" interaction.
#
-. ./defs || exit 1
+. test-init.sh
d=.am
# scenarios.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
# Filter out Automake comments.
grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
# set the variables '$xdir' and '$vpath' appropriately.
required=cc
-. ./defs || exit 1
+. test-init.sh
test x${xdir+"set"} = x"set" || fatal_ "\$xdir is unset"
test x${vpath+"set"} = x"set" || fatal_ "\$vpath is unset"
# and newline sequence, because GNU make handles that gracefully.
#
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# test 'clean-many2.sh', which fakes an artificially low command line
# length limit for 'rm'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([safe_include], [include])
# The sister test 'clean-many.sh' try to hit the real command line length
# limit of the system, by declaring a huge number of files to be cleaned.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Especially checks that it is possible to extend them also from a
# "wrapper" makefile never processed nor seen by Automake.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Check internal make variable populated from AC_CONFIG_HEADERS calls.
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<'EOF'
AC_SUBST([BOT], [bot])
# Test vi-style tags.
required=${CTAGS:=ctags}
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
# For now, require the GNU compilers, to avoid possible spurious failure.
required='gfortran g++'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# removed.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CC
# sister test 'dist-many2.sh', which fakes an artificially low
# command line length limit for 'mkdir' and the shell.
-. ./defs || exit 1
+. test-init.sh
expensive_
# The sister test 'dist-many.sh' try to hit the real command line length
# limit of the system, by declaring a huge number of files to be cleaned.
-. ./defs || exit 1
+. test-init.sh
mkdir bin
# We use EXTRA_DIST to distribute stuff *explicitly* from the srcdir.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
ocwd=$(pwd) || fatal_ "cannot get current working directory"
# limitation should be explained in depth in comments in file
# 'lib/am/distdir.am').
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# seen in input Makefile.am, but also that GNU make support of double-colon
# rules is as reliable and well-working as we expect and need.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Test Automake-provided internal macro 'am.cmd.ensure-dir-exists'.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
# Filter out Automake comments.
grep -v '^##' "$am_amdir"/header-vars.mk > defn.mk \
# François Pinard, and later by Akim Demaille.
required=${ETAGS:=etags}
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([CC], [false])
# Check that Automake does not warns about nested variables expansion,
# variables with non-POSIX names, or GNU make function calls.
-. ./defs || exit 1
+. test-init.sh
cat > Makefile.am <<'END'
define get-libname
# Test some generic Automake-provided internal macros and make functions.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ 13
# sees, as well as through GNU make constructs that Automake does not
# parse.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([SafeInclude], [include])
# Test Automake-provided memoization for make variables.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ 17
# Projects using only Fortran or C++ shouldn't need C-related stuff.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
plan_ 6
# The parallel-tests driver should be able to cope with test scripts
# whose names end with several concatenated suffixes.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_OUTPUT
# Check that dynamic content for $(TESTS) is supported, both when set from
# inside the Makefile.am and when overridden from the command line.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# extension-less tests. This is required to allow the user to have
# a, say, 'all.test' test case even in the face of the 'all' target.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# to an exceeded command line length when there are many tests.
# For automake bug#7868.
-. ./defs || exit 1
+. test-init.sh
expensive_
# We do so with the help of "${prefix}LOG_DEPENDENCIES" variables.
# See the last wishlist in automake bug#11287.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_SUBST([EXEEXT], [.bin])
# Check texinfo rules in silent-rules mode.
required='makeinfo tex texi2dvi dvips'
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# automatic variables of GNU make.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > Makefile <<'END'
foo:
# support.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > Makefile <<'END'
default:
# semantic we expect.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > Makefile << 'END'
default:
# any '+=' appending to it gets overridden as well.
am_create_testdir=empty
-. ./defs || exit 1
+. test-init.sh
cat > Makefile << 'END'
var0 += foo
# We use that assumption in some of our rules, so it better explicitly
# check that it truly holds.
-. ./defs || exit 1
+. test-init.sh
ocwd=$(pwd) || fatal_ "couldn't get current working directory"
# Keep in sync with sister test 'subobj-cxx.sh'.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Keep in sync with sister test 'subobj-c.sh'.
required=c++
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# Test of subdir objects with libtool.
required='cc libtoolize'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# and the use of AM_DEFAULT_SOURCE_EXT.
required=c++
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CXX
# the Automake default (C linker) would be inappropriate.
required=c++
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_PROG_CXX
# extension in object files.
required=cc
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac <<'END'
AC_CONFIG_HEADERS([config.h])
# Use of "custom" headers (with custom suffix).
required='cc native'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CC
# Test to make sure that suffix rules chain.
required=c++
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# TEST_EXTENSIONS with contents dynamically determined at make time
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_SUBST([suf], [.tap])
# Make sure that Automake can handle "funny chars" in TEST_EXTENSIONS,
# as long as they can be used in GNU make variable names.
-. ./defs || exit 1
+. test-init.sh
fetch_tap_driver
# The $(host), $(build), $(target) variables, and their '*_alias'
# and 'am.conf.*-triplet' counterparts.
-. ./defs || exit 1
+. test-init.sh
: > config.guess
: > config.sub
# and VPATH builds, and both top-level and subdir input.
required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# FIXME: TAP, and merge them.
required='makeinfo tex texi2dvi'
-. ./defs || exit 1
+. test-init.sh
cat >>configure.ac <<\EOF
AC_CONFIG_FILES([rec/Makefile])
# to it should get overridden as well.
# See also "spy" test 'spy-var-append.sh'.
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AM_CONDITIONAL([COND_NO], [false])
# *_DEPENDENCIES when we should, and do not warn about them
# when we should not.
-. ./defs || exit 1
+. test-init.sh
subdirs='ok1 ok2 ko1 ko2'
mkdir $subdirs
# build system.
required=cc
-. ./defs || exit 1
+. test-init.sh
edit ()
{
# too. Yes, this test is hacky ... as is the behaviour it tests
# after all ;-)
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# build a source with the same name but without the $(srcdir).
required=cc
-. ./defs || exit 1
+. test-init.sh
ocwd=$(pwd) || fatal_ "couldn't get current working directory"
# Test Automake-provided internal make macros to deal with VPATH rewrites.
-. ./defs || exit 1
+. test-init.sh
echo AC_OUTPUT >> configure.ac
# Lex + C++ support for a program built only from lex sources.
required='c++ yacc'
-. ./defs || exit 1
+. test-init.sh
cat >> configure.ac << 'END'
AC_PROG_CXX
# are used, even when dependency tracking is disabled.
required='cc yacc'
-. ./defs || exit 1
+. test-init.sh
cat >configure.ac <<END
AC_INIT([$me], [1.0])