jar.exp: Cleanup files and reset CLASSPATH.
authorAndreas Tobler <a.tobler@schweiz.ch>
Tue, 18 Nov 2003 07:17:01 +0000 (08:17 +0100)
committerAndreas Tobler <andreast@gcc.gnu.org>
Tue, 18 Nov 2003 07:17:01 +0000 (08:17 +0100)
2003-11-18  Andreas Tobler  <a.tobler@schweiz.ch>

* libjava.jar/jar.exp: Cleanup files and reset CLASSPATH.

From-SVN: r73696

libjava/testsuite/ChangeLog
libjava/testsuite/libjava.jar/jar.exp

index a7fa19604ec8c0f04fee74a4c178aab5ea3d2b90..674b0b74a53807b283ed874a34cd95413faf64a2 100644 (file)
@@ -1,3 +1,7 @@
+2003-11-18  Andreas Tobler  <a.tobler@schweiz.ch>
+
+       * libjava.jar/jar.exp: Cleanup files and reset CLASSPATH.
+
 2003-11-17  Jeff Sturm  <jsturm@one-point.com>
 
        * libjava.compile/PR12857.java: New test case.
index 70a176ee43cc3c3cc23c3659d4c99611650ddb13..bff1fea2c8c9613adddc622ddb9026c32d2e1433 100644 (file)
@@ -19,7 +19,7 @@ proc gcj_jar_compile_one {jarfile mainclass} {
 proc gcj_jar_interpret {jarfile} {
   global INTERPRETER srcdir
 
-  set gij [libjava_find_gij] 
+  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"} {
@@ -35,7 +35,7 @@ proc gcj_jar_interpret {jarfile} {
 }
 
 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 @@ proc gcj_jar_run {} {
       gcj_jar_interpret $jar
     }
   }
+    # When we succeed we remove all our clutter.
+    eval gcj_cleanup [glob -nocomplain -- ${main}.*] [list $main ]
+
+    # 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