[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] {yacc-work} tests: do not uselessly require GNU make or gcc in a
From: |
Stefano Lattarini |
Subject: |
[PATCH] {yacc-work} tests: do not uselessly require GNU make or gcc in a few tests |
Date: |
Mon, 11 Apr 2011 22:05:39 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
Some minor improvements for a few Yacc/Lex tests, helping to drop
unnecessary requirements. I have a similar patch for `yacc6.test'
(which is untouched by the present patch), but that entails heavier
and potentially more controversial changes, so that I'll present it
in a seprate thread.
I think I've tested the patch quite thoroughly with NetBSD and
FreeBSD make (Debian ports), GNU make and Heirloom make, and
with the Sun C compiler, pcc and gcc.
OK for yacc-work? I will push in 72 hours if there is no objection.
Regards,
Stefano
-*-*-
tests: do not uselessly require GNU make or gcc in a few tests
* tests/lex3.test: Remove gcc from requirements, as any working C
compiler should be ok. Consequently, do not clobber user CFLAGS.
Also, remove GNUmake from requirements; it was added (see commit
`Release-1-8-103-g0d2f592') because this test fails with FreeBSD
make due to VPATH issues -- but so do many other yacc-related and
lex-related tests currently, and requiring GNU make in all of
them would unacceptably reduce coverage.
* tests/lexvpath.test: Remove gcc from requirements, as any
working C compiler should be ok.
* tests/yacc4.test: Likewise.
* tests/yacc8.test: Likewise.
* tests/lex5.test: Likewise. Also, do not require anymore GNU
make; to compensate, explicitly call "$MAKE Makefile" to update
the out-of-date Makefile if $MAKE is not GNU make.
---
ChangeLog | 18 ++++++++++++++++++
tests/lex3.test | 6 +-----
tests/lex5.test | 3 ++-
tests/lexvpath.test | 2 +-
tests/yacc4.test | 6 +++---
tests/yacc8.test | 2 +-
6 files changed, 26 insertions(+), 11 deletions(-)
From 504e7775a9037529cfb19d26c90d903d188a1fcd Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Mon, 11 Apr 2011 15:15:55 +0200
Subject: [PATCH] tests: do not uselessly require GNU make or gcc in a few tests
* tests/lex3.test: Remove gcc from requirements, as any working C
compiler should be ok. Consequently, do not clobber user CFLAGS.
Also, remove GNUmake from requirements; it was added (see commit
`Release-1-8-103-g0d2f592') because this test fails with FreeBSD
make due to VPATH issues -- but so do many other yacc-related and
lex-related tests currently, and requiring GNU make in all of
them would unacceptably reduce coverage.
* tests/lexvpath.test: Remove gcc from requirements, as any
working C compiler should be ok.
* tests/yacc4.test: Likewise.
* tests/yacc8.test: Likewise.
* tests/lex5.test: Likewise. Also, do not require anymore GNU
make; to compensate, explicitly call "$MAKE Makefile" to update
the out-of-date Makefile if $MAKE is not GNU make.
---
ChangeLog | 18 ++++++++++++++++++
tests/lex3.test | 6 +-----
tests/lex5.test | 3 ++-
tests/lexvpath.test | 2 +-
tests/yacc4.test | 6 +++---
tests/yacc8.test | 2 +-
6 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 6462d5c..2e960c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2011-04-11 Stefano Lattarini <address@hidden>
+
+ tests: do not uselessly require GNU make or gcc in a few tests
+ * tests/lex3.test: Remove gcc from requirements, as any working C
+ compiler should be ok. Consequently, do not clobber user CFLAGS.
+ Also, remove GNUmake from requirements; it was added (see commit
+ `Release-1-8-103-g0d2f592') because this test fails with FreeBSD
+ make due to VPATH issues -- but so do many other yacc-related and
+ lex-related tests currently, and requiring GNU make in all of
+ them would unacceptably reduce coverage.
+ * tests/lexvpath.test: Remove gcc from requirements, as any
+ working C compiler should be ok.
+ * tests/yacc4.test: Likewise.
+ * tests/yacc8.test: Likewise.
+ * tests/lex5.test: Likewise. Also, do not require anymore GNU
+ make; to compensate, explicitly call "$MAKE Makefile" to update
+ the out-of-date Makefile if $MAKE is not GNU make.
+
2011-04-10 Stefano Lattarini <address@hidden>
coverage: test mixed C/C++ yacc-generated parsers in the same dir
diff --git a/tests/lex3.test b/tests/lex3.test
index 536239b..7509d52 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -19,15 +19,11 @@
# Test associated with PR 19.
# From Matthew D. Langston.
-required='gcc lex GNUmake'
+required=lex
. ./defs || Exit 1
set -e
-# Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
-
distdir=$me-1.0
cat >> configure.in << 'END'
diff --git a/tests/lex5.test b/tests/lex5.test
index f3ddccc..12d9f00 100755
--- a/tests/lex5.test
+++ b/tests/lex5.test
@@ -17,7 +17,7 @@
# Test for subdir lexers.
-required='gcc GNUmake lex'
+required=lex
. ./defs || Exit 1
set -e
@@ -87,6 +87,7 @@ $AUTOMAKE -a --no-force
test -f ./ylwrap
cd sub
+using_gnumake || $MAKE Makefile
$MAKE foo/foo2.o
test -f foo/foo2.c
test -f foo/foo2.o
diff --git a/tests/lexvpath.test b/tests/lexvpath.test
index 54a517a..12f9ca6 100755
--- a/tests/lexvpath.test
+++ b/tests/lexvpath.test
@@ -22,7 +22,7 @@
# Please keep this in sync with sister test `yaccvapth.test'.
-required='gcc lex'
+required=lex
. ./defs || Exit 1
set -e
diff --git a/tests/yacc4.test b/tests/yacc4.test
index 1d508ed..87a5157 100755
--- a/tests/yacc4.test
+++ b/tests/yacc4.test
@@ -16,7 +16,7 @@
# Some simple tests of ylwrap functionality.
-required='yacc gcc'
+required=yacc
. ./defs || Exit 1
set -e
@@ -36,7 +36,7 @@ END
# First parser.
cat > parse.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%%
@@ -46,7 +46,7 @@ END
# Second parser.
cat > bar.y << 'END'
%{
-int yylex () {return 0;}
+int yylex () { return 0; }
void yyerror (char *s) {}
%}
%%
diff --git a/tests/yacc8.test b/tests/yacc8.test
index ca1ac68..158e64f 100755
--- a/tests/yacc8.test
+++ b/tests/yacc8.test
@@ -17,7 +17,7 @@
# Test for subdir parsers.
-required="gcc yacc"
+required=yacc
. ./defs || Exit 1
--
1.7.2.3
- [PATCH] {yacc-work} tests: do not uselessly require GNU make or gcc in a few tests,
Stefano Lattarini <=