]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] tests: remove stale workarounds for non-GNU make
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 21 Feb 2012 16:14:29 +0000 (17:14 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 13 Apr 2012 17:02:31 +0000 (19:02 +0200)
* t/yacc-depend2.sh: Remove now-irrelevant comment about
the fact that this test fails with FreeBSD make.
* t/silent8.sh: Remove useless workaround for NetBSD make.
* t/tap-signal.tap: Likewise.
* t/posixsubst-ldadd.sh: Remove useless workaround for
FreeBSD make.
* t/posixsubst-libraries.sh: Likewise.
* t/posixsubst-ltlibraries.sh: Likewise.
* t/posixsubst-sources.sh: Likewise.
* t/posixsubst-tests.sh: Likewise.
* t/distcheck-outdated-m4.sh: Remove workaround for
extra-verbose make implementations (like Solaris make).
* t/distcheck-missing-m4.sh: Likewise.
* t/tap-color.sh: Likewise.
* t/color.test (test_no_color): Likewise.
* t/color2.test (test_no_color): Likewise.
Remove redundant check that parallel make does nor redirect
output to temporary files or named pipes.
* t/tap-color.sh: Likewise.
* t/tap-doc.sh: Do not post-process make output to strip
extra lines printed bu Sun dmake..
* t/tap-doc2.sh: Remove stray comment.
* t/yacc-mix-c-cxx.sh: Just assume that "make -jN" can
run make in parallel mode.
* t/tap-more.sh: Likewise.
* t/dist-formats.tap: Likewise.
* t/yacc-line.sh: Avoid workaround to cater for the
Solaris XPG4 make inability to chain suffix rules.
* t/lex-line.sh: Likewise.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
20 files changed:
t/color.sh
t/color2.sh
t/dist-formats.tap
t/distcheck-missing-m4.sh
t/distcheck-outdated-m4.sh
t/lex-line.sh
t/posixsubst-ldadd.sh
t/posixsubst-libraries.sh
t/posixsubst-ltlibraries.sh
t/posixsubst-sources.sh
t/posixsubst-tests.sh
t/silent8.sh
t/tap-color.sh
t/tap-doc.sh
t/tap-doc2.sh
t/tap-more.sh
t/tap-signal.tap
t/yacc-depend2.sh
t/yacc-line.sh
t/yacc-mix-c-cxx.sh

index ed8fe33f7ba7c992ff86aa1b77fb08123e6709a9..edae625e06b75c41bd9966b5216b94bf67a908c7 100755 (executable)
@@ -98,35 +98,8 @@ test_color ()
 
 test_no_color ()
 {
-  # With make implementations that, like Solaris make, in case of errors
-  # print the whole failing recipe on standard output, we should content
-  # ourselves with a laxer check, to avoid false positives.
-  # Keep this in sync with lib/am/check.am:$(am__color_tests).
-  if $FGREP '= Xalways || test -t 1 ' stdout; then
-    # Extra verbose make, resort to laxer checks.
-    # Note that we also want to check that the testsuite summary is
-    # not unduly colorized.
-    (
-      set +e # In case some grepped regex below isn't matched.
-      # Not a useless use of cat; see above comments about grep.
-      cat stdout | grep "TOTAL.*:"
-      cat stdout | grep "PASS.*:"
-      cat stdout | grep "FAIL.*:"
-      cat stdout | grep "SKIP.*:"
-      cat stdout | grep "XFAIL.*:"
-      cat stdout | grep "XPASS.*:"
-      cat stdout | grep "ERROR.*:"
-      cat stdout | grep 'test.*expected'
-      cat stdout | grep 'test.*not run'
-      cat stdout | grep '===='
-      cat stdout | grep '[Ss]ee .*test-suite\.log'
-      cat stdout | grep '[Tt]estsuite summary'
-    ) | grep "$esc" && Exit 1
-    : For shells with broken 'set -e'
-  else
-    cat stdout | grep "$esc" && Exit 1
-    : For shells with broken 'set -e'
-  fi
+  cat stdout | grep "$esc" && Exit 1
+  :
 }
 
 for vpath in false :; do
index b1c8830ee497289cc5311257f0290686bbac0465..4e8bb4860899e1a2e082bc374fbf33cdde0ebb62 100755 (executable)
@@ -44,29 +44,6 @@ esac
 (set +e; expect -c 'exit ''77'; test $? -eq 77) \
   || skip_ "requires a working expect program"
 
-# Also, if the $MAKE program fails to consider the standard output as a
-# tty (this happens with e.g., BSD make and Solaris dmake when they're
-# run in parallel mode; see the autoconf manual), there is little point
-# in proceeding.
-cat > Makefile <<'END'
-all:
-## Creative quoting in the 'echo' below to avoid risk of spurious output
-## matches by 'expect', below.
-       @test -t 1 && echo "stdout" "is" "a" "tty"
-END
-
-cat > expect-check <<'END'
-eval spawn $env(MAKE)
-expect {
-  "stdout is a tty" { exit 0 }
-  default { exit 1 }
-}
-exit 1
-END
-MAKE=$MAKE expect -f expect-check \
-  || skip_ "make spawned by expect should have a tty stdout"
-rm -f expect-check Makefile
-
 # Do the tests.
 
 cat >>configure.ac <<END
@@ -128,35 +105,8 @@ test_color ()
 
 test_no_color ()
 {
-  # With make implementations that, like Solaris make, in case of errors
-  # print the whole failing recipe on standard output, we should content
-  # ourselves with a laxer check, to avoid false positives.
-  # Keep this in sync with lib/am/check.am:$(am__color_tests).
-  if $FGREP '= Xalways || test -t 1 ' stdout; then
-    # Extra verbose make, resort to laxer checks.
-    # Note that we also want to check that the testsuite summary is
-    # not unduly colorized.
-    (
-      set +e # In case some grepped regex below isn't matched.
-      # Not a useless use of cat; see above comments about grep.
-      cat stdout | grep "TOTAL.*:"
-      cat stdout | grep "PASS.*:"
-      cat stdout | grep "FAIL.*:"
-      cat stdout | grep "SKIP.*:"
-      cat stdout | grep "XFAIL.*:"
-      cat stdout | grep "XPASS.*:"
-      cat stdout | grep "ERROR.*:"
-      cat stdout | grep 'test.*expected'
-      cat stdout | grep 'test.*not run'
-      cat stdout | grep '===='
-      cat stdout | grep '[Ss]ee .*test-suite\.log'
-      cat stdout | grep '[Tt]estsuite summary'
-    ) | grep "$esc" && Exit 1
-    : For shells with broken 'set -e'
-  else
-    cat stdout | grep "$esc" && Exit 1
-    : For shells with broken 'set -e'
-  fi
+  cat stdout | grep "$esc" && Exit 1
+  :
 }
 
 cat >expect-make <<'END'
index 8a287ff9dcc3856d632b9111011915f20bb08782..4dd6c207aa9d25e643a6d7c065b6bde3bc8d1d38 100755 (executable)
@@ -40,16 +40,6 @@ mkdir setup \
   && rm -rf setup \
   || fatal_ "creating common aclocal.m4 file"
 
-# Some make implementations (e.g., HP-UX) don't grok '-j', some require
-# no space between '-j' and the number of jobs (e.g., older GNU make
-# versions), and some *do* require a space between '-j' and the number
-# of jobs (e.g., Solaris dmake).  We need a runtime test to see what
-# works.
-for MAKE_j4 in "$MAKE -j4" "$MAKE -j 4" false; do
-  echo all: | $MAKE_j4 -f - && break
-  : For shells with buggy 'set -e'.
-done
-
 # Set variables '$compressor' and '$suffix'.
 setup_vars_for_compression_format ()
 {
@@ -332,17 +322,13 @@ command_ok_ "$desc [automake]" $AUTOMAKE
 skip_reason=
 have_compressor compress || skip_reason="'compress' not available"
 have_compressor bzip2 || skip_reason="'bzip2' not available"
-if test "$MAKE_j4" = false; then
-  test -z "$skip_reason" || skip_reason="$skip_reason and "
-  skip_reason="${skip_reason}make concurrency unavailable"
-fi
 
 if test -n "$skip_reason"; then
   skip_row_ 6 -r "$skip_reason" "$desc"
 else
   command_ok_ "$desc [autoconf]" $AUTOCONF
   command_ok_ "$desc [configure]" ./configure
-  command_ok_ "$desc [make -j4 dist-all]"  $MAKE_j4 dist
+  command_ok_ "$desc [make -j4 dist-all]"  $MAKE -j4 dist
   ls -l # For debugging.
   command_ok_ "$desc [check .tar.gz tarball]"  check_tarball gzip
   command_ok_ "$desc [check .tar.bz2 tarball]" check_tarball bzip2
@@ -436,13 +422,7 @@ command_ok_ \
   "$desc ['make dist-all', stubbed]" \
   $MAKE dist-all
 
-subdesc="$desc ['make dist -j4', stubbed]"
-if test "$MAKE_j4" = false; then
-  skip_ -r "make concurrency unavailable" "$subdesc"
-else
-  command_ok_ "$subdesc" $MAKE_j4 dist
-fi
-unset subdesc
+command_ok_ "$desc ['make dist -j4', stubbed]" $MAKE -j4 dist
 
 PATH=$oPATH; export PATH
 
index 0e9007f29038f842bf542156cd9ea6d6e7ec3102..abccac8ba21c999588ac2bd257172fc6899a9e15 100755 (executable)
@@ -66,10 +66,8 @@ $AUTOMAKE
 check_no_spurious_error ()
 {
   $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
-  # On failure, some make implementations (such as Solaris make) print the
-  # whole failed recipe on stdout.  The first grep works around this.
-  grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && Exit 1
-  : To placate 'set -e'.
+  grep -i 'autom4te.*\.cache' output && Exit 1
+  : # To placate 'set -e'.
 }
 
 ./configure
index 0fb624ea71252b20ad10d21d3cbda143597456d3..b5239690a54ad3a318e31a0d72f723f2ee5003f7 100755 (executable)
@@ -60,10 +60,8 @@ $MAKE distcheck # Sanity check.
 check_no_spurious_error ()
 {
   $EGREP -i 'mkdir:|:.*(permission|denied)' output && Exit 1
-  # On failure, some make implementations (such as Solaris make) print the
-  # whole failed recipe on stdout.  The first grep works around this.
-  grep -v 'rm -rf ' output | grep -i 'autom4te.*\.cache' && Exit 1
-  : To placate 'set -e'.
+  grep -i 'autom4te.*\.cache' output && Exit 1
+  : # To placate 'set -e'.
 }
 
 # We start to use a new "third-party" macro in a new version
index 05b6f9999f96bd04b2cb11a496d1f5592f5eb736..20bd9c8fe0c492fdb7c34a45bf52e7e964b91d8d 100755 (executable)
@@ -39,9 +39,6 @@ LDADD = $(LEXLIB)
 bar_LFLAGS = -v
 foo_SOURCES = zardoz.l
 bar_SOURCES = dir/quux.l
-## Avoid spurious failures with Solaris make.
-zardoz.@OBJEXT@: zardoz.c
-bar-quux.@OBJEXT@: bar-quux.c
 END
 
 cat > sub/Makefile.am << 'END'
@@ -52,9 +49,6 @@ LDADD = @LEXLIB@
 foo_LFLAGS = -v
 foo_SOURCES = zardoz.l
 bar_SOURCES = dir/quux.l
-## Avoid spurious failures with Solaris make.
-foo-zardoz.@OBJEXT@: foo-zardoz.c
-dir/quux.@OBJEXT@: dir/quux.c
 END
 
 cat > zardoz.l << 'END'
index f1cc55b366c0f6e367d7d27a65fc01cc4911ee81..2f5b6d55ef5ba76a234034e816aee15339cc326e 100755 (executable)
@@ -44,7 +44,6 @@ bar_LDADD = $(v:=.a) libquux2.a $(w:none=libquux3.a)
 
 libquux1.c:
        echo 'int quux1(void) { return 0; }' > $@
-CLEANFILES = libquux1.c # For FreeBSD make.
 END
 
 cat > foo.c <<'END'
index 8e6b26521c981fd969a85b6352aeaef5692e0a7a..5f32d4f57182dcfb145b6e62a415aa337e102e68 100755 (executable)
@@ -38,7 +38,6 @@ lib_LIBRARIES = $(foolibs:=.a) $(barlibs:z=r.a)
 
 libbar.c:
        echo 'int bar(void) { return 0; }' > $@
-CLEANFILES = libbar.c # For FreeBSD make.
 
 installcheck-local:
        ls -l $(prefix)/lib
index 6a4cbd551a439010728ce3cbe1099d0f008091e3..e3a128fa9645dd755e9051d3eb26bbb7bcea1e98 100755 (executable)
@@ -38,7 +38,6 @@ lib_LTLIBRARIES = $(foolibs:=.la) $(barlibs:z=r.la)
 
 libbar.c:
        echo 'int bar(void) { return 0; }' > $@
-CLEANFILES = libbar.c # For FreeBSD make.
 
 installcheck-local:
        ls -l $(prefix)/lib
index ccd61b9b4d8705bfa0746cdb76280c13752a329a..17cd4f06a3e2e33b62cca485264e700b68e74f98 100755 (executable)
@@ -41,7 +41,6 @@ nodist_foo_SOURCES = $(BAZ:=c)
 bar.c baz.c:
        echo 'int $@ (void) { return 0; }' | sed 's/\.c //' > $@
 CLEANFILES = baz.c
-CLEANFILES += bar.c # For FreeBSD make.
 
 .PHONY: test test2
 check-local: test1 test2
index 27a451dbfc13ffed30cee5162ba2eb4892a89926..37c23d3a0ab8376d96cdc4840b0eb6e81dad59d9 100755 (executable)
@@ -30,7 +30,6 @@ t3 = bar2
 
 foo2.test barz:
        (echo '#!/bin/sh' && echo 'exit 0') > $@ && chmod a+x $@
-CLEANFILES = foo2.test barz # For FreeBSD make.
 
 # Also try an empty match suffix, to ensure that the ':=' in there is
 # not confused by the parser with an unportable assignment operator.
index a2fdb44c1866477bdba0d5fa018defa674bb8913..b2059a89ace03f09b79dbabca5a3c333c9ae9884 100755 (executable)
@@ -48,8 +48,7 @@ $MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'DVIPS    foo.ps' stdout || Exit 1
 grep 'MAKEINFO foo.html' stdout || Exit 1
-# NetBSD make will print './foo.info' instead of 'foo.info'.
-grep 'MAKEINFO.*foo.info' stdout || Exit 1
+grep 'MAKEINFO foo.info' stdout || Exit 1
 grep 'TEXI2DVI foo.dvi' stdout || Exit 1
 grep 'TEXI2PDF foo.pdf' stdout || Exit 1
 
@@ -59,7 +58,7 @@ $MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep 'DVIPS    foo.ps' stdout && Exit 1
 grep 'MAKEINFO foo.html' stdout && Exit 1
-grep 'MAKEINFO.*foo.info' stdout && Exit 1
+grep 'MAKEINFO foo.info' stdout && Exit 1
 grep 'TEXI2DVI foo.dvi' stdout && Exit 1
 grep 'TEXI2PDF foo.pdf' stdout && Exit 1
 
index c677c310ed457f85b3c396d3a29b9f1c189998c0..794f459086e58cb41df398143df08ff01398d381 100755 (executable)
@@ -130,36 +130,8 @@ test_color ()
 
 test_no_color ()
 {
-  # With make implementations that, like Solaris make, in case of errors
-  # print the whole failing recipe on standard output, we should content
-  # ourselves with a laxer check, to avoid false positives.
-  # Keep this in sync with lib/am/check.am:$(am__color_tests).
-  if $FGREP '= Xalways || test -t 1 ' stdout; then
-    # Extra verbose make, resort to laxer checks.
-    # But we also want to check that the testsuite summary is not unduly
-    # colorized.
-    (
-      set +e # In case some grepped regex below isn't matched.
-      # Not a useless use of cat; see above comments about grep.
-      cat stdout | grep "TOTAL.*:"
-      cat stdout | grep "PASS.*:"
-      cat stdout | grep "FAIL.*:"
-      cat stdout | grep "SKIP.*:"
-      cat stdout | grep "XFAIL.*:"
-      cat stdout | grep "XPASS.*:"
-      cat stdout | grep "ERROR.*:"
-      cat stdout | grep "^#"
-      cat stdout | grep 'test.*expected'
-      cat stdout | grep 'test.*not run'
-      cat stdout | grep '===='
-      cat stdout | grep '[Ss]ee .*test-suite\.log'
-      cat stdout | grep '[Tt]estsuite summary'
-    ) | grep "$esc" && Exit 1
-    : For shells with broken 'set -e'
-  else
-    cat stdout | grep "$esc" && Exit 1
-    : For shells with broken 'set -e'
-  fi
+  cat stdout | grep "$esc" && Exit 1
+  :
 }
 
 # It should be possible to override AM_COLOR_TESTS also from the
index 46b3b510cdf2a8dca88f4b70ecdc01753e0573f8..636c4cff1b54a18a63216ddebcc31d85ac341d99 100755 (executable)
@@ -85,11 +85,7 @@ PASS: mu.tap 1
 XFAIL: mu.tap 2 # TODO frobnication not yet implemented
 END
 
-sed -n '/^PASS: foo\.sh/,/^XFAIL: mu\.tap/p' stdout > t
-cat t
-# Strip extra "informative" lines that could be printed by Solaris
-# Distributed Make.
-LC_ALL=C $EGREP -v ' --> ([0-9][0-9]* job|[Jj]ob output)' t > got
+sed -n '/^PASS: foo\.sh/,/^XFAIL: mu\.tap/p' stdout > got
 
 cat exp
 cat got
index 95fb54616071e5974aab6f2f7c4b7e1490cc69e9..2864b427edce7b4e4c7783eeb9d4e294dd499a4f 100755 (executable)
@@ -68,8 +68,6 @@ END
 
 chmod a+x *.test
 
-# Strip extra "informative" lines that could be printed by Solaris
-# Distributed Make.
 mkdir build-aux
 cp "$am_scriptdir"/tap-driver.sh build-aux \
   || framework_failure_ "fetching the perl TAP driver"
index 6f5d5fe4b3c328432c04ea8eacc840e584daf1b8..00abbf28fad8e4d0d5202f74dad7c40b4e1dc7fb 100755 (executable)
@@ -97,16 +97,7 @@ for try in 0 1; do
         run_make=$MAKE
         ;;
       *)
-        # Some make implementations (e.g., HP-UX) don't grok '-j',
-        # some require no space between '-j' and the number of jobs
-        # (e.g., older GNU make versions), and some *do* require a
-        # space between '-j' and the number of jobs (e.g., Solaris
-        # dmake).  We need a runtime test to see what works.
-        echo 'all:' > Makefile
-        for run_make in "$MAKE -j3" "$MAKE -j 3" "$MAKE"; do
-          $run_make && break
-        done
-        rm -f Makefile
+        run_make="$MAKE -j3"
         ;;
     esac
   else
index ab1cd40efd09633d9ec01812ff9814e8f23b99e2..ba17bd40201588e2d5392c5f3a302d303e204976 100755 (executable)
@@ -106,17 +106,7 @@ signal_caught ()
   esac
 }
 
