[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-3
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-371-ga0e045d |
Date: |
Fri, 15 Apr 2011 13:58:45 +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=a0e045d60639b630b06214a3f05f9f353ed73a63
The branch, yacc-work has been updated
via a0e045d60639b630b06214a3f05f9f353ed73a63 (commit)
via d6186ffa1f4b9889f2b30fd52fca1b26d2cbf3af (commit)
from 87918bb4fd5b4a9d93e710454525300f372c9057 (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 a0e045d60639b630b06214a3f05f9f353ed73a63
Author: Stefano Lattarini <address@hidden>
Date: Fri Apr 15 15:42:42 2011 +0200
coverage: test lex-generated "#line" directives postprocessing
* tests/yacc-line.test: In heading comments, add reference to new
sister test `lex-line.test'.
* tests/lex-line.test: New test.
* tests/Makefile.am (TESTS): Update.
commit d6186ffa1f4b9889f2b30fd52fca1b26d2cbf3af
Author: Stefano Lattarini <address@hidden>
Date: Fri Apr 15 14:34:35 2011 +0200
tests: minor improvements to a couple of yacc tests
* tests/yacc-auxdir.test: Avoid running autoconf, it's not
needed.
* tests/yacc-line.test: Also check that the yacc-generated C
and header files do not contain "#line" directives referencing
`y.tab.c' or `y.tab.h'. Add a couple of explicative comments.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 17 ++++++++
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/{yacc-line.test => lex-line.test} | 63 ++++++++++++++++--------------
tests/yacc-auxdir.test | 1 -
tests/yacc-line.test | 5 ++
6 files changed, 58 insertions(+), 30 deletions(-)
copy tests/{yacc-line.test => lex-line.test} (61%)
diff --git a/ChangeLog b/ChangeLog
index eb0b4c3..663f862 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2011-04-14 Stefano Lattarini <address@hidden>
+
+ coverage: test lex-generated "#line" directives postprocessing
+ * tests/yacc-line.test: In heading comments, add reference to new
+ sister test `lex-line.test'.
+ * tests/lex-line.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
+2011-04-14 Stefano Lattarini <address@hidden>
+
+ tests: minor improvements to a couple of yacc tests
+ * tests/yacc-auxdir.test: Avoid running autoconf, it's not
+ needed.
+ * tests/yacc-line.test: Also check that the yacc-generated C
+ and header files do not contain "#line" directives referencing
+ `y.tab.c' or `y.tab.h'. Add a couple of explicative comments.
+
2011-04-11 Stefano Lattarini <address@hidden>
tests: split yacc6.test, for better separation and coverage
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2c99c97..36bfd2f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -437,6 +437,7 @@ lex4.test \
lex5.test \
lexcpp.test \
lexvpath.test \
+lex-line.test \
lex-subobj-nodep.test \
lflags.test \
lflags2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 0a6e30f..8d2f67c 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -707,6 +707,7 @@ lex4.test \
lex5.test \
lexcpp.test \
lexvpath.test \
+lex-line.test \
lex-subobj-nodep.test \
lflags.test \
lflags2.test \
diff --git a/tests/yacc-line.test b/tests/lex-line.test
similarity index 61%
copy from tests/yacc-line.test
copy to tests/lex-line.test
index ae6dbcf..27958c8 100755
--- a/tests/yacc-line.test
+++ b/tests/lex-line.test
@@ -1,6 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 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,11 +14,12 @@
# 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 that automake yacc support ensures that yacc-generated C
+# Check that automake lex support ensures that lex-generated C
# files use correct "#line" directives. Try also with the
# `subdir-object' option enabled.
+# See also sister test `yacc-line.test'.
-required=yacc
+required=lex
. ./defs || Exit 1
set -e
@@ -28,7 +28,7 @@ cat >> configure.in << 'END'
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
-AC_PROG_YACC
+AC_PROG_LEX
AC_OUTPUT
END
@@ -37,10 +37,10 @@ mkdir dir sub sub/dir
cat > Makefile.am << 'END'
SUBDIRS = sub
bin_PROGRAMS = foo bar
-AM_YFLAGS = -d
-bar_YFLAGS =
-foo_SOURCES = zardoz.y
-bar_SOURCES = dir/quux.y
+LDADD = $(LEXLIB)
+bar_LFLAGS = -v
+foo_SOURCES = zardoz.l
+bar_SOURCES = dir/quux.l
## Avoid spurious failures with Solaris make.
address@hidden@: zardoz.c
address@hidden@: bar-quux.c
@@ -49,31 +49,32 @@ END
cat > sub/Makefile.am << 'END'
AUTOMAKE_OPTIONS = subdir-objects
noinst_PROGRAMS = foo bar
-foo_YFLAGS = -d
-foo_SOURCES = zardoz.y
-bar_SOURCES = dir/quux.y
+## We already used $(LEXLIB) above, so try @LEXLIB@ now.
+LDADD = @LEXLIB@
+foo_LFLAGS = -v
+foo_SOURCES = zardoz.l
+bar_SOURCES = dir/quux.l
## Avoid spurious failures with Solaris make.
address@hidden@: foo-zardoz.c
dir/address@hidden@: dir/quux.c
END
-cat > zardoz.y << 'END'
-%{
-int yylex () { return 0; }
-void yyerror (char *s) { return; }
-%}
+cat > zardoz.l << 'END'
%%
-x : 'x' {};
+"END" return EOF;
+.
%%
-int main(void)
+int main ()
{
- return yyparse ();
+ while (yylex () != EOF)
+ ;
+ return 0;
}
END
-cp zardoz.y dir/quux.y
-cp zardoz.y sub/zardoz.y
-cp zardoz.y sub/dir/quux.y
+cp zardoz.l dir/quux.l
+cp zardoz.l sub/zardoz.l
+cp zardoz.l sub/dir/quux.l
c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
@@ -96,14 +97,18 @@ for vpath in : false; do
# For debugging,
ls -l . sub sub/dir
- $FGREP '.y' $c_outputs
+ $FGREP '.l' $c_outputs
- $EGREP '#.*line.*(build|\.\.).*\.y' $c_outputs && Exit 1
+ # Adjusted "#line" should not contain reference to the builddir.
+ $EGREP '#.*line.*(build|\.\.).*\.l' $c_outputs && Exit 1
+ # Adjusted "#line" should not contain reference to the default
+ # output file names, e.g., `lex.yy.c'.
+ $EGREP '#.*line.*lex\.yy' $c_outputs && Exit 1
# Don't be excessively strict in grepping, to avoid spurious failures.
- grep '#.*line.*zardoz\.y' zardoz.c
- grep '#.*line.*quux\.y' bar-quux.c
- grep '#.*line.*zardoz\.y' sub/foo-zardoz.c
- grep '#.*line.*quux\.y' sub/dir/quux.c
+ grep '#.*line.*zardoz\.l' zardoz.c
+ grep '#.*line.*quux\.l' bar-quux.c
+ grep '#.*line.*zardoz\.l' sub/foo-zardoz.c
+ grep '#.*line.*quux\.l' sub/dir/quux.c
cd $srcdir
done
diff --git a/tests/yacc-auxdir.test b/tests/yacc-auxdir.test
index 973a338..700fcd8 100755
--- a/tests/yacc-auxdir.test
+++ b/tests/yacc-auxdir.test
@@ -48,7 +48,6 @@ bar_SOURCES = bar.y main.c
END
$ACLOCAL
-$AUTOCONF
$AUTOMAKE -a
test -f aux1/ylwrap
test ! -f ylwrap
diff --git a/tests/yacc-line.test b/tests/yacc-line.test
index ae6dbcf..f760b72 100755
--- a/tests/yacc-line.test
+++ b/tests/yacc-line.test
@@ -18,6 +18,7 @@
# Check that automake yacc support ensures that yacc-generated C
# files use correct "#line" directives. Try also with the
# `subdir-object' option enabled.
+# See also sister test `lex-line.test'.
required=yacc
. ./defs || Exit 1
@@ -98,7 +99,11 @@ for vpath in : false; do
ls -l . sub sub/dir
$FGREP '.y' $c_outputs
+ # Adjusted "#line" should not contain reference to the builddir.
$EGREP '#.*line.*(build|\.\.).*\.y' $c_outputs && Exit 1
+ # Adjusted "#line" should not contain reference to the default
+ # output file names, e.g., `y.tab.c' and `y.tab.h'.
+ $EGREP '#.*line.*y\.tab\.' $c_outputs && Exit 1
# Don't be excessively strict in grepping, to avoid spurious failures.
grep '#.*line.*zardoz\.y' zardoz.c
grep '#.*line.*quux\.y' bar-quux.c
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-371-ga0e045d,
Stefano Lattarini <=