* lib/libjava.exp (bytecompile_file): Use exec, not system.
authorTom Tromey <tromey@cygnus.com>
Thu, 18 May 2000 17:17:55 +0000 (17:17 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 18 May 2000 17:17:55 +0000 (17:17 +0000)
From-SVN: r33989

libjava/testsuite/ChangeLog
libjava/testsuite/lib/libjava.exp

index 5abc88e57965f1b6365b2a84c912132c81c981d7..bad4daa2315173177599cd240b8daadf514d16b1 100644 (file)
@@ -1,3 +1,7 @@
+2000-05-18  Tom Tromey  <tromey@cygnus.com>
+
+       * lib/libjava.exp (bytecompile_file): Use exec, not system.
+
 2000-05-17  Tom Tromey  <tromey@cygnus.com>
 
        * libjava.mauve/mauve.exp (test_mauve): Call `prune_warnings'.
index 3d1e8c8b5a1da2a85365715066d60a49ed44e211..cf9b9a95ba2794cbe851c20ded3083c976b50fd4 100644 (file)
@@ -49,7 +49,7 @@ proc find_gcjh {} {
 proc bytecompile_file { file objdir {classpath {}} } {
     global env
     global SUN_JAVAC
-    set dirname  [file dirname $file];
+    set dirname [file dirname $file]
 
     # If JDK doesn't run on your platform but some other
     # JDK-compatible javac does, you may set SUN_JAVAC to point to it.
@@ -72,7 +72,12 @@ proc bytecompile_file { file objdir {classpath {}} } {
         set env(CLASSPATH) $classpath
     }
     if {[catch {
-       system "cd $dirname; $SUN_JAVAC $file -d $objdir 2>&1"
+       set here [pwd]
+       cd $dirname
+       set q [eval exec "$SUN_JAVAC [list $file] -d $objdir 2>@ stdout"]
+       cd $here
+       # "return" a result
+       set q $q
     } msg]} then {
        verbose "couldn't compile $file: $msg"
        set r 0