-command_ok_ '"make check" fails' eval '
-  (
-    st=0; $MAKE check >stdout || st=$?
-    cat stdout
-    # Extra "echo" and silencing of xtraces required to avoid possible
-    # garbled output with NetBSD make, which would miss some final
-    # newlines in the expected places and thus mess up our TAP output.
-    set +x; echo
-    test $st -gt 0
-  )
-'
+command_ok_ '"make check" fails' eval 'not $MAKE check >stdout'
 cat stdout # For debugging.
 
 command_ok_ "count of test results" count_test_results \
index 879cc591186f57a0e89d5e5f96f7751a5c3ca2d0..7b5cd1ce18bbb7749860a6c1e9c454039af4619b 100755 (executable)
@@ -15,8 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure depcomp does not needlessly update headers and objects
-# for yacc rules.  This test still fails with FreeBSD make (but passes
-# with NetBSD make).
+# for yacc rules.
 
 required=yacc
 . ./defs || Exit 1
index ac6a0aa980fb088ee9820b7f30dbe8ddd2e731d0..86a490d90ff9d0fec0ed3d0f534f2d64eac92c67 100755 (executable)
@@ -39,9 +39,6 @@ AM_YFLAGS = -d
 bar_YFLAGS =
 foo_SOURCES = zardoz.y
 bar_SOURCES = dir/quux.y
