automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12.2-8-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.12.2-8-g5dd21f9
Date: Fri, 13 Jul 2012 12:37:20 +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=5dd21f9af052cfd2fa3dddb7f2ff4c5f7437a657

The branch, maint has been updated
       via  5dd21f9af052cfd2fa3dddb7f2ff4c5f7437a657 (commit)
       via  9df354ac9834f319c1faeef11748b7f1f7afdfae (commit)
       via  1bc5acb2df2fdf297bc101f36589ab9f932647bf (commit)
      from  65e7ac8c3556d1895ee597811856710143cfc4ac (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 5dd21f9af052cfd2fa3dddb7f2ff4c5f7437a657
Merge: 9df354a 1bc5acb
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jul 13 13:55:58 2012 +0200

    Merge branches 'fix-pr11898' and 'fix-pr-11893-and-10766' into maint
    
    * fix-pr11898:
      tests: verify the shell test scripts are syntactically valid
    
    * fix-pr-11893-and-10766:
      tests: don't use C instead of C++ compiler on case-insensitive platforms

commit 9df354ac9834f319c1faeef11748b7f1f7afdfae
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jul 11 10:51:15 2012 +0200

    tests: verify the shell test scripts are syntactically valid
    
    Fixes automake bug#11898.
    
    This measure of extra safety is mostly motivated by the fact that some
    shells (at least some versions of Bash in the 3.x release series, one
    of which serves as /bin/sh on Mac OS X 10.7, as well as Bash 4.0 and the
    /usr/xpg4/bin/sh shell from Solaris 10) erroneously exit with exit status
    0 upon encountering a syntax error, if an exit trap is sett (as it is in
    our test scripts).
    
    * Makefile.am (check-tests-syntax): New, check that the shell test
    scripts listed in $(TESTS) are syntactically correct.
    (.PHONY, check-local): Depend on it.
    * t/self-check-exit.tap : Remove checks verifying that a script exits
    with non-zero status upon encountering a syntax error; as explained
    above, we can't depend on that.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 1bc5acb2df2fdf297bc101f36589ab9f932647bf
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jul 11 14:36:13 2012 +0200

    tests: don't use C instead of C++ compiler on case-insensitive platforms
    
    This change fixes automake bug#11893 and bug#10766.
    
    On at least Cygwin and Mac OS X 10.7, the file system where the system
    compilers are located can be case-insensitive, so that looking for a
    program named 'CC' might actually find the C compiler in /usr/bin/cc.
    
    Now, the Automake configure script looks for a C++ compiler named 'CC'
    before looking for more obvious names like c++ or g++ (that is done to
    increase testsuite "coverage in the wild", e.g., preferring, on Solaris,
    the Sun Studio C++ compiler /usr/bin/CC over the GNU C++ compiler).
    
    Since the checks done in AC_PROG_CXX are apparently not strict enough
    to rule out C compilers like those from GCC or Clang (which are smart
    enough to recognize if a file has a C++ extension, passing it to the
    C++ front end) the testsuite might end up using a C compiler where a
    C++ one is expected, with some subtle bad consequences.
    
    * configure.ac: Don't look for a C++ compiler named 'CC' if the
    "top-level" file system(s) (where /bin and /usr/bin are) are detected
    to be case-insensitive.
    
    Reported-by: Peter Rosin <address@hidden>
    Reported-by: Max Horn <address@hidden>
    Helped-by: Eric Blake <address@hidden>
    Signed-off-by: Stefano Lattarini <address@hidden>

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

Summary of changes:
 Makefile.am           |   35 +++++++++++++++++++++++++++++++++++
 configure.ac          |   13 ++++++++++++-
 t/self-check-exit.tap |    8 +-------
 3 files changed, 48 insertions(+), 8 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2764481..5aa543e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -426,6 +426,41 @@ check-no-repeated-test-name:
 check-local: check-no-repeated-test-name
 .PHONY: check-no-repeated-test-name
 
+# Check that our test cases are syntactically correct.
+# See automake bug#11898.
+check-tests-syntax:
+       @st=0; \
+       err () { echo "$@: $$*" >&2; st=1; }; \
+## The user might do something like "make check TESTS=t/foo" or
+## "make check TESTS_LOGS=t/foo.log" and expect (say) the test
+## 't/foo.sh' to be run; this has worked well until today, and
+## we want to continue supporting this use case.
+       bases=`for log in : $(TEST_LOGS); do echo $$log; done \
+         | sed -e '/^:$$/d' -e 's/\.log$$//'`; \
+       for bas in $$bases; do \
+         for suf in sh tap pl; do \
+           tst=$$bas.$$suf; \
+## Emulate VPATH search.
+           if test -f $$tst; then \
+             break; \
+           elif test -f $(srcdir)/$$tst; then \
+             tst=$(srcdir)/$$tst; \
+             break; \
+           else \
+             tst=''; \
+           fi; \
+         done; \
+         test -n "$$tst" || err "couldn't find test '$$bas'"; \
+## Don't check that perl tests are valid shell scripts!
+         test $$suf = pl && continue; \
+         $(AM_V_P) && echo " $(AM_TEST_RUNNER_SHELL) -n $$tst"; \
+         $(AM_TEST_RUNNER_SHELL) -n "$$tst" \
+           || err "test '$$tst' syntactically invalid"; \
+       done; \
+       exit $$st
+check-local: check-tests-syntax
+.PHONY: check-tests-syntax
+
 ## Checking the list of tests.
 test_subdirs = t t/pm t/perf
 include $(srcdir)/t/CheckListOfTests.am
diff --git a/configure.ac b/configure.ac
index 49b008d..d49da6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -442,12 +442,23 @@ _AM_COMPILER_CAN_FAIL(dnl
 
 AS_IF([test x"$GCC" = x"yes"], [am_CC_is_GNU=yes], [am_CC_is_GNU=no])
 
+# On case-insensitive file systems (seen e.g. on Cygwin and Mac OS X)
+# we must avoid looking for 'CC', because that would be the same as
+# 'cc', and could cause $CXX to point to the C compiler, instead of
+# to a C++ compiler as expected.  See automake bugs #11893 and #10766.
+if test -f /bIn/rMdIr || test -f /uSr/bIn/rMdIr; then
+  # Case-insensitive file system, don't look for CC.
+  am_CC=
+else
+  am_CC=CC
+fi
+
 # The list of C++ compilers here has been copied, pasted and edited
 # from 'lib/autoconf/c.m4:AC_PROG_CXX' in the Autoconf distribution.
 # Keep it in sync, or better again, find out a way to avoid this code
 # duplication.
 _AM_COMPILER_CAN_FAIL([AC_PROG_CXX(dnl
-  [aCC CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++])],
+  [aCC $am_CC FCC KCC RCC xlC_r xlC c++ cxx cc++ gpp g++])],
   [CXX=false; _AM_SKIP_COMP_TESTS([C++])])
 
 AS_IF([test x"$GXX" = x"yes"], [am_CXX_is_GNU=yes], [am_CXX_is_GNU=no])
diff --git a/t/self-check-exit.tap b/t/self-check-exit.tap
index 0fbc9d8..19cf27a 100755
--- a/t/self-check-exit.tap
+++ b/t/self-check-exit.tap
@@ -22,7 +22,7 @@
 am_create_testdir=no
 . ./defs || exit 99
 
-plan_ 34
+plan_ 32
 
 # This test becomes more cumbersome if we keep the 'errexit' shell flag
 # set.  And removing it is no big deal, as this test is a TAP-based one,
@@ -79,10 +79,4 @@ test -f Makefile && test ! -x Makefile || \
 $AM_TEST_RUNNER_SHELL -c "$init ./Makefile; :" "$dummy_test_script"
 command_ok_ "permission denied" test $? -gt 0
 
-: Syntax errors in the test code.
-$AM_TEST_RUNNER_SHELL -c "$init if :; then" "$dummy_test_script"
-command_ok_ "syntax error 1" test $? -gt 0
-$AM_TEST_RUNNER_SHELL -c "$init true ( true )" "$dummy_test_script"
-command_ok_ "syntax error 2" test $? -gt 0
-
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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