X-Git-Url: https://git.draconx.ca/gitweb/dxcommon.git/blobdiff_plain/e1ebfe7f258c1c99006fee8a3b6e111dc1d34d79..70c84546fa5ecaba26e4ed021b292a5580f304f0:/testsuite.at diff --git a/testsuite.at b/testsuite.at index 9c36c2f..badb6de 100644 --- a/testsuite.at +++ b/testsuite.at @@ -23,6 +23,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 +59,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])