-## Avoid spurious failures with Solaris make.
-zardoz.@OBJEXT@: zardoz.c
-bar-quux.@OBJEXT@: bar-quux.c
 END
 
 cat > sub/Makefile.am << 'END'
@@ -50,9 +47,6 @@ noinst_PROGRAMS = foo bar
 foo_YFLAGS = -d
 foo_SOURCES = zardoz.y
 bar_SOURCES = dir/quux.y
-## Avoid spurious failures with Solaris make.
-foo-zardoz.@OBJEXT@: foo-zardoz.c
-dir/quux.@OBJEXT@: dir/quux.c
 END
 
 cat > zardoz.y << 'END'
index 8f72b35c4f244c37dfc90926a61e9b77288653c3..affd938c1970bcd6fbc9d6a03c4bd32c5bfc19df 100755 (executable)
@@ -153,16 +153,7 @@ for try in 0 1; do
         # not override it.
         run_make=$MAKE;;
       *)
-        # Some make implementations (e.g., HP-UX) don't grok '-j',
-        # some require no space between '-j' and the number of jobs
-        # (e.g., older GNU make versions), and some *do* require a
-        # space between '-j' and the number of jobs (e.g., Solaris
-        # dmake).  We need a runtime test to see what works.
-        echo 'all:' > Makefile
-        for run_make in "$MAKE -j3" "$MAKE -j 3" "$MAKE"; do
-          $run_make && break
-        done
-        rm -f Makefile
+        run_make="$MAKE -j3";;
     esac
   else
     echo "$me: invalid value of \$try '$try'" >&2