automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1985


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1985-g72cae0a
Date: Sun, 19 Feb 2012 14:04:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=72cae0a53cde58c5f5ac1020555a675498191b85

The branch, master has been updated
       via  72cae0a53cde58c5f5ac1020555a675498191b85 (commit)
       via  0194d5e1e31861fa362b77c5e2dab74cd3e7ecea (commit)
       via  ec94d5945575c6664110cb76e0ff317491c44ec1 (commit)
       via  e1606b320367120dbd9353913bb6f5bf3260c14e (commit)
       via  21af8bfd077dad5411ba07bd2208b6d216ad686f (commit)
       via  0402db9837e0a482a01d0485a5c1c500d26ac6c3 (commit)
      from  8010df5d0a3fd4b93c5aa74ef735128ebff4604e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 72cae0a53cde58c5f5ac1020555a675498191b85
Author: Stefano Lattarini <address@hidden>
Date:   Sun Feb 19 14:53:53 2012 +0100

    tests: be stricter in determining whether "make -jN" works
    
    * tests/parallel-tests3.test: With at least Solaris 10 CCS make,
    "make -jN" does not fail, but merely prints a warning about
    "DistributedMake -j option" being ignored.  This was causing this
    test case to fail spuriously.  So we now use a stricter check in
    determining whether make works in parallel mode.  Since we are at
    it, we try to cater also to Sun Distributed make, which understands
    "-j N" but *not* "-jN".

commit 0194d5e1e31861fa362b77c5e2dab74cd3e7ecea
Author: Stefano Lattarini <address@hidden>
Date:   Sun Feb 19 11:48:08 2012 +0100

    tests: don't trust exit status of "make -k"
    
    * tests/parallel-tests-extra-programs.test: Unless $MAKE is GNU
    make, don't trust the exit status of "$MAKE -k".  Fixes a spurious
    failure with OpenBSD 5.0 make and NetBSD 5.1 make.

commit ec94d5945575c6664110cb76e0ff317491c44ec1
Author: Stefano Lattarini <address@hidden>
Date:   Sun Feb 19 11:00:45 2012 +0100

    tests: fix race condition in 'self-check-dir.tap'
    
    * tests/self-check-dir.tap (do_check): Don't fail if "ls -l" fails.

commit e1606b320367120dbd9353913bb6f5bf3260c14e
Author: Stefano Lattarini <address@hidden>
Date:   Sat Feb 18 13:59:26 2012 +0100

    parallel-tests: fix another BSD parallel make issue
    
    When BSD make is run in parallel mode, it apparently strips any
    leading directory component from the automatic variable '$*' (of
    course, against what POSIX mandates).  This was causing FreeBSD 9.0
    make and NetBSD 5.1 make to spuriously fail with automake-generated
    test harnesses if subdir tests were present *and* make was being
    run in parallel mode.  This issue affected also the Automake own
    testsuite.
    
    * lib/am/check2.am (am__set_b): New internal variable.
    (%OBJ%, %EXT%.log, %EXT%$(EXEEXT).log): Use it to work around
    the described BSD make issue.
    * tests/parallel-tests3.test: Enhanced to expose the bug.
    * tests/parallel-tests-subdir.test: Enhance a little, since we
    are at it.
    * NEWS: Update.

