summaryrefslogtreecommitdiff
path: root/libjava/testsuite/lib
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-10 20:44:13 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-10 20:44:13 +0000
commitc82ba3668c997bda14eee1638c6a5e1ace4ae186 (patch)
tree37d6a392390fcfb74725e8e9b9b772e4e30a1f2c /libjava/testsuite/lib
parente40d1c7f12944e7d96eceb97eaf8624e9bc7a64c (diff)
downloadgcc-c82ba3668c997bda14eee1638c6a5e1ace4ae186.tar.gz
2004-05-10 Andreas Tobler <a.tobler@schweiz.ch>
* testsuite/lib/libjava.exp (libjava_invoke): Add new argument ld_library_additions. Adjust all calls to libjava_invoke to match the new argument. * testsuite/libjava.jni/jni.exp (gcj_jni_test_one): Pass stdc++ path to cxxflagslist. Pass path of libstdc++ to libjava_invoke. * testsuite/libjava.jar/jar.exp (gcj_jar_inerpret): Adjust libjava_invoke arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81679 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite/lib')
-rw-r--r--libjava/testsuite/lib/libjava.exp28
1 files changed, 23 insertions, 5 deletions
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index 31937c3a1e0..ad76f8b0412 100644
--- a/libjava/testsuite/lib/libjava.exp
+++ b/libjava/testsuite/lib/libjava.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation
+# Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
load_lib "libgloss.exp"
@@ -495,7 +495,21 @@ proc gcj_invoke {program expectFile ld_library_additions} {
# Invoke a program and check its output. EXECUTABLE is the program;
# ARGS are the arguments to the program. Returns 1 if tests passed
# (or things were left untested), 0 otherwise.
-proc libjava_invoke {errname testName optName executable inpfile resultfile args} {
+proc libjava_invoke {errname testName optName executable inpfile resultfile
+ ld_library_additions args} {
+ global env
+ set lib_path $env(LD_LIBRARY_PATH)
+
+ set newval .
+ if {[llength $ld_library_additions] > 0} {
+ append newval :[join $ld_library_additions :]
+ }
+
+ append newval :$lib_path
+
+ setenv LD_LIBRARY_PATH $newval
+
+ verbose "LD_LIBRARY_PATH=$env(LD_LIBRARY_PATH)"
upvar $optName opts
if {[info exists opts(no-exec)]} {
@@ -512,6 +526,10 @@ proc libjava_invoke {errname testName optName executable inpfile resultfile args
set result [libjava_load $executable $args "$inpfile"]
set status [lindex $result 0]
set output [lindex $result 1]
+
+ # Restore LD_LIBRARY_PATH setting.
+ setenv LD_LIBRARY_PATH $lib_path
+
if {[info exists opts(xfail-exec)]} then {
setup_xfail *-*-*
}
@@ -658,7 +676,7 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile
set opts(xfail-output) x
}
if {[libjava_invoke $errname "source compiled test" opts $executable \
- $inpfile $resultfile]} {
+ $inpfile $resultfile ""]} {
# Everything ok, so clean up.
eval gcj_cleanup $removeList
}
@@ -796,7 +814,7 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
# program; in this case we want to skip the test.
if {$INTERPRETER == "yes" && $gij != "gij"} {
libjava_invoke $errname "gij test" opts $gij \
- $inpfile $resultfile $main_name
+ $inpfile $resultfile "" $main_name
}
# Initial arguments.
@@ -859,7 +877,7 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
set opts(xfail-output) x
}
if {[libjava_invoke $errname "bytecode->native test" opts $executable \
- $inpfile $resultfile]} {
+ $inpfile $resultfile ""]} {
# Everything ok, so clean up.
eval gcj_cleanup $removeList
}