From d803322e27fd275ecf6daf141a39030c779758bc Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Wed, 14 Nov 2001 15:20:47 +0000 Subject: [PATCH 1/1] * tests/calc.at, tests/output.at, tests/regression.at, * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g: now the tests are run in private dirs, therefore AC_CLEANUP and family can be simplified to 0-ary. * tests/atlocal.in: Now that we run `elsewhere' than in tests/, use abs. path to find config.h. * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's stderr, there can be way too much random noise. Instead pass -Werror to GCC and rely on the exit status. Reported by Wolfram Wagner. --- ChangeLog | 13 +++++++++++++ THANKS | 1 + tests/atlocal.in | 2 +- tests/calc.at | 12 +++++++++--- tests/output.at | 2 +- tests/regression.at | 26 ++++++++++++-------------- tests/testsuite.at | 2 +- tests/torture.at | 1 - 8 files changed, 38 insertions(+), 21 deletions(-) diff --git a/ChangeLog b/ChangeLog index b37a3a5a..3f5f4bed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2001-11-14 Akim Demaille + + * tests/calc.at, tests/output.at, tests/regression.at, + * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g: + now the tests are run in private dirs, therefore AC_CLEANUP and + family can be simplified to 0-ary. + * tests/atlocal.in: Now that we run `elsewhere' than in tests/, + use abs. path to find config.h. + * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's + stderr, there can be way too much random noise. + Instead pass -Werror to GCC and rely on the exit status. + Reported by Wolfram Wagner. + 2001-11-14 Akim Demaille * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be diff --git a/THANKS b/THANKS index ebf307b9..346d5977 100644 --- a/THANKS +++ b/THANKS @@ -26,6 +26,7 @@ Richard Stallman rms@gnu.org Robert Anisko anisko_r@epita.fr Shura debil_urod@ngs.ru Tom Lane tgl@sss.pgh.pa.us +Wolfram Wagner ww@mpi-sb.mpg.de Wwp subscript@free.fr Many people are not named here because we lost track of them. We diff --git a/tests/atlocal.in b/tests/atlocal.in index 81b0995a..9b8b7a8a 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -10,4 +10,4 @@ CFLAGS='@CFLAGS@' GCC='@GCC@' # We need `config.h'. -CPPFLAGS="-I $top_builddir @CPPFLAGS@" +CPPFLAGS="-I $top_buildpath @CPPFLAGS@" diff --git a/tests/calc.at b/tests/calc.at index a366cd85..9bf1af9c 100644 --- a/tests/calc.at +++ b/tests/calc.at @@ -338,8 +338,14 @@ AT_CHECK([bison calc.y -o calc.c m4_bpatsubst([$1], [--yyerror-verbose])], # Maybe some day we will have proper Autoconf macros to disable these # warnings, but this place is not the right one for that. # So let's keep only GCC warnings, which we know are sane. -AT_CHECK([$CC $CFLAGS $CPPFLAGS calc.c -o calc], 0, [], [stderr]) -AT_CHECK([if test "$GCC" = yes; then cat stderr; else true; fi]) +# Well, that's only part of the story: some assemblers issue warnings +# which can be totally useless, and actually polluting. It seems that +# the best bet be to completely ignore stderr, but to pass -Werror +# to GCC. +if test "$GCC" = yes; then + CFLAGS="$CFLAGS -Werror" +fi +AT_CHECK([$CC $CFLAGS $CPPFLAGS calc.c -o calc], 0, [], [ignore]) # Test the priorities. _AT_CHECK_CALC([$1], @@ -377,7 +383,7 @@ _AT_CHECK_CALC_ERROR([$1], [2.0:2.1], [unexpected `'+'']) -AT_CLEANUP(calc calc.c calc.h calc.output) +AT_CLEANUP ])# AT_CHECK_CALC diff --git a/tests/output.at b/tests/output.at index 55177fe4..ee50d6a1 100644 --- a/tests/output.at +++ b/tests/output.at @@ -31,7 +31,7 @@ foo: {} AT_CHECK([bison $3 $1], 0) AT_CHECK([ls $4], [], [ignore]) -AT_CLEANUP($4) +AT_CLEANUP ]) AT_CHECK_OUTPUT([foo.y], [], [-dv], diff --git a/tests/regression.at b/tests/regression.at index da2ab065..6f702f32 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -40,7 +40,7 @@ exp: '(' exp ')' | NUM ; AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore) -AT_CLEANUP([duplicate.*]) +AT_CLEANUP ## ------------------------- ## @@ -139,7 +139,7 @@ state 6 $default accept ]]) -AT_CLEANUP(input.c input.output) +AT_CLEANUP ## --------------------- ## @@ -236,7 +236,7 @@ state 6 $default accept ]]) -AT_CLEANUP(input.c input.output) +AT_CLEANUP @@ -257,7 +257,7 @@ AT_CHECK([bison input.y -o input.c], 1, [], [input.y contains 1 shift/reduce conflict. expected 0 shift/reduce conflicts ]) -AT_CLEANUP(input.c) +AT_CLEANUP ## --------------- ## @@ -276,7 +276,7 @@ exp: exp OP exp | NUM; AT_CHECK([bison input.y -o input.c], 0, [], [input.y contains 1 shift/reduce conflict. ]) -AT_CLEANUP(input.c) +AT_CLEANUP ## ------------------ ## @@ -296,7 +296,7 @@ AT_CHECK([bison input.y -o input.c], 1, [], [input.y contains 1 shift/reduce conflict. expected 2 shift/reduce conflicts ]) -AT_CLEANUP(input.c) +AT_CLEANUP ## ---------------------- ## @@ -318,7 +318,7 @@ exp: ; AT_CHECK([bison -v input.y -o input.c], 0, ignore, ignore) -AT_CLEANUP([input.*]) +AT_CLEANUP @@ -341,7 +341,7 @@ exp: {}; AT_CHECK([bison --defines union.y]) -AT_CLEANUP([union.*]) +AT_CLEANUP ## --------------------------------------- ## @@ -364,7 +364,7 @@ exp: {}; AT_CHECK([bison union-comment.y]) AT_CHECK([fgrep '//*' union-comment.tab.c], [1], []) -AT_CLEANUP([union-comment.*]) +AT_CLEANUP ## ----------------- ## @@ -416,11 +416,9 @@ AT_CLEANUP m4_define([AT_TEST_CPP_GUARD_H], [AT_SETUP([Invalid CPP guards: $1]) -# possibly create and nuke inner directories. -m4_bmatch([$1], [[/]], -[dirname=`AS_DIRNAME([$1])` +# Possibly create inner directories. +dirname=`AS_DIRNAME([$1])` AS_MKDIR_P([$dirname]) -AT_CLEANUP_FILES([$dirname])]) AT_DATA([$1.y], [%% @@ -432,7 +430,7 @@ AT_CHECK([bison --defines=$1.h $1.y]) # CPP should be happy with it. AT_CHECK([$CC -E $1.h], 0, [ignore]) -AT_CLEANUP($1.*) +AT_CLEANUP ]) AT_TEST_CPP_GUARD_H([input/input]) diff --git a/tests/testsuite.at b/tests/testsuite.at index c692bfb9..e1a49e17 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -19,7 +19,7 @@ # 02111-1307, USA. # We need a recent Autotest. -m4_version_prereq([2.52e]) +m4_version_prereq([2.52g]) AT_INIT diff --git a/tests/torture.at b/tests/torture.at index c9fe8375..116ae40f 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -73,7 +73,6 @@ main (int argc, const char **argv) ]]) AT_CHECK([bison input.y -o input.c]) AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore]) -AT_CLEANUP_FILES(input input.c) ]) -- 2.45.2