diff options
| author | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-06 17:54:30 +0000 |
|---|---|---|
| committer | bryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-06 17:54:30 +0000 |
| commit | c86fc1d1a8b2ad3e5e48ada5d364314920e999ae (patch) | |
| tree | 5abf05521ce86907d94933b8221e112810578f22 /libjava | |
| parent | 78425cf348ffec46a6275d138b77442d0a1289fa (diff) | |
| download | ppe42-gcc-c86fc1d1a8b2ad3e5e48ada5d364314920e999ae.tar.gz ppe42-gcc-c86fc1d1a8b2ad3e5e48ada5d364314920e999ae.zip | |
Run the jni tests using the interpreter.
* testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Append
options_cxx to shared lib compile command.
(gcj_jni_test_one): Pass cxxflags to gcj_jni_compile_c_to_so, so
they are used to link the shared lib, not the main binary.
Use libjava_invoke to run gij.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81574 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
| -rw-r--r-- | libjava/ChangeLog | 9 | ||||
| -rw-r--r-- | libjava/testsuite/libjava.jni/jni.exp | 23 |
2 files changed, 29 insertions, 3 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e6512ac92e6..e286911f3ab 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,12 @@ +2004-05-06 Bryce McKinlay <mckinlay@redhat.com> + + Run the jni tests using the interpreter. + * testsuite/libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Append + options_cxx to shared lib compile command. + (gcj_jni_test_one): Pass cxxflags to gcj_jni_compile_c_to_so, so + they are used to link the shared lib, not the main binary. + Use libjava_invoke to run gij. + 2004-05-06 Michael Koch <konqueror@gmx.de> * java/util/logging/Level.java diff --git a/libjava/testsuite/libjava.jni/jni.exp b/libjava/testsuite/libjava.jni/jni.exp index a4bf4b80ee1..3c9f3e48a6a 100644 --- a/libjava/testsuite/libjava.jni/jni.exp +++ b/libjava/testsuite/libjava.jni/jni.exp @@ -39,6 +39,9 @@ proc gcj_jni_compile_c_to_so {file {options {}}} { # Find jni.h. lappend options "additional_flags=-I$srcdir/../include" + # Append C++ options + lappend options "additional_flags=$options_cxx" + set x [libjava_prune_warnings \ [target_compile $file $soname executable $options]] if {$x != ""} { @@ -71,6 +74,7 @@ proc gcj_jni_build_header {file} { proc gcj_jni_test_one {file} { global runtests global host_triplet + global INTERPRETER # apple uses a different extension for shared/dynamic libraries # so we check against powerpc-apple-darwin and set them to @@ -128,23 +132,36 @@ proc gcj_jni_test_one {file} { set cxxflags [join $cxxflaglist] } - if {! [gcj_jni_compile_c_to_so $cfile]} { + if {! [gcj_jni_compile_c_to_so $cfile $cxxflags]} { # FIXME return 0 } # We use -l$main because the .so is named the same as the main # program. - set args [list "additional_flags=-fjni -L. -l$main $cxxflags"] + set args [list "additional_flags=-fjni -L. -l$main"] if {! [gcj_link $main $main $file $args]} { # FIXME return 0 } - if {! [gcj_invoke $main [file rootname $file].out $cxxldlibflags]} { + set resultfile [file rootname $file].out + + if {! [gcj_invoke $main $resultfile $cxxldlibflags]} { # FIXME return 0 } + + # We purposely ignore errors here; we still want to run the other + # appropriate tests. + set errname [file rootname [file tail $file]] + set gij [libjava_find_gij] + # libjava_find_gij will return `gij' if it couldn't find the + # program; in this case we want to skip the test. + if {$INTERPRETER == "yes" && $gij != "gij"} { + libjava_invoke $errname "gij test" opts $gij \ + "" $resultfile $main + } # When we succeed we remove all our clutter. eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main lib${main}.${so_extension}] |