commit 21af8bfd077dad5411ba07bd2208b6d216ad686f
Author: Stefano Lattarini <address@hidden>
Date:   Sat Feb 18 09:47:57 2012 +0100

    tests: avoid FreeBSD make VPATH issues in more tests (see bug#7884)
    
    See also similar change 'v1.11-755-g818bc40' of 07-02-2012,
    "tests: work around bug#7884 in many yacc/lex tests".  The
    rationale for this change is basically the same.
    
    * tests/lex-lib-external.test: Use "yl_distcheck" instead of
    bare "$MAKE distcheck" to avoid extra failures caused by
    automake bug#7884.
    * tests/lex-noyywrap.test: Likewise.
    * tests/lex-libobj.test: Likewise.
    * tests/man6.test: This test suffers from the same FreeBSD make
    incompatibility in VPATH handling that is the source of automake
    bug#7884.  Since this is caused by rules that are defined in the
    Makefile.am by the test itself, rather that being generated by
    automake, the best thing to do is to skip this test if we detect
    the presence of said make incompatibility (through the function
    'useless_vpath_rebuild').
    * tests/man8.test: Likewise.

commit 0402db9837e0a482a01d0485a5c1c500d26ac6c3
Author: Stefano Lattarini <address@hidden>
Date:   Sat Feb 18 09:26:30 2012 +0100

    cosmetics: remove extra trailing whitespace in configure.ac

-----------------------------------------------------------------------

Summary of changes:
 NEWS                                     |    6 +++
 configure.ac                             |    2 +-
 lib/am/check2.am                         |   33 ++++++++++++++++--
 tests/lex-lib-external.test              |    2 +-
 tests/lex-libobj.test                    |    2 +-
 tests/lex-noyywrap.test                  |    2 +-
 tests/man6.test                          |    4 ++
 tests/man8.test                          |    4 ++
 tests/parallel-tests-extra-programs.test |    8 ++++-
 tests/parallel-tests-subdir.test         |    2 +
 tests/parallel-tests3.test               |   55 +++++++++++++++++++++++-------
 tests/self-check-dir.tap                 |    3 +-
 12 files changed, 100 insertions(+), 23 deletions(-)

diff --git a/NEWS b/NEWS
index 252fcf7..c1de9b2 100644
--- a/NEWS
+++ b/NEWS
@@ -154,6 +154,12 @@ Bugs fixed in 1.11a:
   - The AM_COND_IF macro also works if the shell expression for the
     conditional is no longer valid for the condition.
 
+  - The automake-provided parallel testsuite harness does not fail anymore
+    with BSD make used in parallel mode when there are test scripts in a
+    subdirectory, like in:
+
+      TESTS = sub/foo.test sub/bar.test
+
 * Long-standing bugs:
 
   - Automake's own build system finally have a real "installcheck" target.
diff --git a/configure.ac b/configure.ac
index 856b80a..eed1c3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -371,7 +371,7 @@ WARNING: You are about to use a $am_release_type of 
automake.
 WARNING: It might easily suffer from new bugs or regressions.
 WARNING: You are strongly advised not to use it in production code.
 
-Please report bugs, problems and feedback to <AC_PACKAGE_BUGREPORT>. 
+Please report bugs, problems and feedback to <AC_PACKAGE_BUGREPORT>.
 EOF
 
 AS_EXIT([0])
diff --git a/lib/am/check2.am b/lib/am/check2.am
index a14e775..9847a44 100644
--- a/lib/am/check2.am
+++ b/lib/am/check2.am
@@ -14,11 +14,32 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+if %?FIRST%
+## When BSD make is run in parallel mode, it apparently strips any
+## leading directory component from the automatic variable '$*' (of
+## course, against what POSIX mandates).  Try to detect and work
+## around this incompatibility.
+am__set_b = \
+  case '$@' in \
+    */*) \
+      case '$*' in \
+        */*) b='$*';; \
+          *) b=`echo '$@' | sed 's/\.log$$//'`; \
+       esac;; \
+    *) \
+      b='$*';; \
+  esac
+endif %?FIRST%
+
 ## From a test file to a .log and .trs file.
 ?GENERIC?%EXT%.log:
 ?!GENERIC?%OBJ%: %SOURCE%
-       @p='%SOURCE%'; $(am__check_pre) %DRIVER% --test-name "$$f" \
-       --log-file '%BASE%.log' --trs-file '%BASE%.trs' \
+       @p='%SOURCE%'; \
+## Another hack to support BSD make in parallel mode.
+?!GENERIC?     b='%BASE%'; \
+?GENERIC?      $(am__set_b); \
+       $(am__check_pre) %DRIVER% --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
 
@@ -28,8 +49,12 @@
 ## conflict with the previous one.
 if %am__EXEEXT%
 ?GENERIC?%EXT%$(EXEEXT).log:
