c1fcbbc33b
* testsuite/libjava.jacks/jacks.exp (gcj_jacks_write): Explicitly limit the maximum heap size to avoid unnecessary thrashing. From-SVN: r81156
108 lines
2.6 KiB
Plaintext
108 lines
2.6 KiB
Plaintext
# Run the Jacks test suite.
|
|
# See http://www-124.ibm.com/developerworks/oss/cvs/jikes/~checkout~/jacks/jacks.html
|
|
|
|
proc gcj_jacks_setup_xfail {ary} {
|
|
upvar $ary array
|
|
global srcdir
|
|
|
|
set fd [open $srcdir/libjava.jacks/jacks.xfail]
|
|
while {! [eof $fd]} {
|
|
set array([gets $fd]) {}
|
|
}
|
|
close $fd
|
|
}
|
|
|
|
proc gcj_jacks_write {filename} {
|
|
global GCJ_UNDER_TEST
|
|
global libgcj_jar
|
|
global libjava_libgcc_s_path
|
|
global original_ld_library_path
|
|
|
|
set gcjl [split $GCJ_UNDER_TEST]
|
|
set gcj_cmd [lindex $gcjl 0]
|
|
set rest [join [lreplace $gcjl 0 0]]
|
|
append rest " -C"
|
|
|
|
set fd [open $filename w]
|
|
puts $fd "set JAVAC $gcj_cmd"
|
|
puts $fd "set JAVA_CLASSPATH \"$libgcj_jar\""
|
|
puts $fd "set JAVAC_FLAGS [list $rest]"
|
|
puts $fd "set JAVA [list [libjava_find_gij]]"
|
|
|
|
# Without an explicit limit on the heap size, tests depending on
|
|
# an OutOfMemoryError (e.g. "15.9.4-runtime-creation-2") can result
|
|
# in a lot of unnecessary thrashing.
|
|
puts $fd "set JAVA_FLAGS \"-mx=64m\""
|
|
|
|
puts $fd "set JAVAC_ENCODING_FLAG --encoding="
|
|
puts $fd "set tcltest::testConstraints(encoding) 1"
|
|
puts $fd "set tcltest::testConstraints(gcj) 1"
|
|
puts $fd "set tcltest::testConstraints(assert) 1"
|
|
# "Time-consuming JVM limitation tests".
|
|
# puts $fd "set tcltest::testConstraints(jvm) 1"
|
|
close $fd
|
|
|
|
setenv LD_LIBRARY_PATH $libjava_libgcc_s_path:$original_ld_library_path
|
|
}
|
|
|
|
proc gcj_jacks_parse {file} {
|
|
if {[catch {open $file} fd]} {
|
|
verbose "couldn't parse Jacks output: $fd"
|
|
return
|
|
}
|
|
|
|
verbose "Reading jacks.xfail"
|
|
gcj_jacks_setup_xfail xfails
|
|
|
|
while {! [eof $fd]} {
|
|
set line [gets $fd]
|
|
if {[string match RESULT* $line]} {
|
|
set linelist [split $line]
|
|
set test [lindex $linelist 1]
|
|
if {[info exists xfails($test)]} {
|
|
setup_xfail "*-*-*"
|
|
}
|
|
if {[lindex $linelist 2] == "PASSED"} {
|
|
pass $test
|
|
} else {
|
|
fail $test
|
|
}
|
|
}
|
|
}
|
|
|
|
close $fd
|
|
}
|
|
|
|
proc gcj_jacks_run {} {
|
|
global srcdir
|
|
|
|
if {! [file isdirectory $srcdir/libjava.jacks/jacks]} {
|
|
# No tests.
|
|
verbose "Jacks tests not found"
|
|
return
|
|
}
|
|
|
|
# Jacks forces us to do this. You can't run it from a separate
|
|
# tree.
|
|
verbose "Copying Jacks..."
|
|
catch {system "rm -rf jacks"}
|
|
catch {system "cp -r $srcdir/libjava.jacks/jacks jacks"}
|
|
|
|
set here [pwd]
|
|
cd jacks
|
|
|
|
verbose "Writing Jacks setup file"
|
|
gcj_jacks_write gcj_setup
|
|
|
|
verbose "Running Jacks..."
|
|
# Just ignore error exits from the jacks program.
|
|
# It will always error exit for us, since don't completely pass.
|
|
catch {exec ./jacks gcj} msg
|
|
|
|
gcj_jacks_parse logging/gcj.log
|
|
|
|
cd $here
|
|
}
|
|
|
|
gcj_jacks_run
|