Patch: testsuite fixes

Tom Tromey tromey@cygnus.com
Tue Mar 7 14:41:00 GMT 2000


I'm checking in this patch, which has a couple testsuite fixes.
One fix is to remove an ancient workaround for a bug in jv-scan which
was quashed long ago.  The other fix lets the testsuite continue to
work even when jv-scan reports a parse error.

2000-03-07  Tom Tromey  <tromey@cygnus.com>

	* lib/libjava.exp (test_libjava_from_javac): Removed hack for
	interfaces.  Fail if jv-scan reports a parse error.

Tom

Index: lib/libjava.exp
===================================================================
RCS file: /cvs/java/libgcj/libjava/testsuite/lib/libjava.exp,v
retrieving revision 1.14
diff -u -r1.14 libjava.exp
--- libjava.exp	2000/03/07 19:55:28	1.14
+++ libjava.exp	2000/03/07 22:39:14
@@ -495,20 +495,27 @@
 		     [target_compile $srcfile "" none \
 			"compiler=$jvscan additional_flags=--list-class"]]
     verbose "class list is $class_out"
-    # FIXME: As of Wed Feb 24 1999, `jv-scan --list-class' prints
-    # nothing if the file contains an interface and not a class.  I
-    # believe this is a jv-scan bug.
-    if {$class_out == ""} then {
-	set class_files \
-	  [list $objdir/[file rootname [file tail $srcfile]].class]
-    } else {
-	# Turn "a b" into "a.class b.class".
-	# Also, turn "foo.bar" into "foo/bar.class".
-	set class_files {}
-        foreach file [split [string trim $class_out]] {
-	    set file [join [split $file .] /]
-	    lappend class_files $objdir/$file.class
+
+    if {[string match "*parse error*" $main_name]
+	|| [string match "*parse error*" $class_out]} {
+	# Do the remaining fails.
+	setup_xfail "*-*-*"
+	fail "$errname compilation from bytecode"
+	if {! [info exists opts(no-exec)]} {
+	    setup_xfail "*-*-*"
+	    fail "$errname execution from bytecode->native test"
+	    setup_xfail "*-*-*"
+	    fail "$errname output from bytecode->native test"
 	}
+	return
+    }
+
+    # Turn "a b" into "a.class b.class".
+    # Also, turn "foo.bar" into "foo/bar.class".
+    set class_files {}
+    foreach file [split [string trim $class_out]] {
+	set file [join [split $file .] /]
+	lappend class_files $objdir/$file.class
     }
 
     # Usually it is an error for a test program not to have a `main'


More information about the Java-patches mailing list