On Sunday, March 27, 2005, at 11:58 AM, Per Bothner wrote:
If you run 'make check' after --enable-mapped-location (even
just --enable-languages=c) you'll find some apparant regressions.
They aren't real regressions - it's just now we now get column numbers
in some of the diagnostic messages, and this confuses dejagnu.

Now I'm willing to fix those tests by adding -fno-show-column where
necessary, and this fixes those testcases.  However, that obviously
is a kludge.  The Right Thing to do is to fix dejagnu so it doesn't get
confused by column numbers.  I'm guessing this is a one- or two-line
fix, but I don't know dejagnu, I've forgotten most of what little I
used to know about tcl, and I don't know where to start.  I'm asking
for someone who will know the Right Thing, and who will do.

Anyone out there?

See dejagnu, lib/dg.exp:

# Line number format. This is how line numbers appear in program output.
set dg-linenum-format ":%d:"


and all the consumers of this...

You might be able to do something line:

        set dg-linenum-format "\[-0-9\]:%d:"

or
        set dg-linenum-format ":%d:\[-0-9\]+:"

and get kinda close. Of course, this may be repeated in multiple places. The second form would only be if error messages were unconditionally in column number form.

Another approach would be to canonicalize the output just before set comp_output [lindex $results 0], and s/:\([0-9]+\):[0-9]+:/:\1:' it to remove the column number. To do this, you can experiment with tclsh and regsub in the small, until it works, and then plug it in and try it.



Reply via email to