1 # Run the Jacks test suite.
2 # See http
://www
-124.ibm.com
/developerworks
/oss
/cvs
/jikes
/~checkout~
/jacks
/jacks.html
4 load_gcc_lib target
-libpath.exp
6 proc gcj_jacks_setup_xfail
{ary
} {
10 set fd
[open $srcdir
/libjava.jacks
/jacks.xfail
]
12 set array
([gets $fd
]) {}
17 proc gcj_jacks_write
{filename
} {
20 global libjava_libgcc_s_path
21 global ld_library_path
23 set gcjl
[split $GCJ_UNDER_TEST
]
24 set gcj_cmd
[lindex $gcjl
0]
25 set rest
[join
[lreplace $gcjl
0 0]]
28 set fd
[open $filename w
]
29 puts $fd
"set JAVAC $gcj_cmd"
30 puts $fd
"set JAVA_CLASSPATH \"$libgcj_jar\""
31 puts $fd
"set JAVAC_FLAGS [list $rest]"
32 puts $fd
"set JAVA [list [libjava_find_gij]]"
34 # Without an explicit
limit on the heap size
, tests depending
on
35 # an OutOfMemoryError
(e.g.
"15.9.4-runtime-creation-2") can result
36 # in a lot of unnecessary thrashing.
37 puts $fd
"set JAVA_FLAGS \"-mx=64m\""
39 puts $fd
"set JAVAC_ENCODING_FLAG --encoding="
40 puts $fd
"set JAVAC_DEPRECATION_FLAG -Wdeprecated"
41 puts $fd
"set tcltest::testConstraints(encoding) 1"
42 puts $fd
"set tcltest::testConstraints(gcj) 1"
43 puts $fd
"set tcltest::testConstraints(assert) 1"
44 #
"Time-consuming JVM limitation tests".
45 # puts $fd
"set tcltest::testConstraints(jvm) 1"
48 set ld_library_path $libjava_libgcc_s_path
49 set_ld_library_path_env_vars
52 proc gcj_jacks_parse
{file
} {
53 if {[catch
{open $file
} fd
]} {
54 verbose
"couldn't parse Jacks output: $fd"
58 verbose
"Reading jacks.xfail"
59 gcj_jacks_setup_xfail xfails
63 if {[string match RESULT
* $line
]} {
64 set linelist
[split $line
]
65 set test
[lindex $linelist
1]
66 if {[info exists xfails
($test
)]} {
69 if {[lindex $linelist
2] == "PASSED"} {
80 proc gcj_jacks_run
{} {
83 if {! [file isdirectory $srcdir
/libjava.jacks
/jacks
]} {
85 verbose
"Jacks tests not found"
89 # Jacks forces us to
do this. You can
't run it from a separate
91 verbose "Copying Jacks..."
92 catch {system "rm -rf jacks"}
93 catch {system "cp -r $srcdir/libjava.jacks/jacks jacks"}
98 verbose "Writing Jacks setup file"
99 gcj_jacks_write gcj_setup
101 verbose "Running Jacks..."
102 # Just ignore error exits from the jacks program.
103 # It will always error exit for us, since don't completely pass.
104 # At the moment jacks has a hardcoded
call to tclsh8.3. To override this
,
105 # we check here
on the version and launch the script directly with the
107 set tcl_ver
[info tclversion
]
108 if {[package vcompare $tcl_ver
8.3] >= 0 } {
109 if {[catch
{exec tclsh$tcl_ver jacks gcj
} msg
]} {
110 send_log
"Couldn't run jacks: $msg\n"
113 gcj_jacks_parse logging
/gcj.
log
115 send_log
"No suitable tclsh found, you need at least version 8.3 or up.\n"