From: Stefano Lattarini Date: Mon, 11 Apr 2011 13:15:55 +0000 (+0200) Subject: tests: do not uselessly require GNU make or gcc in a few tests X-Git-Tag: ylwrap-refactor-abandoned-branch~48^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f02ce8d9f9c1c287915a8acef067cc2e30875b05;p=thirdparty%2Fautomake.git 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. --- diff --git a/ChangeLog b/ChangeLog index c0495d5ad..09511ff4b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2011-04-11 Stefano Lattarini + + 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 coverage: test mixed C/C++ yacc-generated parsers in the same dir diff --git a/tests/lex3.test b/tests/lex3.test index 536239b2e..7509d521f 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 f3ddcccf6..12d9f0027 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 54a517a2c..12f9ca6a8 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 1d508edc0..87a515702 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 ca1ac686c..158e64ffd 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