-       @p='%SOURCE%'; $(am__check_pre) %DRIVER% --test-name "$$f" \
-       --log-file '%BASE%.log' --trs-file '%BASE%.trs' \
+       @p='%SOURCE%'; \
+       ## Another hack to support BSD make in parallel mode.
+?!GENERIC?     b='%BASE%'; \
+?GENERIC?      $(am__set_b); \
+       $(am__check_pre) %DRIVER% --test-name "$$f" \
+       --log-file $$b.log --trs-file $$b.trs \
        $(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
        "$$tst" $(AM_TESTS_FD_REDIRECT)
 endif %am__EXEEXT%
diff --git a/tests/lex-lib-external.test b/tests/lex-lib-external.test
index d50ae39..47bee77 100755
--- a/tests/lex-lib-external.test
+++ b/tests/lex-lib-external.test
@@ -71,6 +71,6 @@ if cross_compiling; then :; else
   echo BAD | ./lexer && Exit 1
   : For shells with busted 'set -e'.
 fi
-$MAKE distcheck
+yl_distcheck
 
 :
diff --git a/tests/lex-libobj.test b/tests/lex-libobj.test
index 3bd4f8a..3837a0b 100755
--- a/tests/lex-libobj.test
+++ b/tests/lex-libobj.test
@@ -70,6 +70,6 @@ grep LIBOBJS Makefile # For debugging.
 grep '^LIBOBJS *=.*yywrap.*\.o' Makefile # Sanity check.
 $MAKE
 
-$MAKE distcheck
+yl_distcheck
 
 :
diff --git a/tests/lex-noyywrap.test b/tests/lex-noyywrap.test
index 5b002c8..a0eb731 100755
--- a/tests/lex-noyywrap.test
+++ b/tests/lex-noyywrap.test
@@ -67,6 +67,6 @@ if cross_compiling; then :; else
 fi
 
 # Sanity check on distribution.
-$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"'
+yl_distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"'
 
 :
diff --git a/tests/man6.test b/tests/man6.test
index aa49049..daf0842 100755
--- a/tests/man6.test
+++ b/tests/man6.test
@@ -20,6 +20,10 @@
 required=help2man
 . ./defs || Exit 1
 
+# Avoid a spurious failure due to a known FreeBSD make incompatibility.
+useless_vpath_rebuild \
+  && skip_ "VPATH useless rebuild detected (see bug#7884)"
+
 cat > Makefile.am << 'END'
 dist_man_MANS = $(srcdir)/foobar.1 bazquux.1 zardoz.1
 dist_bin_SCRIPTS = foobar bazquux zardoz
diff --git a/tests/man8.test b/tests/man8.test
index e03341b..bdc0feb 100755
--- a/tests/man8.test
+++ b/tests/man8.test
@@ -18,6 +18,10 @@
 
 . ./defs || Exit 1
 
+# Avoid a spurious failure due to a known FreeBSD make incompatibility.
+useless_vpath_rebuild \
+  && skip_ "VPATH useless rebuild detected (see bug#7884)"
+
 cat > Makefile.am << 'END'
 dist_man_MANS = foo.1
 foo.1:
diff --git a/tests/parallel-tests-extra-programs.test 
b/tests/parallel-tests-extra-programs.test
index 3802176..5b1a58e 100755
--- a/tests/parallel-tests-extra-programs.test
+++ b/tests/parallel-tests-extra-programs.test
@@ -121,7 +121,13 @@ $MAKE -k check >stdout 2>stderr || st=$?
 cat stdout
 cat stderr >&2
 ls -l
-test $st -gt 0 || Exit 1
+if using_gmake; then
+  test $st -gt 0 || Exit 1
+else
+  # Don't trust exit status of "make -k" for non-GNU make.
+  $MAKE check && Exit 1
+  : For shells with busted 'set -e'.
+fi
 
 # Files that should have been created, with the expected content.
 cat bar.c
diff --git a/tests/parallel-tests-subdir.test b/tests/parallel-tests-subdir.test
index 81de2f0..7e7e031 100755
--- a/tests/parallel-tests-subdir.test
+++ b/tests/parallel-tests-subdir.test
@@ -44,6 +44,8 @@ $MAKE check
 find . # For debugging.
 test -f test-suite.log
 test -f dir1/foo.log
+test -f dir1/foo.trs
 test -f dir2/dir3/foo.log
+test -f dir2/dir3/foo.trs
 
 :
diff --git a/tests/parallel-tests3.test b/tests/parallel-tests3.test
index 3e6e189..b37cf0a 100755
--- a/tests/parallel-tests3.test
+++ b/tests/parallel-tests3.test
@@ -18,13 +18,33 @@
 # - concurrent parallel execution
 
 am_parallel_tests=yes
-required=GNUmake
 . ./defs || Exit 1
 
 case $MAKE in
   *\ -j*) skip_ "\$MAKE contains \`-j'";;
 esac
 
