aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.jvmti
diff options
context:
space:
mode:
authorTom Tromey <tromey@gcc.gnu.org>2007-01-09 19:58:05 +0000
committerTom Tromey <tromey@gcc.gnu.org>2007-01-09 19:58:05 +0000
commit97b8365cafc3a344a22d3980b8ed885f5c6d8357 (patch)
tree996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/testsuite/libjava.jvmti
parentc648dedbde727ca3f883bb5fd773aa4af70d3369 (diff)
downloadgcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.zip
gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.gz
gcc-97b8365cafc3a344a22d3980b8ed885f5c6d8357.tar.bz2
Merged gcj-eclipse branch to trunk.
From-SVN: r120621
Diffstat (limited to 'libjava/testsuite/libjava.jvmti')
-rw-r--r--libjava/testsuite/libjava.jvmti/events.h27
-rw-r--r--libjava/testsuite/libjava.jvmti/events.jarbin0 -> 702 bytes
-rw-r--r--libjava/testsuite/libjava.jvmti/geterrorname.h27
-rw-r--r--libjava/testsuite/libjava.jvmti/geterrorname.jarbin0 -> 716 bytes
-rw-r--r--libjava/testsuite/libjava.jvmti/jvmti.exp50
5 files changed, 77 insertions, 27 deletions
diff --git a/libjava/testsuite/libjava.jvmti/events.h b/libjava/testsuite/libjava.jvmti/events.h
new file mode 100644
index 0000000..2f81b63
--- /dev/null
+++ b/libjava/testsuite/libjava.jvmti/events.h
@@ -0,0 +1,27 @@
+
+// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
+
+#ifndef __events__
+#define __events__
+
+#pragma interface
+
+#include <java/lang/Object.h>
+#include <gcj/array.h>
+
+extern "Java"
+{
+ class events;
+}
+
+class events : public ::java::lang::Object
+{
+
+public:
+ events();
+ static void do_events_tests();
+ static void main(JArray< ::java::lang::String * > *);
+ static ::java::lang::Class class$;
+};
+
+#endif // __events__
diff --git a/libjava/testsuite/libjava.jvmti/events.jar b/libjava/testsuite/libjava.jvmti/events.jar
new file mode 100644
index 0000000..121df82
--- /dev/null
+++ b/libjava/testsuite/libjava.jvmti/events.jar
Binary files differ
diff --git a/libjava/testsuite/libjava.jvmti/geterrorname.h b/libjava/testsuite/libjava.jvmti/geterrorname.h
new file mode 100644
index 0000000..957e1c23
--- /dev/null
+++ b/libjava/testsuite/libjava.jvmti/geterrorname.h
@@ -0,0 +1,27 @@
+
+// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-
+
+#ifndef __geterrorname__
+#define __geterrorname__
+
+#pragma interface
+
+#include <java/lang/Object.h>
+#include <gcj/array.h>
+
+extern "Java"
+{
+ class geterrorname;
+}
+
+class geterrorname : public ::java::lang::Object
+{
+
+public:
+ geterrorname();
+ static void do_errorname_tests();
+ static void main(JArray< ::java::lang::String * > *);
+ static ::java::lang::Class class$;
+};
+
+#endif // __geterrorname__
diff --git a/libjava/testsuite/libjava.jvmti/geterrorname.jar b/libjava/testsuite/libjava.jvmti/geterrorname.jar
new file mode 100644
index 0000000..a0c5ae0
--- /dev/null
+++ b/libjava/testsuite/libjava.jvmti/geterrorname.jar
Binary files differ
diff --git a/libjava/testsuite/libjava.jvmti/jvmti.exp b/libjava/testsuite/libjava.jvmti/jvmti.exp
index 18be872..c69fd2b 100644
--- a/libjava/testsuite/libjava.jvmti/jvmti.exp
+++ b/libjava/testsuite/libjava.jvmti/jvmti.exp
@@ -31,27 +31,23 @@ proc gcj_jvmti_compile_cxx_to_o {file {options {}}} {
# 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
}
@@ -67,18 +63,18 @@ proc gcj_jvmti_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"
- if {! [gcj_jvmti_build_headers $file]} {
- # FIXME
- return 0
- }
+# if {! [gcj_jvmti_build_headers $file]} {
+# # FIXME
+# return 0
+# }
set cfile [file join [file dirname $file] nat$main.cc]
if {! [gcj_jvmti_compile_cxx_to_o $cfile]} {
@@ -109,7 +105,7 @@ proc gcj_jvmti_run {} {
# For now we only test JVMTI 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_jvmti_test_one $x