libjava.exp (test_libjava_from_javac): Removed hack for interfaces.
authorTom Tromey <tromey@cygnus.com>
Tue, 7 Mar 2000 22:44:22 +0000 (22:44 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Tue, 7 Mar 2000 22:44:22 +0000 (22:44 +0000)
* lib/libjava.exp (test_libjava_from_javac): Removed hack for
interfaces.  Fail if jv-scan reports a parse error.

From-SVN: r32392

libjava/testsuite/ChangeLog
libjava/testsuite/lib/libjava.exp

index a3082b867a6de555d57530f217dcc703bae74f0f..fbf93e66d5f11a0e126e0d596730f314106956cd 100644 (file)
@@ -1,5 +1,8 @@
 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.
+
        Test for PR gcj/162:
        * libjava.lang/PR162.out: New file.
        * libjava.lang/PR162.java: New file.
index 8f047ae359a3e8ff193383448a4474d90362d823..c561a3a7d70b3c42cf23bb4e5aa3ba0a09c90c5a 100644 (file)
@@ -495,20 +495,27 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
                     [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'