This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[patch] testsuite jar.exp
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Sat, 15 Nov 2003 15:41:52 +0100
- Subject: [patch] testsuite jar.exp
Hi,
since the libjava.jar got introduced the follwing jni tests fail due to
the fact that the CLASSPATH also contains the path to the libjava.jar
testfiles.
The following files die with the following message:
couldn't compile
/Volumes/xufs/gcc-cvs-dylib/gcc/libjava/testsuite/libjava.jni/virtual.java:
/Volumes/xufs/gcc-cvs-dylib/gcc/libjava/testsuite/libjava.jni/virtual.java:0:
error: malformed .zip archive in CLASSPATH:
/Volumes/xufs/gcc-cvs-dylib/gcc/libjava/testsuite/libjava.jar/
So I tried to reset the CLASSPATH to "" and it helped. The CLASSPATH is
set again if used.
In the same turn I added a cleanup routine snippet to remove the
produced *.jar stuff in the testsuite directory.
Ok for mainline?
Tested on darwin ppc. Solaris will follow and the others too.
Andreas
2003-11-15 Andreas Tobler <a.tobler@schweiz.ch>
* libjava.jar/jar.exp: Cleanup files and reset CLASSPATH.
Index: testsuite/libjava.jar/jar.exp
===================================================================
RCS file: /cvs/gcc/gcc/libjava/testsuite/libjava.jar/jar.exp,v
retrieving revision 1.1
diff -u -r1.1 jar.exp
--- testsuite/libjava.jar/jar.exp 10 Nov 2003 21:30:10 -0000 1.1
+++ testsuite/libjava.jar/jar.exp 15 Nov 2003 14:34:01 -0000
@@ -35,7 +35,7 @@
}
proc gcj_jar_run {} {
- global srcdir subdir
+ global srcdir subdir env
foreach jar [lsort [glob -nocomplain ${srcdir}/${subdir}/*.jar]] {
set xff [file rootname $jar].xfail
set main {}
@@ -54,6 +54,14 @@
gcj_jar_interpret $jar
}
}
+ # When we succeed we remove all our clutter.
+ eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main ${main}.class]
+
+ # Reset CLASSPATH that we do not look into testsuite/libjava.jar for *.jar
+ # files which do not belong to the libgcj itself.
+ set env(CLASSPATH) ""
+
+ return 1
}
gcj_jar_run