+2001-11-14 Akim Demaille <akim@epita.fr>
+
+ * 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 <akim@epita.fr>
* src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
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
GCC='@GCC@'
# We need `config.h'.
-CPPFLAGS="-I $top_builddir @CPPFLAGS@"
+CPPFLAGS="-I $top_buildpath @CPPFLAGS@"
# 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],
[2.0:2.1],
[unexpected `'+''])
-AT_CLEANUP(calc calc.c calc.h calc.output)
+AT_CLEANUP
])# AT_CHECK_CALC
AT_CHECK([bison $3 $1], 0)
AT_CHECK([ls $4], [], [ignore])
-AT_CLEANUP($4)
+AT_CLEANUP
])
AT_CHECK_OUTPUT([foo.y], [], [-dv],
AT_CHECK([bison -v duplicate.y -o duplicate.c], 0, ignore, ignore)
-AT_CLEANUP([duplicate.*])
+AT_CLEANUP
## ------------------------- ##
$default accept
]])
-AT_CLEANUP(input.c input.output)
+AT_CLEANUP
## --------------------- ##
$default accept
]])
-AT_CLEANUP(input.c input.output)
+AT_CLEANUP
[input.y contains 1 shift/reduce conflict.
expected 0 shift/reduce conflicts
])
-AT_CLEANUP(input.c)
+AT_CLEANUP
## --------------- ##
AT_CHECK([bison input.y -o input.c], 0, [],
[input.y contains 1 shift/reduce conflict.
])
-AT_CLEANUP(input.c)
+AT_CLEANUP
## ------------------ ##
[input.y contains 1 shift/reduce conflict.
expected 2 shift/reduce conflicts
])
-AT_CLEANUP(input.c)
+AT_CLEANUP
## ---------------------- ##
AT_CHECK([bison -v input.y -o input.c], 0, ignore, ignore)
-AT_CLEANUP([input.*])
+AT_CLEANUP
AT_CHECK([bison --defines union.y])
-AT_CLEANUP([union.*])
+AT_CLEANUP
## --------------------------------------- ##
AT_CHECK([bison union-comment.y])
AT_CHECK([fgrep '//*' union-comment.tab.c], [1], [])
-AT_CLEANUP([union-comment.*])
+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],
[%%
# 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])
# 02111-1307, USA.
# We need a recent Autotest.
-m4_version_prereq([2.52e])
+m4_version_prereq([2.52g])
AT_INIT
]])
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)
])