This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: make gij tests run
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 20 Dec 2004 17:49:35 -0700
- Subject: Patch: FYI: make gij tests run
- Reply-to: tromey at redhat dot com
I'm checking this in on the trunk.
At some point, apparently our test suite stopped running tests using
"gij". This patch fixes the problem. We now no longer rely on
"get_multilibs" from dejagnu, and instead we just find gij in our
build directory. Additionally, libjava_find_gij now returns something
other than plain "gij" if gij is not found.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* testsuite/libjava.jar/jar.exp (gcj_jar_interpret): Updated.
* testsuite/libjava.verify/verify.exp (gcj_verify_run): Updated.
* testsuite/libjava.jni/jni.exp (gcj_jni_test_one): Updated.
* testsuite/lib/libjava.exp (libjava_find_spec): Don't use
get_multilibs.
(libjava_find_gij): Likewise. Changed return result if gij not
found.
(test_libjava_from_javac): Updated.
Index: testsuite/lib/libjava.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/lib/libjava.exp,v
retrieving revision 1.64
diff -u -r1.64 libjava.exp
--- testsuite/lib/libjava.exp 26 Nov 2004 00:18:02 -0000 1.64
+++ testsuite/lib/libjava.exp 21 Dec 2004 00:50:12 -0000
@@ -270,28 +270,17 @@
# is used with -B.
proc libjava_find_spec {} {
global objdir
- set gp [get_multilibs]
-
- if {[file exists $gp/libjava/libgcj.spec]} then {
- return "$gp/libjava/"
- }
return "$objdir/../"
}
-# Find `gij'.
+# Find `gij'. Return empty string if not found.
proc libjava_find_gij {} {
- global base_dir
- set gp [get_multilibs]
- if {$gp != ""} {
- set file $gp/libjava/gij
- } else {
- set file $base_dir/../gij
- }
+ global base_dir objdir
- if {[file exists $file]} {
- return $file
+ if {! [file exists $objdir/../gij]} {
+ return ""
}
- return gij
+ return $objdir/../gij
}
# Remove a bunch of files.
@@ -814,9 +803,9 @@
# We purposely ignore errors here; we still want to run the other
# appropriate tests.
set gij [libjava_find_gij]
- # libjava_find_gij will return `gij' if it couldn't find the
+ # libjava_find_gij will return "" if it couldn't find the
# program; in this case we want to skip the test.
- if {$INTERPRETER == "yes" && $gij != "gij"} {
+ if {$INTERPRETER == "yes" && $gij != ""} {
libjava_invoke $errname "gij test" opts $gij \
$inpfile $resultfile "" $main_name
}
Index: testsuite/libjava.jar/jar.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.jar/jar.exp,v
retrieving revision 1.3
diff -u -r1.3 jar.exp
--- testsuite/libjava.jar/jar.exp 10 May 2004 20:44:13 -0000 1.3
+++ testsuite/libjava.jar/jar.exp 21 Dec 2004 00:50:12 -0000
@@ -20,9 +20,9 @@
global INTERPRETER srcdir
set gij [libjava_find_gij]
- # libjava_find_gij will return `gij' if it couldn't find the
+ # libjava_find_gij will return "" if it couldn't find the
# program; in this case we want to skip the test.
- if {$INTERPRETER != "yes" || $gij == "gij"} {
+ if {$INTERPRETER != "yes" || $gij == ""} {
untested "$jarfile execution - gij test"
untested "$jarfile output - gij test"
return
Index: testsuite/libjava.jni/jni.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.jni/jni.exp,v
retrieving revision 1.16
diff -u -r1.16 jni.exp
--- testsuite/libjava.jni/jni.exp 18 Jun 2004 20:56:56 -0000 1.16
+++ testsuite/libjava.jni/jni.exp 21 Dec 2004 00:50:12 -0000
@@ -165,17 +165,18 @@
# 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
+ # libjava_find_gij will return "" if it couldn't find the
# program; in this case we want to skip the test.
# If the libraries are not installed yet, we have to pass them via
# cxxldlibflags to libjava_invoke.
- if {$INTERPRETER == "yes" && $gij != "gij"} {
- libjava_invoke $errname "gij test" opts $gij \
- "" $resultfile $cxxldlibflags $main
+ if {$INTERPRETER == "yes" && $gij != ""} {
+ libjava_invoke $errname "gij test" opts $gij \
+ "" $resultfile $cxxldlibflags $main
}
# When we succeed we remove all our clutter.
- eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main lib${main}.${so_extension}]
+ eval gcj_cleanup [glob -nocomplain -- ${main}.*] \
+ [list $main lib${main}.${so_extension}]
return 1
}
Index: testsuite/libjava.verify/verify.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.verify/verify.exp,v
retrieving revision 1.3
diff -u -r1.3 verify.exp
--- testsuite/libjava.verify/verify.exp 19 Jul 2003 15:43:20 -0000 1.3
+++ testsuite/libjava.verify/verify.exp 21 Dec 2004 00:50:14 -0000
@@ -61,9 +61,9 @@
set gij [libjava_find_gij]
set interpret 1
- # libjava_find_gij will return `gij' if it couldn't find the
+ # libjava_find_gij will return "" if it couldn't find the
# program; in this case we want to skip the test.
- if {$INTERPRETER != "yes" || $gij == "gij"} {
+ if {$INTERPRETER != "yes" || $gij == ""} {
set interpret 0
}