From: Stefano Lattarini Date: Sun, 26 Feb 2012 12:10:19 +0000 (+0100) Subject: tests: avoid spurious failures when awk is "traditional awk" X-Git-Tag: v1.11b~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68f47e9a04057af10c01af602a0c06353c37ecf3;p=thirdparty%2Fautomake.git tests: avoid spurious failures when awk is "traditional awk" * 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'. --- diff --git a/tests/Makefile.am b/tests/Makefile.am index b6d41c74e..c14a3909e 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 5b7ff5bd9..14648f592 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 80cd1fe9a..1ada9230b 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@'}}