revert 2007-01-11 Nathan Sidwell <nathan@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / java.exp
index c445f9824efd429d4004f912dff45256b3aa5e93..7916772e0be3de2714687f010d2c4da34a1b0131 100644 (file)
@@ -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:
This page took 0.039585 seconds and 4 git commands to generate.