This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ecj] Patch: FYI: update test suite for jv-scan removal


I'm checking this in on the gcj-eclipse-merge-branch.

Another use of jv-scan crept in via the mainline merge.  This updates
the test suite to remove it.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>
	* testsuite/libjava.jvmti/jvmti.exp (gcj_jvmti_build_headers):
	Don't use jv-scan.

Index: testsuite/libjava.jvmti/jvmti.exp
===================================================================
--- testsuite/libjava.jvmti/jvmti.exp	(revision 120009)
+++ testsuite/libjava.jvmti/jvmti.exp	(working copy)
@@ -31,27 +31,23 @@
 
 # Build header files given name of .java file.  Return 0 on failure.
 proc gcj_jvmti_build_headers {file} {
+  global libgcj_jar
+
   set gcjh [find_gcjh]
-  set jvscan [find_jvscan]
 
-  set class_out [string trim \
-		   [libjava_prune_warnings \
-		      [lindex [local_exec "$jvscan --encoding=UTF-8 $file --list-class" "" "" 300] 1]]]
-  if {[string match "*parse error*" $class_out]} {
+  # Currently we only build a header file for the main class from the
+  # .java file.  If we need more than this, we'll have to figure
+  # something out.
+  set file [file rootname [file tail $file]]
+
+  set x [string trim [libjava_prune_warnings \
+			[lindex [local_exec "$gcjh -cni -force -classpath .:$libgcj_jar $file" "" "" 300] 1]]]
+  if {$x != ""} {
+    verbose "local_exec failed: $x" 2
     fail "$file header generation"
     return 0
   }
 
-  foreach file [split $class_out] {
-    set x [string trim [libjava_prune_warnings \
-			  [lindex [local_exec "$gcjh $file" "" "" 300] 1]]]
-    if {$x != ""} {
-      verbose "local_exec failed: $x" 2
-      fail "$file header generation"
-      return 0
-    }
-  }
-
   pass "$file header generation"
   return 1
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]