+if using_gmake; then
+  j=-j
+else
+  unindent > Makefile <<END
+    all: one two
+    one:
+       $sleep && test -f two
+    two:
+       echo ok > \$@
+END
+  for j in "-j" "-j " NONE; do
+    if test x"$j" = xNONE; then
+      skip_ "can't run make in parallel mode"
+    fi
+    $MAKE ${j}2 all >output 2>&1 || continue
+    $EGREP -i "(warning|error):|-j[\"\'\` ]" output && continue
+    break
+  done
+  rm -f one output Makefile
+fi
+
 cat >> configure.in << 'END'
 AC_OUTPUT
 END
@@ -33,16 +53,25 @@ cat > Makefile.am << 'END'
 TESTS =
 END
 
-for i in 1 2 3 4 5 6 7 8; do
-  echo "TESTS += foo$i.test" >> Makefile.am
-  unindent >foo$i.test <<'END'
-    #! /bin/sh
-    echo "this is $0"
-    # Creative quoting below to please maintainer-check.
-    sleep '1'
-    exit 0
+cat > x <<'END'
+#! /bin/sh
+echo "this is $0"
+# Creative quoting below to please maintainer-check.
+sleep '1'
+exit 0
 END
-  chmod a+x foo$i.test
+chmod a+x ./x
+
+mkdir sub
+for i in 1 2 3; do
+  echo "TESTS += foo$i.test" >> Makefile.am
+  cp x foo$i.test
+  echo "TESTS += zap$i" >> Makefile.am
+  cp x zap$i
+  echo "TESTS += sub/bar$i.test" >> Makefile.am
+  cp x sub/bar$i.test
+  echo "TESTS += sub/mu$i" >> Makefile.am
+  cp x sub/mu$i
 done
 
 $ACLOCAL
@@ -58,20 +87,20 @@ for build in serial parallel; do
 done
 
 cd serial
-$MAKE -j1 check &
+$MAKE ${j}1 check &
 cd ../parallel
 $sleep
 # Use append mode here to avoid dropping output.
 # Yes, this actually happens.
 : >stdout
-$MAKE -j4 check >> stdout
+$MAKE ${j}4 check >> stdout
 cd ..
 # Ensure the tests are really being run in parallel mode: if this is
 # the case, the serial run of the dummy testsuite started above should
 # still be ongoing when the parallel one has terminated.
 kill -0 $!
 cat parallel/stdout
-test `grep -c '^PASS:' parallel/stdout` -eq 8
+test `grep -c '^PASS:' parallel/stdout` -eq 12
 
 # Wait long enough so that there are no open files any more when the
 # post-test cleanup runs.  But exit after we've waited for two minutes
diff --git a/tests/self-check-dir.tap b/tests/self-check-dir.tap
index 1a5d6b4..a934188 100755
--- a/tests/self-check-dir.tap
+++ b/tests/self-check-dir.tap
@@ -38,7 +38,8 @@ do_check ()
   command_ok_ "$1 [$2]" $SHELL -c "
     $2
     . ./defs || Exit 99
-    pwd; ls -l; # For debugging.
+    # Don't fail if 'ls -l' fails; avoids possible racy spurious failures.
+    pwd; ls -l || : # For debugging.
     $3
   " _self.test
 }


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]