From 97b8365cafc3a344a22d3980b8ed885f5c6d8357 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 9 Jan 2007 19:58:05 +0000 Subject: Merged gcj-eclipse branch to trunk. From-SVN: r120621 --- libjava/testsuite/libjava.jni/PR15133.h | 19 ++++++ libjava/testsuite/libjava.jni/PR15133.jar | Bin 0 -> 674 bytes libjava/testsuite/libjava.jni/PR18116.h | 19 ++++++ libjava/testsuite/libjava.jni/PR18116.jar | Bin 0 -> 740 bytes libjava/testsuite/libjava.jni/PR28178.h | 19 ++++++ libjava/testsuite/libjava.jni/PR28178.jar | Bin 0 -> 662 bytes libjava/testsuite/libjava.jni/bytebuffer.h | 25 ++++++++ libjava/testsuite/libjava.jni/bytebuffer.jar | Bin 0 -> 1150 bytes libjava/testsuite/libjava.jni/calls.h | 19 ++++++ libjava/testsuite/libjava.jni/calls.jar | Bin 0 -> 1283 bytes libjava/testsuite/libjava.jni/cxxtest.h | 19 ++++++ libjava/testsuite/libjava.jni/cxxtest.jar | Bin 0 -> 818 bytes libjava/testsuite/libjava.jni/directbuffer.h | 26 ++++++++ libjava/testsuite/libjava.jni/directbuffer.jar | Bin 0 -> 1067 bytes libjava/testsuite/libjava.jni/field.h | 19 ++++++ libjava/testsuite/libjava.jni/field.jar | Bin 0 -> 810 bytes libjava/testsuite/libjava.jni/final_method.h | 19 ++++++ libjava/testsuite/libjava.jni/final_method.jar | Bin 0 -> 751 bytes libjava/testsuite/libjava.jni/findclass.h | 19 ++++++ libjava/testsuite/libjava.jni/findclass.jar | Bin 0 -> 809 bytes libjava/testsuite/libjava.jni/iface.h | 19 ++++++ libjava/testsuite/libjava.jni/iface.jar | Bin 0 -> 991 bytes .../testsuite/libjava.jni/invocation/PR16923.jar | Bin 0 -> 673 bytes libjava/testsuite/libjava.jni/invoke.h | 19 ++++++ libjava/testsuite/libjava.jni/invoke.jar | Bin 0 -> 762 bytes libjava/testsuite/libjava.jni/jni.exp | 66 ++++++++++++--------- libjava/testsuite/libjava.jni/jniutf.h | 19 ++++++ libjava/testsuite/libjava.jni/jniutf.jar | Bin 0 -> 788 bytes libjava/testsuite/libjava.jni/martin.h | 19 ++++++ libjava/testsuite/libjava.jni/martin.jar | Bin 0 -> 934 bytes libjava/testsuite/libjava.jni/noclass.h | 19 ++++++ libjava/testsuite/libjava.jni/noclass.jar | Bin 0 -> 755 bytes libjava/testsuite/libjava.jni/overload.h | 20 +++++++ libjava/testsuite/libjava.jni/overload.jar | Bin 0 -> 749 bytes libjava/testsuite/libjava.jni/pr11951.h | 19 ++++++ libjava/testsuite/libjava.jni/pr11951.jar | Bin 0 -> 715 bytes libjava/testsuite/libjava.jni/pr18278.h | 19 ++++++ libjava/testsuite/libjava.jni/pr18278.jar | Bin 0 -> 763 bytes libjava/testsuite/libjava.jni/pr23739.h | 19 ++++++ libjava/testsuite/libjava.jni/pr23739.jar | Bin 0 -> 1319 bytes libjava/testsuite/libjava.jni/register.h | 19 ++++++ libjava/testsuite/libjava.jni/register.jar | Bin 0 -> 724 bytes libjava/testsuite/libjava.jni/register2.c | 2 +- libjava/testsuite/libjava.jni/register2.jar | Bin 0 -> 1445 bytes libjava/testsuite/libjava.jni/simple_int.h | 19 ++++++ libjava/testsuite/libjava.jni/simple_int.jar | Bin 0 -> 730 bytes libjava/testsuite/libjava.jni/throwit.h | 19 ++++++ libjava/testsuite/libjava.jni/throwit.jar | Bin 0 -> 864 bytes libjava/testsuite/libjava.jni/virtual.h | 19 ++++++ libjava/testsuite/libjava.jni/virtual.jar | Bin 0 -> 747 bytes 50 files changed, 491 insertions(+), 28 deletions(-) create mode 100644 libjava/testsuite/libjava.jni/PR15133.h create mode 100644 libjava/testsuite/libjava.jni/PR15133.jar create mode 100644 libjava/testsuite/libjava.jni/PR18116.h create mode 100644 libjava/testsuite/libjava.jni/PR18116.jar create mode 100644 libjava/testsuite/libjava.jni/PR28178.h create mode 100644 libjava/testsuite/libjava.jni/PR28178.jar create mode 100644 libjava/testsuite/libjava.jni/bytebuffer.h create mode 100644 libjava/testsuite/libjava.jni/bytebuffer.jar create mode 100644 libjava/testsuite/libjava.jni/calls.h create mode 100644 libjava/testsuite/libjava.jni/calls.jar create mode 100644 libjava/testsuite/libjava.jni/cxxtest.h create mode 100644 libjava/testsuite/libjava.jni/cxxtest.jar create mode 100644 libjava/testsuite/libjava.jni/directbuffer.h create mode 100644 libjava/testsuite/libjava.jni/directbuffer.jar create mode 100644 libjava/testsuite/libjava.jni/field.h create mode 100644 libjava/testsuite/libjava.jni/field.jar create mode 100644 libjava/testsuite/libjava.jni/final_method.h create mode 100644 libjava/testsuite/libjava.jni/final_method.jar create mode 100644 libjava/testsuite/libjava.jni/findclass.h create mode 100644 libjava/testsuite/libjava.jni/findclass.jar create mode 100644 libjava/testsuite/libjava.jni/iface.h create mode 100644 libjava/testsuite/libjava.jni/iface.jar create mode 100644 libjava/testsuite/libjava.jni/invocation/PR16923.jar create mode 100644 libjava/testsuite/libjava.jni/invoke.h create mode 100644 libjava/testsuite/libjava.jni/invoke.jar create mode 100644 libjava/testsuite/libjava.jni/jniutf.h create mode 100644 libjava/testsuite/libjava.jni/jniutf.jar create mode 100644 libjava/testsuite/libjava.jni/martin.h create mode 100644 libjava/testsuite/libjava.jni/martin.jar create mode 100644 libjava/testsuite/libjava.jni/noclass.h create mode 100644 libjava/testsuite/libjava.jni/noclass.jar create mode 100644 libjava/testsuite/libjava.jni/overload.h create mode 100644 libjava/testsuite/libjava.jni/overload.jar create mode 100644 libjava/testsuite/libjava.jni/pr11951.h create mode 100644 libjava/testsuite/libjava.jni/pr11951.jar create mode 100644 libjava/testsuite/libjava.jni/pr18278.h create mode 100644 libjava/testsuite/libjava.jni/pr18278.jar create mode 100644 libjava/testsuite/libjava.jni/pr23739.h create mode 100644 libjava/testsuite/libjava.jni/pr23739.jar create mode 100644 libjava/testsuite/libjava.jni/register.h create mode 100644 libjava/testsuite/libjava.jni/register.jar create mode 100644 libjava/testsuite/libjava.jni/register2.jar create mode 100644 libjava/testsuite/libjava.jni/simple_int.h create mode 100644 libjava/testsuite/libjava.jni/simple_int.jar create mode 100644 libjava/testsuite/libjava.jni/throwit.h create mode 100644 libjava/testsuite/libjava.jni/throwit.jar create mode 100644 libjava/testsuite/libjava.jni/virtual.h create mode 100644 libjava/testsuite/libjava.jni/virtual.jar (limited to 'libjava/testsuite/libjava.jni') diff --git a/libjava/testsuite/libjava.jni/PR15133.h b/libjava/testsuite/libjava.jni/PR15133.h new file mode 100644 index 0000000..af9f8f8 --- /dev/null +++ b/libjava/testsuite/libjava.jni/PR15133.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __PR15133__ +#define __PR15133__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_PR15133_printIt (JNIEnv *env, jobject, jint); + +#ifdef __cplusplus +} +#endif + +#endif /* __PR15133__ */ diff --git a/libjava/testsuite/libjava.jni/PR15133.jar b/libjava/testsuite/libjava.jni/PR15133.jar new file mode 100644 index 0000000..ad76705 Binary files /dev/null and b/libjava/testsuite/libjava.jni/PR15133.jar differ diff --git a/libjava/testsuite/libjava.jni/PR18116.h b/libjava/testsuite/libjava.jni/PR18116.h new file mode 100644 index 0000000..56fc648 --- /dev/null +++ b/libjava/testsuite/libjava.jni/PR18116.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __PR18116__ +#define __PR18116__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jint JNICALL Java_PR18116_doit (JNIEnv *env, jclass, jstring); + +#ifdef __cplusplus +} +#endif + +#endif /* __PR18116__ */ diff --git a/libjava/testsuite/libjava.jni/PR18116.jar b/libjava/testsuite/libjava.jni/PR18116.jar new file mode 100644 index 0000000..b9a0034 Binary files /dev/null and b/libjava/testsuite/libjava.jni/PR18116.jar differ diff --git a/libjava/testsuite/libjava.jni/PR28178.h b/libjava/testsuite/libjava.jni/PR28178.h new file mode 100644 index 0000000..e686439 --- /dev/null +++ b/libjava/testsuite/libjava.jni/PR28178.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __PR28178__ +#define __PR28178__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_PR28178_m (JNIEnv *env, jclass); + +#ifdef __cplusplus +} +#endif + +#endif /* __PR28178__ */ diff --git a/libjava/testsuite/libjava.jni/PR28178.jar b/libjava/testsuite/libjava.jni/PR28178.jar new file mode 100644 index 0000000..0c9082b Binary files /dev/null and b/libjava/testsuite/libjava.jni/PR28178.jar differ diff --git a/libjava/testsuite/libjava.jni/bytebuffer.h b/libjava/testsuite/libjava.jni/bytebuffer.h new file mode 100644 index 0000000..33b5c3a --- /dev/null +++ b/libjava/testsuite/libjava.jni/bytebuffer.h @@ -0,0 +1,25 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __bytebuffer__ +#define __bytebuffer__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_bytebuffer_testByteBuffer (JNIEnv *env, jclass, jobject); +JNIEXPORT void JNICALL Java_bytebuffer_testCharBuffer (JNIEnv *env, jclass, jobject); +JNIEXPORT void JNICALL Java_bytebuffer_testDoubleBuffer (JNIEnv *env, jclass, jobject); +JNIEXPORT void JNICALL Java_bytebuffer_testFloatBuffer (JNIEnv *env, jclass, jobject); +JNIEXPORT void JNICALL Java_bytebuffer_testIntBuffer (JNIEnv *env, jclass, jobject); +JNIEXPORT void JNICALL Java_bytebuffer_testLongBuffer (JNIEnv *env, jclass, jobject); +JNIEXPORT void JNICALL Java_bytebuffer_testShortBuffer (JNIEnv *env, jclass, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __bytebuffer__ */ diff --git a/libjava/testsuite/libjava.jni/bytebuffer.jar b/libjava/testsuite/libjava.jni/bytebuffer.jar new file mode 100644 index 0000000..d0ca6d7 Binary files /dev/null and b/libjava/testsuite/libjava.jni/bytebuffer.jar differ diff --git a/libjava/testsuite/libjava.jni/calls.h b/libjava/testsuite/libjava.jni/calls.h new file mode 100644 index 0000000..64b9670 --- /dev/null +++ b/libjava/testsuite/libjava.jni/calls.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __calls__ +#define __calls__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jint JNICALL Java_calls_docall (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __calls__ */ diff --git a/libjava/testsuite/libjava.jni/calls.jar b/libjava/testsuite/libjava.jni/calls.jar new file mode 100644 index 0000000..3a188ea Binary files /dev/null and b/libjava/testsuite/libjava.jni/calls.jar differ diff --git a/libjava/testsuite/libjava.jni/cxxtest.h b/libjava/testsuite/libjava.jni/cxxtest.h new file mode 100644 index 0000000..d903636 --- /dev/null +++ b/libjava/testsuite/libjava.jni/cxxtest.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __cxxtest__ +#define __cxxtest__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jobjectArray JNICALL Java_cxxtest_fetch (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __cxxtest__ */ diff --git a/libjava/testsuite/libjava.jni/cxxtest.jar b/libjava/testsuite/libjava.jni/cxxtest.jar new file mode 100644 index 0000000..5a9a0d7 Binary files /dev/null and b/libjava/testsuite/libjava.jni/cxxtest.jar differ diff --git a/libjava/testsuite/libjava.jni/directbuffer.h b/libjava/testsuite/libjava.jni/directbuffer.h new file mode 100644 index 0000000..6d5c652 --- /dev/null +++ b/libjava/testsuite/libjava.jni/directbuffer.h @@ -0,0 +1,26 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __directbuffer__ +#define __directbuffer__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jobject JNICALL Java_directbuffer_createDirectByteBuffer (JNIEnv *env, jclass); +JNIEXPORT void JNICALL Java_directbuffer_testDirectByteBuffer (JNIEnv *env, jclass, jobject, jint); +JNIEXPORT void JNICALL Java_directbuffer_testCharBuffer (JNIEnv *env, jclass, jobject, jint); +JNIEXPORT void JNICALL Java_directbuffer_testDoubleBuffer (JNIEnv *env, jclass, jobject, jint); +JNIEXPORT void JNICALL Java_directbuffer_testFloatBuffer (JNIEnv *env, jclass, jobject, jint); +JNIEXPORT void JNICALL Java_directbuffer_testIntBuffer (JNIEnv *env, jclass, jobject, jint); +JNIEXPORT void JNICALL Java_directbuffer_testLongBuffer (JNIEnv *env, jclass, jobject, jint); +JNIEXPORT void JNICALL Java_directbuffer_testShortBuffer (JNIEnv *env, jclass, jobject, jint); + +#ifdef __cplusplus +} +#endif + +#endif /* __directbuffer__ */ diff --git a/libjava/testsuite/libjava.jni/directbuffer.jar b/libjava/testsuite/libjava.jni/directbuffer.jar new file mode 100644 index 0000000..f1630da Binary files /dev/null and b/libjava/testsuite/libjava.jni/directbuffer.jar differ diff --git a/libjava/testsuite/libjava.jni/field.h b/libjava/testsuite/libjava.jni/field.h new file mode 100644 index 0000000..fd1597a --- /dev/null +++ b/libjava/testsuite/libjava.jni/field.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __field__ +#define __field__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jobjectArray JNICALL Java_field_fetch (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __field__ */ diff --git a/libjava/testsuite/libjava.jni/field.jar b/libjava/testsuite/libjava.jni/field.jar new file mode 100644 index 0000000..3f636e8 Binary files /dev/null and b/libjava/testsuite/libjava.jni/field.jar differ diff --git a/libjava/testsuite/libjava.jni/final_method.h b/libjava/testsuite/libjava.jni/final_method.h new file mode 100644 index 0000000..dbb8235 --- /dev/null +++ b/libjava/testsuite/libjava.jni/final_method.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __final_1method__ +#define __final_1method__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jstring JNICALL Java_final_1method_meth (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __final_1method__ */ diff --git a/libjava/testsuite/libjava.jni/final_method.jar b/libjava/testsuite/libjava.jni/final_method.jar new file mode 100644 index 0000000..a5f4b63 Binary files /dev/null and b/libjava/testsuite/libjava.jni/final_method.jar differ diff --git a/libjava/testsuite/libjava.jni/findclass.h b/libjava/testsuite/libjava.jni/findclass.h new file mode 100644 index 0000000..d0d301e --- /dev/null +++ b/libjava/testsuite/libjava.jni/findclass.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __findclass__ +#define __findclass__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jclass JNICALL Java_findclass_doit (JNIEnv *env, jclass, jstring); + +#ifdef __cplusplus +} +#endif + +#endif /* __findclass__ */ diff --git a/libjava/testsuite/libjava.jni/findclass.jar b/libjava/testsuite/libjava.jni/findclass.jar new file mode 100644 index 0000000..03fe860 Binary files /dev/null and b/libjava/testsuite/libjava.jni/findclass.jar differ diff --git a/libjava/testsuite/libjava.jni/iface.h b/libjava/testsuite/libjava.jni/iface.h new file mode 100644 index 0000000..58680dd --- /dev/null +++ b/libjava/testsuite/libjava.jni/iface.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __iface__ +#define __iface__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_iface_doCalls (JNIEnv *env, jobject, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __iface__ */ diff --git a/libjava/testsuite/libjava.jni/iface.jar b/libjava/testsuite/libjava.jni/iface.jar new file mode 100644 index 0000000..0a9a1af Binary files /dev/null and b/libjava/testsuite/libjava.jni/iface.jar differ diff --git a/libjava/testsuite/libjava.jni/invocation/PR16923.jar b/libjava/testsuite/libjava.jni/invocation/PR16923.jar new file mode 100644 index 0000000..a1a7b88 Binary files /dev/null and b/libjava/testsuite/libjava.jni/invocation/PR16923.jar differ diff --git a/libjava/testsuite/libjava.jni/invoke.h b/libjava/testsuite/libjava.jni/invoke.h new file mode 100644 index 0000000..553c598 --- /dev/null +++ b/libjava/testsuite/libjava.jni/invoke.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __invoke__ +#define __invoke__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jint JNICALL Java_invoke_val (JNIEnv *env, jclass); + +#ifdef __cplusplus +} +#endif + +#endif /* __invoke__ */ diff --git a/libjava/testsuite/libjava.jni/invoke.jar b/libjava/testsuite/libjava.jni/invoke.jar new file mode 100644 index 0000000..dd05797 Binary files /dev/null and b/libjava/testsuite/libjava.jni/invoke.jar differ diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp index 317c5ae..5fa6ede 100644 --- a/libjava/testsuite/libjava.jni/jni.exp +++ b/libjava/testsuite/libjava.jni/jni.exp @@ -4,7 +4,7 @@ # of options to pass to the compiler. Returns 0 on failure, 1 on # success. proc gcj_jni_compile_c_to_so {file {options {}}} { - global srcdir + global srcdir subdir global host_triplet verbose "options: $options" set options_cxx $options @@ -31,7 +31,7 @@ proc gcj_jni_compile_c_to_so {file {options {}}} { lappend options "additional_flags=${so_flag} -fPIC" # Find the generated header. - lappend options "additional_flags=-I. -I.." + lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir" # Ensure that the generated header has correct prototypes. set cfile [file rootname $file].c @@ -60,10 +60,16 @@ proc gcj_jni_compile_c_to_so {file {options {}}} { # Build a header file from a .class file. Return 0 on failure. proc gcj_jni_build_header {file} { + global libgcj_jar + set gcjh [find_gcjh] set file [file rootname $file] + + set cmd "$gcjh -jni -force -classpath .:$libgcj_jar $file" + verbose $cmd + set x [string trim [libjava_prune_warnings \ - [lindex [local_exec "$gcjh -jni $file" "" "" 300] 1]]] + [lindex [local_exec $cmd "" "" 300] 1]]] if {$x != ""} { verbose "local_exec failed: $x" 2 fail "$file header generation" @@ -100,19 +106,19 @@ proc gcj_jni_test_one {file} { return 1 } - if {! [bytecompile_file $file [pwd]]} { - fail "bytecompile $file" - # FIXME - should use `untested' on all remaining tests. - # But that is hard. - return 0 - } - pass "bytecompile $file" +# if {! [bytecompile_file $file [pwd]]} { +# fail "bytecompile $file" +# # FIXME - should use `untested' on all remaining tests. +# # But that is hard. +# return 0 +# } +# pass "bytecompile $file" - set bytefile [file rootname [file tail $file]].class - if {! [gcj_jni_build_header $bytefile]} { - # FIXME - return 0 - } +# set bytefile [file rootname [file tail $file]].class +# if {! [gcj_jni_build_header $bytefile]} { +# # FIXME +# return 0 +# } set cfile [file rootname $file].c set cxxflags "" @@ -180,7 +186,8 @@ proc gcj_jni_test_one {file} { # cxxldlibflags to libjava_invoke. if {$INTERPRETER == "yes" && $gij != ""} { libjava_invoke $errname "gij test" opts $gij \ - "" $resultfile $cxxldlibflags $main + "" $resultfile $cxxldlibflags \ + -classpath $file $main } # When we succeed we remove all our clutter. @@ -194,7 +201,7 @@ proc gcj_jni_test_one {file} { # options to pass to the compiler. Returns 0 on failure, 1 on # success. proc gcj_jni_invocation_compile_c_to_binary {file {options {}}} { - global srcdir + global srcdir subdir global host_triplet verbose "options: $options" set options_cxx $options @@ -208,7 +215,7 @@ proc gcj_jni_invocation_compile_c_to_binary {file {options {}}} { lappend options "additional_flags= -bind_at_load -multiply_defined suppress" } # Find the generated header. - lappend options "additional_flags=-I. -I.." + lappend options "additional_flags=-I. -I.. -I$srcdir/$subdir" # Find jni.h and jni_md.h. lappend options "additional_flags=-I$srcdir/../include -I$srcdir/../classpath/include" @@ -231,6 +238,7 @@ proc gcj_jni_invocation_compile_c_to_binary {file {options {}}} { # Do all the work for a single invocation API test. Return 0 on # failure. proc gcj_jni_invocation_test_one {file} { + global env global runtests global host_triplet global INTERPRETER @@ -242,13 +250,13 @@ proc gcj_jni_invocation_test_one {file} { return 1 } - if {! [bytecompile_file $file [pwd]]} { - fail "bytecompile $file" - # FIXME - should use `untested' on all remaining tests. - # But that is hard. - return 0 - } - pass "bytecompile $file" +# if {! [bytecompile_file $file [pwd]]} { +# fail "bytecompile $file" +# # FIXME - should use `untested' on all remaining tests. +# # But that is hard. +# return 0 +# } +# pass "bytecompile $file" set cfile [file rootname $file].c # Darwin needs -liconv linked, otherwise we get some unresolved. @@ -281,10 +289,14 @@ proc gcj_jni_invocation_test_one {file} { set resultfile [file rootname $file].out + set env(CLASSPATH) $file + verbose "CLASSPATH = $env(CLASSPATH)" if {! [gcj_invoke $main $resultfile ""]} { + unset env(CLASSPATH) # FIXME return 0 } + unset env(CLASSPATH) # We purposely ignore errors here; we still want to run the other # appropriate tests. @@ -304,14 +316,14 @@ proc gcj_jni_run {} { # For now we only test JNI on native builds. if {$build_triplet == $host_triplet} { - catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.java] } srcfiles + catch { lsort [glob -nocomplain ${srcdir}/${subdir}/*.jar] } srcfiles foreach x $srcfiles { gcj_jni_test_one $x } # Run JNI invocation API tests - catch { lsort [glob -nocomplain ${srcdir}/${subdir}/invocation/*.java] } srcfiles + catch { lsort [glob -nocomplain ${srcdir}/${subdir}/invocation/*.jar] } srcfiles foreach x $srcfiles { gcj_jni_invocation_test_one $x diff --git a/libjava/testsuite/libjava.jni/jniutf.h b/libjava/testsuite/libjava.jni/jniutf.h new file mode 100644 index 0000000..b58db2e --- /dev/null +++ b/libjava/testsuite/libjava.jni/jniutf.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __jniutf__ +#define __jniutf__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_jniutf_printString (JNIEnv *env, jobject, jstring); + +#ifdef __cplusplus +} +#endif + +#endif /* __jniutf__ */ diff --git a/libjava/testsuite/libjava.jni/jniutf.jar b/libjava/testsuite/libjava.jni/jniutf.jar new file mode 100644 index 0000000..764808c Binary files /dev/null and b/libjava/testsuite/libjava.jni/jniutf.jar differ diff --git a/libjava/testsuite/libjava.jni/martin.h b/libjava/testsuite/libjava.jni/martin.h new file mode 100644 index 0000000..73b6a06 --- /dev/null +++ b/libjava/testsuite/libjava.jni/martin.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __martin__ +#define __martin__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_martin_myNative (JNIEnv *env, jobject, jstring); + +#ifdef __cplusplus +} +#endif + +#endif /* __martin__ */ diff --git a/libjava/testsuite/libjava.jni/martin.jar b/libjava/testsuite/libjava.jni/martin.jar new file mode 100644 index 0000000..a0293a7 Binary files /dev/null and b/libjava/testsuite/libjava.jni/martin.jar differ diff --git a/libjava/testsuite/libjava.jni/noclass.h b/libjava/testsuite/libjava.jni/noclass.h new file mode 100644 index 0000000..67869a9 --- /dev/null +++ b/libjava/testsuite/libjava.jni/noclass.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __noclass__ +#define __noclass__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_noclass_find_1it (JNIEnv *env, jclass); + +#ifdef __cplusplus +} +#endif + +#endif /* __noclass__ */ diff --git a/libjava/testsuite/libjava.jni/noclass.jar b/libjava/testsuite/libjava.jni/noclass.jar new file mode 100644 index 0000000..969aa95 Binary files /dev/null and b/libjava/testsuite/libjava.jni/noclass.jar differ diff --git a/libjava/testsuite/libjava.jni/overload.h b/libjava/testsuite/libjava.jni/overload.h new file mode 100644 index 0000000..7b717cd --- /dev/null +++ b/libjava/testsuite/libjava.jni/overload.h @@ -0,0 +1,20 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __overload__ +#define __overload__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jint JNICALL Java_overload_over__I (JNIEnv *env, jclass, jint); +JNIEXPORT jint JNICALL Java_overload_over__II (JNIEnv *env, jclass, jint, jint); + +#ifdef __cplusplus +} +#endif + +#endif /* __overload__ */ diff --git a/libjava/testsuite/libjava.jni/overload.jar b/libjava/testsuite/libjava.jni/overload.jar new file mode 100644 index 0000000..430d3d6 Binary files /dev/null and b/libjava/testsuite/libjava.jni/overload.jar differ diff --git a/libjava/testsuite/libjava.jni/pr11951.h b/libjava/testsuite/libjava.jni/pr11951.h new file mode 100644 index 0000000..caeefdb --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr11951.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __pr11951__ +#define __pr11951__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_pr11951_nmethod (JNIEnv *env, jclass); + +#ifdef __cplusplus +} +#endif + +#endif /* __pr11951__ */ diff --git a/libjava/testsuite/libjava.jni/pr11951.jar b/libjava/testsuite/libjava.jni/pr11951.jar new file mode 100644 index 0000000..adea29f Binary files /dev/null and b/libjava/testsuite/libjava.jni/pr11951.jar differ diff --git a/libjava/testsuite/libjava.jni/pr18278.h b/libjava/testsuite/libjava.jni/pr18278.h new file mode 100644 index 0000000..4003fef --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr18278.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __pr18278__ +#define __pr18278__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jobject JNICALL Java_pr18278_weakRef (JNIEnv *env, jclass, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __pr18278__ */ diff --git a/libjava/testsuite/libjava.jni/pr18278.jar b/libjava/testsuite/libjava.jni/pr18278.jar new file mode 100644 index 0000000..c1bf148 Binary files /dev/null and b/libjava/testsuite/libjava.jni/pr18278.jar differ diff --git a/libjava/testsuite/libjava.jni/pr23739.h b/libjava/testsuite/libjava.jni/pr23739.h new file mode 100644 index 0000000..70f228c --- /dev/null +++ b/libjava/testsuite/libjava.jni/pr23739.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __pr23739__ +#define __pr23739__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_pr23739_checkOrder (JNIEnv *env, jclass, jclass, jclass); + +#ifdef __cplusplus +} +#endif + +#endif /* __pr23739__ */ diff --git a/libjava/testsuite/libjava.jni/pr23739.jar b/libjava/testsuite/libjava.jni/pr23739.jar new file mode 100644 index 0000000..d837046 Binary files /dev/null and b/libjava/testsuite/libjava.jni/pr23739.jar differ diff --git a/libjava/testsuite/libjava.jni/register.h b/libjava/testsuite/libjava.jni/register.h new file mode 100644 index 0000000..85b606b --- /dev/null +++ b/libjava/testsuite/libjava.jni/register.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __register__ +#define __register__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jint JNICALL Java_register_doit (JNIEnv *env, jclass, jint); + +#ifdef __cplusplus +} +#endif + +#endif /* __register__ */ diff --git a/libjava/testsuite/libjava.jni/register.jar b/libjava/testsuite/libjava.jni/register.jar new file mode 100644 index 0000000..e8682e1a Binary files /dev/null and b/libjava/testsuite/libjava.jni/register.jar differ diff --git a/libjava/testsuite/libjava.jni/register2.c b/libjava/testsuite/libjava.jni/register2.c index 1ed10a8..318e4d8 100644 --- a/libjava/testsuite/libjava.jni/register2.c +++ b/libjava/testsuite/libjava.jni/register2.c @@ -1,6 +1,6 @@ #include #include -#include +#include static int twentythree (JNIEnv *env, jclass k) diff --git a/libjava/testsuite/libjava.jni/register2.jar b/libjava/testsuite/libjava.jni/register2.jar new file mode 100644 index 0000000..807524c Binary files /dev/null and b/libjava/testsuite/libjava.jni/register2.jar differ diff --git a/libjava/testsuite/libjava.jni/simple_int.h b/libjava/testsuite/libjava.jni/simple_int.h new file mode 100644 index 0000000..b0b9b57 --- /dev/null +++ b/libjava/testsuite/libjava.jni/simple_int.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __simple_1int__ +#define __simple_1int__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jint JNICALL Java_simple_1int_nat (JNIEnv *env, jclass, jint); + +#ifdef __cplusplus +} +#endif + +#endif /* __simple_1int__ */ diff --git a/libjava/testsuite/libjava.jni/simple_int.jar b/libjava/testsuite/libjava.jni/simple_int.jar new file mode 100644 index 0000000..1f0bdc6 Binary files /dev/null and b/libjava/testsuite/libjava.jni/simple_int.jar differ diff --git a/libjava/testsuite/libjava.jni/throwit.h b/libjava/testsuite/libjava.jni/throwit.h new file mode 100644 index 0000000..97c7223 --- /dev/null +++ b/libjava/testsuite/libjava.jni/throwit.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __throwit__ +#define __throwit__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_throwit_throwit (JNIEnv *env, jclass, jstring, jboolean); + +#ifdef __cplusplus +} +#endif + +#endif /* __throwit__ */ diff --git a/libjava/testsuite/libjava.jni/throwit.jar b/libjava/testsuite/libjava.jni/throwit.jar new file mode 100644 index 0000000..9fc43b9 Binary files /dev/null and b/libjava/testsuite/libjava.jni/throwit.jar differ diff --git a/libjava/testsuite/libjava.jni/virtual.h b/libjava/testsuite/libjava.jni/virtual.h new file mode 100644 index 0000000..7d9ef82 --- /dev/null +++ b/libjava/testsuite/libjava.jni/virtual.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#include + +#ifndef __virtual__ +#define __virtual__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jboolean JNICALL Java_virtual_equals (JNIEnv *env, jobject, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __virtual__ */ diff --git a/libjava/testsuite/libjava.jni/virtual.jar b/libjava/testsuite/libjava.jni/virtual.jar new file mode 100644 index 0000000..dd4090b Binary files /dev/null and b/libjava/testsuite/libjava.jni/virtual.jar differ -- cgit v1.1