This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[ecj] Patch: FYI: two test suite fixes
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 22 Dec 2006 04:59:58 -0700
- Subject: [ecj] Patch: FYI: two test suite fixes
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcj-eclipse-merge-branch.
This eliminates a couple problems with the test suite.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* testsuite/libjava.jni/register2.c: Include jni.h, not
register2.h.
* testsuite/libjava.cni/cni.exp (gcj_cni_build_headers):
Special-case shortfield.
Index: testsuite/libjava.cni/cni.exp
===================================================================
--- testsuite/libjava.cni/cni.exp (revision 120082)
+++ testsuite/libjava.cni/cni.exp (working copy)
@@ -33,18 +33,25 @@
set gcjh [find_gcjh]
# 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.
+ # .java file, and then others on an ad hoc basis.
+ set list {}
set main [file rootname [file tail $file]]
+ lappend list $main
+ # ... for instance, an obvious hack.
+ if {$main == "shortfield"} {
+ lappend list shortfieldbase
+ }
- set cmd "$gcjh -cni -force -classpath .:$libgcj_jar $main"
- verbose $cmd
- set x [string trim [libjava_prune_warnings \
- [lindex [local_exec $cmd "" "" 300] 1]]]
- if {$x != ""} {
- verbose "local_exec failed: $x" 2
- fail "$main header generation"
- return 0
+ foreach file $list {
+ set cmd "$gcjh -cni -force -classpath .:$libgcj_jar $file"
+ verbose $cmd
+ set x [string trim [libjava_prune_warnings \
+ [lindex [local_exec $cmd "" "" 300] 1]]]
+ if {$x != ""} {
+ verbose "local_exec failed: $x" 2
+ fail "$main header generation"
+ return 0
+ }
}
pass "$main header generation"
Index: testsuite/libjava.jni/register2.c
===================================================================
--- testsuite/libjava.jni/register2.c (revision 120082)
+++ testsuite/libjava.jni/register2.c (working copy)
@@ -1,6 +1,6 @@
#include <stdlib.h>
#include <assert.h>
-#include <register2.h>
+#include <jni.h>
static int
twentythree (JNIEnv *env, jclass k)