]> git.draconx.ca Git - dxcommon.git/blobdiff - testsuite.at
copysym: Fix pointer qualifier mismatch.
[dxcommon.git] / testsuite.at
index 9c36c2f330a59465b89d85813736ee91c4f7d7bc..2076d70e637550118d19c5620f334cd70e87fe0c 100644 (file)
@@ -7,13 +7,9 @@ There is NO WARRANTY, to the extent permitted by law.])
 AT_INIT
 AT_COLOR_TESTS
 
-m4_divert_push([PREPARE_TESTS])dnl
-{
-  AS_ECHO(["% prove --version"])
-  prove --version </dev/null
-  echo
-} >&AS_MESSAGE_LOG_FD 2>&1
+m4_include([snippet/test-tap.at])
 
+m4_divert_push([PREPARE_TESTS])dnl
 # Reduce influence from the toplevel "make" invocation on test cases.
 AS_UNSET([MAKEFLAGS])
 AS_UNSET([MAKELEVEL])
@@ -23,6 +19,16 @@ m4_divert_pop([PREPARE_TESTS])
 m4_define([TEST_CONFIGURE_AC], [AT_KEYWORDS([autoconf m4])dnl
 AT_DATA([configure.ac],
 [[AC_INIT([test], [0])
+
+# Install t/bork into the path, which contains a non-functional
+# dummy "awk" command to catch direct "awk" usage (as opposed to
+# using AC_PROG_AWK and $AWK).  Then work around direct awk usage
+# in LT_INIT to avoid the dummy.
+test_orig_PATH=$PATH
+PATH=$at_srcdir/t/bork:$PATH
+m4@&t@_ifdef([LT_INIT], [m4@&t@_define([LT_INIT],
+[m4@&t@_pushdef([awk], [$AWK])]m4@&t@_defn([LT_INIT])[m4@&t@_popdef([awk])])])
+
 ]$1[
 AC_OUTPUT
 ]])
@@ -49,7 +55,8 @@ AT_CHECK([autoreconf -I "$srcdir/m4"], [0], [], [stderr])])
 m4_define([TEST_CONFIGURE], [AT_KEYWORDS([configure])dnl
 AT_CHECK([export CC
 CONFIG_SHELL=$TEST_SHELL $TEST_SHELL m4_default([$2],
-[./configure]) --quiet CONFIG_SHELL=$TEST_SHELL $1])])
+[./configure]) --quiet CONFIG_SHELL="$TEST_SHELL" \
+  at_srcdir="$srcdir" AWK="$AWK" $1])])
 
 m4_include([tests/macros.at])
 m4_include([tests/snippets.at])