aboutsummaryrefslogtreecommitdiff
path: root/libjava/testsuite/lib/libjava.exp
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/testsuite/lib/libjava.exp')
-rw-r--r--libjava/testsuite/lib/libjava.exp9
1 files changed, 7 insertions, 2 deletions
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index 3d1e8c8..cf9b9a9 100644
--- a/libjava/testsuite/lib/libjava.exp
+++ b/libjava/testsuite/lib/libjava.exp
@@ -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