]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tests: avoid spurious failures when awk is "traditional awk"
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 26 Feb 2012 12:10:19 +0000 (13:10 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 26 Feb 2012 12:10:29 +0000 (13:10 +0100)
* 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
tests/defs
tests/defs-static.in

index b6d41c74e85cff7035ddfe0fd50fb561e29bae5f..c14a3909e06745689852c28a29efbe23c5415b15 100644 (file)
@@ -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' \
index 5b7ff5bd9802f49d935a6d501dd139f6dd2b3e73..14648f592a8ec355c823fbe1f96eeaac98d7cd96 100644 (file)
@@ -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
       ;;
     *)
index 80cd1fe9af42131e053c4cbf706d2937ecc43cce..1ada9230b9e87a7410dd87982d3e891de493fcbd 100644 (file)
@@ -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@'}}