automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-890-gf35c979
Date: Wed, 01 Jun 2011 16:55:07 +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=f35c9794b0a98bfe696e4002dc403ea76a9e4d63

The branch, testsuite-work has been updated
       via  f35c9794b0a98bfe696e4002dc403ea76a9e4d63 (commit)
       via  dc6d8b29da25a935fb8721d1ee6242687fa0eeab (commit)
       via  b1b5ea5c54bfc54a576bf88dd74081f75f66609b (commit)
       via  c6f28c7dae471c56616783952909a64e9543e34a (commit)
      from  851e77acaa6a24bd9a50b5c4dc3923228c265c6c (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 f35c9794b0a98bfe696e4002dc403ea76a9e4d63
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 1 18:49:27 2011 +0200

    lex tests: fix spurious failures with Solaris lex
    
    * tests/lex-lib.test (foo.l): Avoid empty "rules section", which
    can confuse Solaris lex.
    * tests/lex-libobj.test (foo.l): Likewise.

commit dc6d8b29da25a935fb8721d1ee6242687fa0eeab
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 1 17:55:05 2011 +0200

    lex tests: do not force the use of flex unconditionally
    
    * tests/defs (lex): Act more similarly to what the `yacc'
    requirement does, i.e., only force the use of flex if the
    $LEX variable is left unset by the user.
    (flex): Use `skip_' to skip the test if flex is not found.

commit b1b5ea5c54bfc54a576bf88dd74081f75f66609b
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 1 17:43:44 2011 +0200

    lex tests: avoid possible hang; fix and extend
    
    * tests/lex3.test (foo.l:yywrap): Return 1, not 0, to avoid hangs.
    Bug introduced in commit 'v1.11-871-geb147a1'.
    (Makefile.am): Do not add address@hidden@' to `$(LDADD)', as we define
    our own `yywrap' function.
    * tests/lex.test (tscan.l): In `yywrap', return 1, not 0, for
    consistency with the default flex implementation.
    * tests/lex-libobj.test (yywrap.c): Likewise.
    * tests/lex-subobj-nodep.test (s1.l): Likewise.
    * tests/lexvpath.test (foo.c): Likewise.
    * tests/silent-lex-gcc (foo.l): Likewise.
    * tests/silent-lex-generic (foo.l): Likewise.
    * tests/silent-many-gcc (foo5.l): Likewise.
    * tests/silent-many-generic (foo5.l): Likewise.
    * tests/lex-lib.test (mu.c): Likewise.
    Update heading comments, to refer to ...
    * tests/lex-lib-external.test: ... this new test, which checks
    that we can get use the `yywrap' function from a system-wide
    library, if that's available.

commit c6f28c7dae471c56616783952909a64e9543e34a
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 1 16:45:19 2011 +0200

    tests: prefer `skip_' over `echo ...; Exit 77'
    
    * tests/self-check-cleanup.test: When the test must be skipped,
    use `skip_ REASON' instead of `echo REASON; Exit 77'.  Also,
    make the skip message shorter and clearer.

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

Summary of changes:
 ChangeLog                                          |   44 +++++++++++++++++++
 tests/Makefile.am                                  |    1 +
 tests/Makefile.in                                  |    1 +
 tests/cond35.test                                  |    2 +-
 tests/defs                                         |   16 ++++++-
 tests/{lex-noyywrap.test => lex-lib-external.test} |   45 ++++++++++---------
 tests/lex-lib.test                                 |    4 +-
 tests/lex-libobj.test                              |    5 +-
 tests/lex-subobj-nodep.test                        |    2 +-
 tests/lex3.test                                    |    7 +--
 tests/lexvpath.test                                |    2 +-
 tests/self-check-cleanup.test                      |    3 +-
 tests/silent-lex-gcc.test                          |    2 +-
 tests/silent-lex-generic.test                      |    2 +-
 tests/silent-many-gcc.test                         |    2 +-
 tests/silent-many-generic.test                     |    2 +-
 16 files changed, 101 insertions(+), 39 deletions(-)
 copy tests/{lex-noyywrap.test => lex-lib-external.test} (60%)

diff --git a/ChangeLog b/ChangeLog
index 7100f28..d719a78 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,49 @@
 2011-06-01  Stefano Lattarini  <address@hidden>
 
+       lex tests: fix spurious failures with Solaris lex
+       * tests/lex-lib.test (foo.l): Avoid empty "rules section", which
+       can confuse Solaris lex.
+       * tests/lex-libobj.test (foo.l): Likewise.
+
+2011-06-01  Stefano Lattarini  <address@hidden>
+
+       lex tests: do not force the use of flex unconditionally
+       * tests/defs (lex): Act more similarly to what the `yacc'
+       requirement does, i.e., only force the use of flex if the
+       $LEX variable is left unset by the user.
+       (flex): Use `skip_' to skip the test if flex is not found.
+
+2011-06-01  Stefano Lattarini  <address@hidden>
+
+       lex tests: avoid possible hang; fix and extend
+       * tests/lex3.test (foo.l:yywrap): Return 1, not 0, to avoid hangs.
+       Bug introduced in commit 'v1.11-871-geb147a1'.
+       (Makefile.am): Do not add address@hidden@' to `$(LDADD)', as we define
+       our own `yywrap' function.
+       * tests/lex.test (tscan.l): In `yywrap', return 1, not 0, for
+       consistency with the default flex implementation.
+       * tests/lex-libobj.test (yywrap.c): Likewise.
+       * tests/lex-subobj-nodep.test (s1.l): Likewise.
+       * tests/lexvpath.test (foo.c): Likewise.
+       * tests/silent-lex-gcc (foo.l): Likewise.
+       * tests/silent-lex-generic (foo.l): Likewise.
+       * tests/silent-many-gcc (foo5.l): Likewise.
+       * tests/silent-many-generic (foo5.l): Likewise.
+       * tests/lex-lib.test (mu.c): Likewise.
+       Update heading comments, to refer to ...
+       * tests/lex-lib-external.test: ... this new test, which checks
+       that we can get use the `yywrap' function from a system-wide
+       library, if that's available.
+
+2011-06-01  Stefano Lattarini  <address@hidden>
+
+       tests: prefer `skip_' over `echo ...; Exit 77'
+       * tests/self-check-cleanup.test: When the test must be skipped,
+       use `skip_ REASON' instead of `echo REASON; Exit 77'.  Also,
+       make the skip message shorter and clearer.
+
+2011-06-01  Stefano Lattarini  <address@hidden>
+
        tests: fix spurious failures in self tests
        Our ad-hoc usage of `tests/defs' in the testsuite's self tests
        stopped working properly when we made the test scripts re-execute
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0bb993a..02a99b6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -558,6 +558,7 @@ lexcpp.test \
 lexvpath.test \
 lex-subobj-nodep.test \
 lex-lib.test \
+lex-lib-external.test \
 lex-libobj.test \
 lex-noyywrap.test \
 lflags.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 875b06e..4e4d4a9 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -846,6 +846,7 @@ lexcpp.test \
 lexvpath.test \
 lex-subobj-nodep.test \
 lex-lib.test \
+lex-lib-external.test \
 lex-libobj.test \
 lex-noyywrap.test \
 lflags.test \
diff --git a/tests/cond35.test b/tests/cond35.test
index 143c082..f2b0ded 100755
--- a/tests/cond35.test
+++ b/tests/cond35.test
@@ -64,7 +64,7 @@ cat > tscan.l << 'END'
 /* Avoid possible link errors. */
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 END
 
diff --git a/tests/defs b/tests/defs
index 1f3210c..ea036f8 100644
--- a/tests/defs
+++ b/tests/defs
@@ -520,12 +520,24 @@ do
        && test "${#_am_dummy}" -eq 5' ) \
           || skip_ "the shell lacks some required XSI features"
       ;;
-    flex|lex)
+    flex)
       # Since flex is required, we pick LEX for ./configure.
       LEX=flex
       export LEX
       echo "$me: running flex --version"
-      flex --version || exit 77
+      flex --version || skip_ "required program \`flex' not available"
+      ;;
+    lex)
+      test "$LEX" = false && skip_ "no Lex program available"
+      if test -z "$LEX"; then
+        # The user hasn't explicitly specified any lex program in the
+        # environment, so we try to use flex, skipping the test if it's
+        # not found.
+        LEX=flex
+        export LEX
+        echo "$me: running flex --version"
+        flex --version || skip_ "required program \`flex' not available"
+      fi
       ;;
     yacc)
       test "$YACC" = false && skip_ "no Yacc program available"
diff --git a/tests/lex-noyywrap.test b/tests/lex-lib-external.test
similarity index 60%
copy from tests/lex-noyywrap.test
copy to tests/lex-lib-external.test
index 9431970..5f04594 100755
--- a/tests/lex-noyywrap.test
+++ b/tests/lex-lib-external.test
@@ -1,6 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2011 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,29 +14,34 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Check Lex support with flex using the `%noyywrap' option.
+# Check that we can get use the `yywrap' function from a system-wide
+# library, if that's available.
 
-required='cc flex'
+required='cc lex'
 . ./defs || Exit 1
 
 cat >> configure.in << 'END'
 AC_PROG_CC
-AM_PROG_LEX
+AC_PROG_RANLIB
+AC_PROG_LEX
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foo
-foo_SOURCES = foo.l
+bin_PROGRAMS = lexer
+lexer_SOURCES = foo.l
+lexer_LDADD = $(LEXLIB)
 
-.PHONY: test-no-lexlib
-check-local: test-no-lexlib
-test-no-lexlib:
-       test x'$(LEXLIB)' = x'none needed'
+.PHONY: have-lexlib
+have-lexlib:
+       test x'$(LEXLIB)' != x
+       echo 'int main (void) { return yywrap (); }' > x.c
+       $(CC) -c x.c
+       $(CC) x.$(OBJEXT) $(LEXLIB)
+       rm -f x.c *.$(OBJEXT) *.o *.out *.exe
 END
 
-cat > foo.l << 'END'
-%option noyywrap
+cat > foo.l <<'END'
 %%
 "GOOD"   return EOF;
 .
@@ -57,16 +61,15 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure LEXLIB="none needed"
+./configure
+$MAKE have-lexlib || skip_ "no system-wide lex library found"
 
-# Program should build and run.
-$MAKE
+# Program should build and run and distribute.
+$MAKE all
 if cross_compiling; then :; else
-  echo GOOD | ./foo
-  echo BAD | ./foo && Exit 1
+  echo GOOD | ./lexer
+  echo BAD | ./lexer && Exit 1
 fi
-
-# Sanity check on distribution.
-$MAKE distcheck DISTCHECK_CONFIGURE_FLAGS='LEXLIB="none needed"'
+$MAKE distcheck
 
 :
diff --git a/tests/lex-lib.test b/tests/lex-lib.test
index 07af3ff..0cdc4b7 100755
--- a/tests/lex-lib.test
+++ b/tests/lex-lib.test
@@ -17,6 +17,7 @@
 
 # Check that we can provide a personal `yywrap' function in a custom
 # library.
+# See also test `lex-lib-external.test'.
 
 required='cc lex'
 . ./defs || Exit 1
@@ -41,12 +42,13 @@ END
 cat > mu.c << 'END'
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 END
 
 cat > foo.l <<'END'
 %%
+"END" return EOF;
 .
 %%
 int main (void)
diff --git a/tests/lex-libobj.test b/tests/lex-libobj.test
index 1ca1d4c..75831c4 100755
--- a/tests/lex-libobj.test
+++ b/tests/lex-libobj.test
@@ -41,12 +41,13 @@ END
 cat > yywrap.c << 'END'
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 END
 
 cat > foo.l <<'END'
 %%
+"END" return EOF;
 .
 %%
 int main (void)
@@ -64,7 +65,7 @@ grep LIBOBJS Makefile # For debugging.
 $MAKE
 $MAKE distclean
 
-# Force no "system lex library".
+# Force "no system lex library".
 ./configure LEXLIB='-L /lib'
 grep LIBOBJS Makefile # For debugging.
 grep '^LIBOBJS *=.*yywrap.*\.o' Makefile # Sanity check.
diff --git a/tests/lex-subobj-nodep.test b/tests/lex-subobj-nodep.test
index 322ae96..5db7168 100755
--- a/tests/lex-subobj-nodep.test
+++ b/tests/lex-subobj-nodep.test
@@ -51,7 +51,7 @@ int main (void)
 
 int yywrap(void)
 {
-  return 0;
+  return 1;
 }
 END
 
diff --git a/tests/lex3.test b/tests/lex3.test
index 9c2f5b4..ae79796 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -29,9 +29,8 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-LDADD             = @LEXLIB@
-noinst_PROGRAMS   = foo
-foo_SOURCES       = foo.l
+noinst_PROGRAMS = foo
+foo_SOURCES = foo.l
 END
 
 cat > foo.l << 'END'
@@ -53,7 +52,7 @@ int main (void)
 /* Avoid possible link errors. */
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 END
 
diff --git a/tests/lexvpath.test b/tests/lexvpath.test
index 93902b3..2f54256 100755
--- a/tests/lexvpath.test
+++ b/tests/lexvpath.test
@@ -59,7 +59,7 @@ int main (void)
 /* Avoid possible link errors. */
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 END
 
diff --git a/tests/self-check-cleanup.test b/tests/self-check-cleanup.test
index f9a8658..7660316 100755
--- a/tests/self-check-cleanup.test
+++ b/tests/self-check-cleanup.test
@@ -20,8 +20,7 @@
 . ./defs || Exit 1
 
 if test x"$sh_errexit_works" != x"yes"; then
-  echo "$me: the shell can't have a working exit trap with 'set -e'" >&2
-  Exit 77
+  skip_ "$me: no working exit trap with 'set -e'"
 fi
 
 # We still need a little hack to make ./defs work outside automake's
diff --git a/tests/silent-lex-gcc.test b/tests/silent-lex-gcc.test
index 2a691c3..e01fd72 100755
--- a/tests/silent-lex-gcc.test
+++ b/tests/silent-lex-gcc.test
@@ -58,7 +58,7 @@ cat > foo.l <<'EOF'
 /* Avoid possible link errors. */
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 int main (void)
 {
diff --git a/tests/silent-lex-generic.test b/tests/silent-lex-generic.test
index bc3ffff..7d2b197 100755
--- a/tests/silent-lex-generic.test
+++ b/tests/silent-lex-generic.test
@@ -58,7 +58,7 @@ cat > foo.l <<'EOF'
 /* Avoid possible link errors. */
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 int main (void)
 {
diff --git a/tests/silent-many-gcc.test b/tests/silent-many-gcc.test
index 8cdb35b..b2d4174 100755
--- a/tests/silent-many-gcc.test
+++ b/tests/silent-many-gcc.test
@@ -161,7 +161,7 @@ cat > foo5.l <<'EOF'
 /* Avoid possible link errors. */
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 EOF
 cat > foo6.y <<'EOF'
diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test
index 7d615ac..17dea2c 100755
--- a/tests/silent-many-generic.test
+++ b/tests/silent-many-generic.test
@@ -162,7 +162,7 @@ cat > foo5.l <<'EOF'
 /* Avoid possible link errors. */
 int yywrap (void)
 {
-  return 0;
+  return 1;
 }
 EOF
 cat > foo6.y <<'EOF'


hooks/post-receive
-- 
GNU Automake



reply via email to

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