bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNU Bison 2.4.2] testsuite: Failing tests of bison 2.4.2 on Solaris


From: Akim Demaille
Subject: Re: [GNU Bison 2.4.2] testsuite: Failing tests of bison 2.4.2 on Solaris 8+9 w/Sun Studio 11+12
Date: Wed, 14 Apr 2010 16:47:11 +0200

Le 31 mars 2010 à 18:55, Joel E. Denny a écrit :

> On Tue, 30 Mar 2010, tys lefering wrote:
> 
>> /home/twlevo/etc/bisongit/bisontestcompile/bison-2.4.2.3-cf80e/tests/testsuite.dir/at-groups/81/stdout
>>        2010-03-30
>> 21:27:40.000000000 +0200
>> @@ -1,2 +1,3 @@
>> +input.y: In function 'yyparse':
>> input.y:8: #error "8"
>> 
>> 81. synclines.at:144: 81. Action synch line (synclines.at:144): FAILED
>> (synclines.at:144)
> 
> Thanks for the report.  Please try the patch below and let us know if it 
> fixes it.
> 
> diff --git a/tests/synclines.at b/tests/synclines.at
> index 08b33c5..a975433 100644
> --- a/tests/synclines.at
> +++ b/tests/synclines.at
> @@ -71,7 +71,9 @@ AT_CHECK([[test "`cat stdout`" = 'syncline.c:1: @%:@error 
> "1"' || exit 77]])
> AT_DATA([[input.y]], [$2])
> AT_BISON_CHECK([-o input.c input.y])
> AT_SYNCLINES_COMPILE([input.c])
> -AT_CHECK([cat stdout], 0, [$3])
> +# GCC 4.5 tells you the function within which #error appears, but
> +# previous versions of gcc do not.
> +AT_CHECK([grep -v ': In function ' stdout], 0, [$3])
> AT_CLEANUP
> ])

Actually this change is not at the right place.  We have two macros to deal 
with synclines: one is in charge of compiling and neutralizing the variations 
(AT_SYNCLINES_COMPILE), and one is in charge of the test per-se.  The latter 
calls the former twice: once to check that the compiler's output is 
"understandable" (otherwise we skip), and the second to perform the actual 
check.

The GCC 4.5 handling was already taken care of in master, but neither in 2.4.3 
nor 2.5.  So I plan to remove the above change from the three of them, but to 
install in 2.4.3, 2.5, and master, the following version of 
AT_SYNCLINES_COMPILE.

Is that ok for everyone?

# AT_SYNCLINES_COMPILE(FILE)
# --------------------------
# Compile FILE expecting an error, and save in the file stdout the
# normalized output.  Ignore the exit status, since some compilers
# (e.g. c89 on IRIX 6.5) triger warnings on `#error', instead of
# errors.
m4_define([AT_SYNCLINES_COMPILE],
[AT_CHECK([$CC $CFLAGS $CPPFLAGS -c $1], [ignore], [], [stderr])
# In case GCC displays column information, strip it down.
#
#   input.y:4:2: #error "4"    or
#   input.y:4.2: #error "4"    or
#   input.y:4:2: error: #error "4"
# =>
#   input.y:4: #error "4"
#
# It may also issue more context information:
#
#   input.y: In function 'yyparse':
#   input.y:8: #error "8"
# =>
#   input.y:4: #error "8"
#
#
# And possibly distcc adds its bits.
#
#   distcc[33187] ERROR: compile (null) on localhost failed
#   syncline.c:1:2: error: #error "1"
#   distcc[33185] ERROR: compile syncline.c on localhost failed
#
# or even
#
#   distcc[35882] (dcc_connect_by_name) ERROR: failed to look up host 
"chrisimac": Unknown host
#   distcc[35882] Warning: failed to distribute input.c to chrisimac/4, running 
locally instead

AT_CHECK([[sed -e '/^distcc\[[0-9]*\] /d'                            \
               -e 's/^\([^:]*:[^:.]*\)[.:][^:]*:\(.*\)$/\1:\2/'      \
               -e 's/^\([^:]*:[^:]*:\)address@hidden:@]*\( @%:@error\)/\1\2/'  \
               -e "/^[^:]*: In function '[^\']*':$/d"                \
            stderr]],
         0, [stdout])
])





reply via email to

[Prev in Thread] Current Thread [Next in Thread]