summaryrefslogtreecommitdiff
path: root/tests/defs
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2011-08-17 12:06:25 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2011-08-17 15:32:28 +0200
commitfb21ed841b61c61d70ac9c370f53d2cf53231764 (patch)
tree33ce9b26ba6cf0f8b1e2b66f27d1c09c3d9a9b95 /tests/defs
parent5c210551131a0fc50d0e1af21843b35df46ffdbf (diff)
downloadautomake-fb21ed841b61c61d70ac9c370f53d2cf53231764.tar.gz
testsuite: refactor tests on TAP support in view of future changes
* tests/defs (fetch_tap_driver): New subroutine; it fetches the automake-provided TAP driver from the `lib/' directory into the current directory, and edits its shebang line so that it will be run with the perl interpreter determined at configure time. * tests/tap-setup.sh: Use it. * tests/tap-common-setup.test: There's no need to AC_SUBST `PERL' anymore, nor to use it in the Makefile to run the TAP driver. Also, use the `fetch_tap_driver' function instead of copying the `tap-driver' auxiliary script directly. * tests/tap-bad-prog.tap: Likewise. * tests/tap-diagnostic-custom.test: Likewise. * tests/tap-doc.test: Likewise. * tests/tap-merge-stdout-stderr.test: Likewise. * tests/tap-more.test: Likewise. * tests/tap-more2.test: Likewise. * tests/tap-recheck.test: Likewise. * tests/tap-summary-aux.sh: Likewise. * tests/tap-basic.test: Likewise, and fix a grammaro in comments since we are at it.
Diffstat (limited to 'tests/defs')
-rw-r--r--tests/defs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/defs b/tests/defs
index afce3cba9..2b5df6b0a 100644
--- a/tests/defs
+++ b/tests/defs
@@ -306,6 +306,18 @@ unindent ()
}
sed_unindent_prog="" # Avoid interferences from the environment.
+# fetch_tap_driver
+# ----------------
+# Fetch the Automake-provided TAP driver from the `lib/' directory into
+# the current directory, and edit its shebang line so that it will be
+# run with the perl interpreter determined at configure time.
+fetch_tap_driver ()
+{
+ sed "1s|#!.*|#! $PERL -w|" "$top_testsrcdir"/lib/tap-driver >tap-driver \
+ && chmod a+x tap-driver \
+ || fatal_ "failed to fetch perl tap driver"
+ sed 10q tap-driver # For debugging.
+}
## ----------------------------------------------------------- ##
## Checks for required tools, and additional setups (if any) ##