diff options
Diffstat (limited to 'libjava/testsuite/lib/libjava.exp')
-rw-r--r-- | libjava/testsuite/lib/libjava.exp | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp index a807c4c8d60..6be5ec67662 100644 --- a/libjava/testsuite/lib/libjava.exp +++ b/libjava/testsuite/lib/libjava.exp @@ -1,4 +1,4 @@ -# Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation +# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation load_lib "libgloss.exp" @@ -18,9 +18,15 @@ proc libjava_prune_warnings {text} { set len [llength $tlist] for {set i [expr {$len - 1}]} {$i >= 2} {incr i -1} { if {[string match "*unreachable bytecode*" [lindex $tlist $i]]} { - # Delete this line and the previous two lines. - set tlist [lreplace $tlist [expr {$i - 2}] $i] - incr i -2 + # Delete this line, all other unreachable warnings and the previous + # two lines containing the method and class. + set j [expr {$i - 1}] + while {[string match "*unreachable bytecode*" [lindex $tlist $j]]} { + incr j -1 + } + incr j -1 + set tlist [lreplace $tlist $j $i] + set i $j } } return [join $tlist \n] @@ -74,7 +80,7 @@ proc find_gcjh {} { } proc find_javac {} { - global SUN_JAVAC GCJ_UNDER_TEST env + global SUN_JAVAC GCJ_UNDER_TEST env libgcj_jar # If JDK doesn't run on your platform but some other # JDK-compatible javac does, you may set SUN_JAVAC to point to it. # One of the most important properties of a SUN_JAVAC is that it @@ -87,7 +93,7 @@ proc find_javac {} { if {[info exists env(SUN_JAVAC)]} { set SUN_JAVAC $env(SUN_JAVAC) } else { - set SUN_JAVAC "$GCJ_UNDER_TEST -C" + set SUN_JAVAC "$GCJ_UNDER_TEST -C -I$libgcj_jar" } } return $SUN_JAVAC @@ -781,8 +787,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e if {$mode == "compile"} { foreach c_file $class_files { set executable [file rootname [file tail $c_file]].o + # Don't write files which contain $ chars. + regsub -all "\\$" $executable "\^" executable set x [libjava_prune_warnings \ - [libjava_tcompile $c_file "$executable" $type $args]] + [libjava_tcompile '$c_file' "$executable" $type $args]] lappend removeList $executable if {$x != ""} { break |