* tests/Makefile.am (do_subst): Also substitute '@AWK@'. * tests/defs-static.in ($AWK): New, user-overridable and defaulting to the substituted '@AWK@'. * tests/defs (fetch_tap_driver): When the shell+awk implementation of the TAP driver is required, export AM_TAP_AWK to point to a properly capable awk, since the default awk might be a "traditional" implementation, which won't be enough for our driver. This is the right fix, since a proper setting of AM_TAP_AWK in the driver's environment is expected (and documented to be required) in real world uses of 'tap-driver.sh'. --- tests/Makefile.am | 1 + tests/defs | 1 + tests/defs-static.in | 1 + 3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/tests/Makefile.am b/tests/Makefile.am index b6d41c7..c14a390 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -136,6 +136,7 @@ do_subst = sed \ -e 's|@APIVERSION[@]|$(APIVERSION)|g' \ -e 's|@PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|g' \ -e 's|@SHELL[@]|$(SHELL)|g' \ + -e 's|@AWK[@]|$(AWK)|g' \ -e 's|@PERL[@]|$(PERL)|g' \ -e 's|@EGREP[@]|$(EGREP)|g' \ -e 's|@FGREP[@]|$(FGREP)|g' \ diff --git a/tests/defs b/tests/defs index 5b7ff5b..14648f5 100644 --- a/tests/defs +++ b/tests/defs @@ -657,6 +657,7 @@ fetch_tap_driver () sed "1s|#!.*|#! $PERL -w|" "$am_scriptdir"/tap-driver.pl >tap-driver ;; shell) + AM_TAP_AWK=$AWK; export AM_TAP_AWK sed "1s|#!.*|#! $SHELL|" "$am_scriptdir"/tap-driver.sh >tap-driver ;; *) diff --git a/tests/defs-static.in b/tests/defs-static.in index 80cd1fe..1ada923 100644 --- a/tests/defs-static.in +++ b/tests/defs-static.in @@ -142,6 +142,7 @@ SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL # User can override various tools used. Prefer overriding specific for # that automake testsuite, if they are available. +AWK=${AM_TESTSUITE_AWK-${AWK-'@AWK@'}} PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}} MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}} YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}} -- 1.7.9