summaryrefslogtreecommitdiffstats
path: root/libjava/testsuite/lib/libjava.exp
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-14 17:46:53 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2001-06-14 17:46:53 +0000
commit3ff15cdce5efeefd0fe4eb0aa1a533bc360937e0 (patch)
tree0ec2f585314dbba556a40871968a29a52173bf73 /libjava/testsuite/lib/libjava.exp
parent09d367bce9b4efa7f14bf488ff3edf8df755df9d (diff)
downloadppe42-gcc-3ff15cdce5efeefd0fe4eb0aa1a533bc360937e0.tar.gz
ppe42-gcc-3ff15cdce5efeefd0fe4eb0aa1a533bc360937e0.zip
* libjava.jni/jni.exp: New file.
* lib/libjava.exp (gcj_link): New proc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@43375 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/testsuite/lib/libjava.exp')
-rw-r--r--libjava/testsuite/lib/libjava.exp21
1 files changed, 21 insertions, 0 deletions
diff --git a/libjava/testsuite/lib/libjava.exp b/libjava/testsuite/lib/libjava.exp
index f6947ccdf3d..ace5f6c2b2d 100644
--- a/libjava/testsuite/lib/libjava.exp
+++ b/libjava/testsuite/lib/libjava.exp
@@ -336,6 +336,27 @@ proc libjava_arguments {{mode compile}} {
return $args
}
+# Link a bunch of objects into a program. MAIN is the name of the
+# class holding `main'. Return 0 on failure.
+proc gcj_link {program main files {options {}}} {
+ set arguments [libjava_arguments link]
+ if {[llength $options]} {
+ eval lappend arguments $options
+ }
+ lappend arguments "additional_flags=--main=$main"
+ set x [prune_warnings [libjava_tcompile $files $program executable \
+ $arguments]]
+ if {$x != ""} {
+ verbose "link failure: $x" 2
+ fail "linking $program"
+ setup_xfail "*-*-*"
+ fail "running $program"
+ return 0
+ }
+
+ pass "linking $program"
+ return 1
+}
#
# Run the test specified by srcfile and resultfile. compile_args and
OpenPOWER on IntegriCloud