@node Use TAP with the Automake test harness
@subsection Use TAP with the Automake test harness
-Currently, the TAP driver that comes with Automake requires a perl
-interpreter to work, and requires various by-hand steps on the
-developer's part (this should be fixed in future Automake versions).
-You'll have grab the @file{tap-driver.pl} script from the Automake
-distribution by hand, copy it in your source tree, add code to
-@file{configure.ac} to search a perl interpreter and to define the
-@code{$(PERL)} variable accordingly, and use the Automake support
-for third-party test drivers to instruct the harness to use the
-@file{tap-driver.pl} to run your TAP-producing tests. See the example
+Currently, the TAP driver that comes with Automake requires some by-hand
+steps on the developer's part (this situation should hopefully be improved
+in future Automake versions). You'll have grab the @file{tap-driver.sh}
+script from the Automake distribution by hand, copy it in your source tree,
+add a call to @code{AC_PROG_AWK} in @file{configure.ac} to search for a
+proper awk program, and use the Automake support for third-party test
+drivers to instruct the harness to use the @file{tap-driver.sh} script
+and that awk program to run your TAP-producing tests. See the example
below for clarification.
Apart from the options common to all the Automake test drivers
-(@pxref{Command-line arguments for test drivers}), the @file{tap-driver.pl}
+(@pxref{Command-line arguments for test drivers}), the @file{tap-driver.sh}
supports the following options, whose names are chosen for enhanced
compatibility with the @command{prove} utility.
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
AC_CONFIG_FILES([Makefile])
-AC_REQUIRE_AUX_FILE([tap-driver.pl])
-AC_PATH_PROG([PERL], [perl])
-test -n "$PERL" || AC_MSG_ERROR([perl not found])
-$PERL -MTAP::Parser -e 1 || AC_MSG_ERROR([TAP::Parser not found])
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
+AC_PROG_AWK
AC_OUTPUT
% @kbd{cat Makefile.am}
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/build-aux/tap-driver.pl
+TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+ $(top_srcdir)/build-aux/tap-driver.sh
TESTS = foo.test bar.test baz.test
EXTRA_DIST = $(TESTS)
. ./defs || Exit 1
cat > Makefile.am <<'END'
-TEST_LOG_DRIVER = $(PERL) $(srcdir)/build-aux/tap-driver.pl
+TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
+ $(top_srcdir)/build-aux/tap-driver.sh
TESTS = foo.test bar.test baz.test
EXTRA_DIST = $(TESTS)
END
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
AC_CONFIG_FILES([Makefile])
-AC_REQUIRE_AUX_FILE([tap-driver.pl])
-AC_PATH_PROG([PERL], [perl])
-test -n "$PERL" || AC_MSG_ERROR([perl not found])
-$PERL -MTAP::Parser -e 1 || AC_MSG_ERROR([TAP::Parser not found])
+AC_REQUIRE_AUX_FILE([tap-driver.sh])
+AC_PROG_AWK
AC_OUTPUT
END
# Strip extra "informative" lines that could be printed by Solaris
# Distributed Make.
mkdir build-aux
-cp "$am_scriptdir"/tap-driver.pl build-aux \
+cp "$am_scriptdir"/tap-driver.sh build-aux \
|| framework_failure_ "fetching the perl TAP driver"
(export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || Exit 1