# auxiliary script.
if (! var "${pfx}LOG_DRIVER")
{
- require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
define_variable ("${pfx}LOG_DRIVER",
'$(SHELL) $(am__config_aux_dir)/test-driver',
INTERNAL);
my $suff = '.test';
define_variable ('TEST_EXTENSIONS', '.test', INTERNAL)
if (! var 'TEST_EXTENSIONS');
+ require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
my $var = var 'TEST_EXTENSIONS';
# Currently, we are not able to deal with conditional contents
# in TEST_EXTENSIONS.
END
cat > Makefile.am << 'END'
-LOG_DRIVER = $(srcdir)/tap-driver
-TEST_LOG_DRIVER = $(LOG_DRIVER)
-TESTS = none.test noread noexec.test
+TEST_LOG_DRIVER = $(srcdir)/tap-driver
+TESTS = none.test noread.test noexec.test
none.test:
END
echo ok 1
END
-cp noexec.test noread
-chmod a-r noread
+cp noexec.test noread.test
+chmod a-r noread.test
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
fi
desc="non-readable test is reported"
-if test -r noread; then
+if test -r noread.test; then
skip_ -r "any file is readable" "$desc"
else
- command_ok_ "$desc" -- grep '^ERROR: noread' stdout
+ command_ok_ "$desc" -- grep '^ERROR: noread\.test' stdout
fi
# Check that no spurious test result is reported. This is lower-priority
echo 'ok 3 # SKIP' >>$@-t
cat $@-t ;: For debugging.
mv -f $@-t $@
-
-LOG_DRIVER = false # Dummy but required.
END
cat > success.test << 'END'
ok 20 twenty twenty # SKIP
END
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
. ./defs || Exit 1
-cat >> configure.ac << 'END'
-# FIXME: must define this otherwise automake will require the presence
-# FIXME: of the 'test-driver' script. This issue should be documented
-# FIXME: in the manual ...
-AC_SUBST([LOG_DRIVER],
- ['$(error LOG_DRIVER should be never used) false'])
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am << 'END'
TEST_LOG_DRIVER = $(srcdir)/tap-driver
TESTS = all.test
END
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
-test ! -f test-driver
./configure
my_log_compiler = cat
TEST_EXTENSIONS =
TESTS =
-LOG_DRIVER = $(error LOG_DRIVER is dummy, required, never extended)
END
: > later.mk
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
EXTRA_DIST = $(TESTS) tap-driver
END
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
cat > 1.test <<'END'
#! /bin/sh
echo 1..2
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
./configure
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
do_recheck ()
{
cp "$am_scriptdir"/test-driver test-drivers/dflt \
|| fatal_ "failed to fetch auxiliary script test-driver"
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
cat >> configure.ac <<'END'
AC_SUBST([LOG_DRIVER], ['${SHELL} test-drivers/triv'])
AC_SUBST([TEST_LOG_DRIVER], ['${SHELL} test-drivers/dflt'])
END
chmod a+x checkdir-driver
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
chmod a+x *.t
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# Check that auxiliary script 'test-driver' doesn't get needlessly
-# installed or referenced if it's not used, i.e., if the user has
-# defined his own '*LOG_DRIVER' variables.
-
-. ./defs || Exit 1
-
-cat >> configure.ac <<'END'
-AC_PROG_CC
-AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
-AC_SUBST([LOG_DRIVER], ['unused but required by automake'])
-AC_OUTPUT
-END
-
-mkdir sub1 sub2
-
-cat > Makefile.am <<'END'
-SUBDIRS = sub1 sub2
-TEST_LOG_DRIVER = :
-TESTS = foo bar.test
-END
-
-cat > sub1/Makefile.am <<'END'
-TEST_EXTENSIONS = .x .sh .pl
-SH_LOG_DRIVER = dummy1
-PL_LOG_DRIVER = dummy2
-X_LOG_DRIVER = dummy3
-TESTS = a.pl b.sh c.x
-END
-
-cat > sub2/Makefile.am <<'END'
-TEST_EXTENSIONS = .bar
-BAR_LOG_DRIVER = y
-TESTS = 1 2.bar 3.test 4.t 5.tt $(check_PROGRAMS)
-check_PROGRAMS = p1 p2$(EXEEXT) p3.bar p4.suf
-END
-
-$ACLOCAL
-
-for opts in '' '--add-missing' '-a -c'; do
- $AUTOMAKE $opts
- $FGREP test-driver Makefile.in sub[12]/Makefile.in && Exit 1
- find . | $FGREP test-driver && Exit 1
- : For shells with busted 'set -e'.
-done
-
-:
cp 1.chk 5.suf
cp 1.chk sub/test
+cat > test-driver <<'END'
+#!/bin/sh
+echo "$0: required by Automake, but should never be actually used" >&2
+exit 1
+END
+chmod a+x test-driver
+
$ACLOCAL
$AUTOCONF
$AUTOMAKE
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
cd ..
. ./defs || Exit 1
cat >> configure.ac << 'END'
-AC_SUBST([LOG_DRIVER], ['ignored but required by autoamke, sigh!'])
AC_OUTPUT
END
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE -a
./configure
$ACLOCAL
$AUTOCONF
-$AUTOMAKE
+$AUTOMAKE --add-missing
./configure