This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: LD testsuite breaks with too many '-v' in RUNTESTFLAGS.
- From: Nick Clifton <nickc at redhat dot com>
- To: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 10 Mar 2009 16:20:55 +0000
- Subject: Re: LD testsuite breaks with too many '-v' in RUNTESTFLAGS.
- References: <49ADF8A1.1050600@gmail.com>
Hi Dave,
As you can see, it for some reason can't access the $dumpfile variable
within the scope of the eval. I don't speak tcl good, so I thought I'd see if
anyone here can suggest a way to fix the syntax of the command so that it
works before proposing a patch to delete the line altogether; anyone got a
suggestion?
I am not much of a tcl expert either, but I think that the following
patch will take care of the problem - would you care to try it out ?
Cheers
Nick
Index: ld/testsuite/lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.59
diff -c -3 -p -r1.59 ld-lib.exp
*** ld/testsuite/lib/ld-lib.exp 6 Feb 2009 16:56:12 -0000 1.59
--- ld/testsuite/lib/ld-lib.exp 10 Mar 2009 16:18:50 -0000
*************** proc run_dump_test { name } {
*** 629,635 ****
global OBJDUMP NM AS OBJCOPY READELF LD
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS LDFLAGS
global host_triplet runtests
! global env
if [string match "*/*" $name] {
set file $name
--- 629,635 ----
global OBJDUMP NM AS OBJCOPY READELF LD
global OBJDUMPFLAGS NMFLAGS ASFLAGS OBJCOPYFLAGS READELFFLAGS LDFLAGS
global host_triplet runtests
! global env verbose
if [string match "*/*" $name] {
set file $name
*************** proc run_dump_test { name } {
*** 946,955 ****
return
}
! verbose_eval {[file_contents $dumpfile]} 3
if { [regexp_diff $dumpfile "${file}.d"] } then {
fail $testname
! verbose "output is [file_contents $dumpfile]" 2
return
}
--- 946,955 ----
return
}
! if { $verbose > 2 } then { verbose "output is [file_contents $dumpfile]" 3 }
if { [regexp_diff $dumpfile "${file}.d"] } then {
fail $testname
! if { $verbose == 2 } then { verbose "output is [file_contents $dumpfile]" 2 }
return
}
*************** proc run_ld_link_tests { ldtests } {
*** 1274,1285 ****
}
}
-
- proc verbose_eval { expr { level 1 } } {
- global verbose
- if $verbose>$level then { eval verbose "$expr" $level }
- }
-
# This definition is taken from an unreleased version of DejaGnu. Once
# that version gets released, and has been out in the world for a few
# months at least, it may be safe to delete this copy.
--- 1274,1279 ----