diff options
Diffstat (limited to 'gdb/testsuite/lib/java.exp')
-rw-r--r-- | gdb/testsuite/lib/java.exp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/gdb/testsuite/lib/java.exp b/gdb/testsuite/lib/java.exp index c445f98..7916772 100644 --- a/gdb/testsuite/lib/java.exp +++ b/gdb/testsuite/lib/java.exp @@ -91,19 +91,31 @@ proc java_init { args } { # proc compile_java_from_source { srcfile binfile compile_args } { global GCJ_UNDER_TEST + global runtests global java_initialized if { $java_initialized != 1 } { java_init } + set errname [file rootname [file tail $srcfile]] + if {! [runtest_file_p $runtests $errname]} { + return + } + set args "compiler=$GCJ_UNDER_TEST" lappend args "additional_flags=--main=[file rootname [file tail $srcfile]]" if { $compile_args != "" } { lappend args "additional_flags=$compile_args" } - set result [target_compile $srcfile ${binfile} ${binfile} executable $args] - gdb_compile_test $srcfile $result - return $result + if { $compile_args != "" } { + set errname "$errname $compile_args" + } + + set x [target_compile $srcfile ${binfile} executable $args] + if { $x != "" } { + verbose "target_compile failed: $x" 2 + return "$errname compilation from source"; + } } # Local Variables: |