automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FYI] {master} docs: prefer the awk+sh TAP driver over the perl one


From: Stefano Lattarini
Subject: [FYI] {master} docs: prefer the awk+sh TAP driver over the perl one
Date: Sun, 19 Feb 2012 17:17:47 +0100

We had completed our shell+awk implementation of the TAP driver
months ago, but never documented it in the manual, continuing to
document only the "prototype" written in perl instead.  Time to
fix this, before the 1.12 release.

* doc/automake.texi (Use TAP with the Automake test harness): Now
we document the use of the awk+shell implementation of our TAP
driver, rather than of the perl one.
* tests/tap-doc2.test: Adjust to use the shell+awk implementation
of the TAP driver.
---
 doc/automake.texi   |   28 +++++++++++++---------------
 tests/tap-doc2.test |   11 +++++------
 2 files changed, 18 insertions(+), 21 deletions(-)

diff --git a/doc/automake.texi b/doc/automake.texi
index 8b1a84b..ef094c0 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -9559,19 +9559,18 @@ use TAP in their testsuite.
 @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
address@hidden to search a perl interpreter and to define the
address@hidden(PERL)} variable accordingly, and use the Automake support
-for third-party test drivers to instruct the harness to use the
address@hidden 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.
 
@@ -9621,14 +9620,13 @@ AC_INIT([GNU Try Tap], [1.0], [bug-automake@@gnu.org])
 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)
 
diff --git a/tests/tap-doc2.test b/tests/tap-doc2.test
index 7600e22..4946a2c 100755
--- a/tests/tap-doc2.test
+++ b/tests/tap-doc2.test
@@ -23,7 +23,8 @@ am_parallel_tests=yes
 . ./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
@@ -33,10 +34,8 @@ AC_INIT([GNU Try Tap], [1.0], address@hidden)
 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
 
@@ -72,7 +71,7 @@ chmod a+x *.test
 # 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
-- 
1.7.9




reply via email to

[Prev in Thread] Current Thread [Next in Thread]