Commit 85595239 by Tom Tromey Committed by Tom Tromey

Thread_Wait_Interrupt.xfail: New file.

	* libjava.lang/Thread_Wait_Interrupt.xfail: New file.
	* libjava.lang/Thread_Wait_2.xfail: New file.
	* libjava.lang/Thread_Wait.xfail: New file.
	* libjava.lang/Thread_Sleep.xfail: New file.
	* libjava.lang/Thread_Monitor.xfail: New file.
	* libjava.lang/Thread_Join.xfail: New file.
	* libjava.lang/Thread_Interrupt.xfail: New file.
	* libjava.lang/Thread_Alive.xfail: New file.
	* lib/libjava.exp (libjava_init): Set global
	libjava_uses_threads.
	(test_libjava): Document `need-threads' tag.
	(test_libjava_from_source): handle need-threads tag.
	(test_libjava_from_javac): Likewise.

From-SVN: r41840
parent 1fc77d36
2001-05-03 Tom Tromey <tromey@redhat.com> 2001-05-03 Tom Tromey <tromey@redhat.com>
* libjava.lang/Thread_Wait_Interrupt.xfail: New file.
* libjava.lang/Thread_Wait_2.xfail: New file.
* libjava.lang/Thread_Wait.xfail: New file.
* libjava.lang/Thread_Sleep.xfail: New file.
* libjava.lang/Thread_Monitor.xfail: New file.
* libjava.lang/Thread_Join.xfail: New file.
* libjava.lang/Thread_Interrupt.xfail: New file.
* libjava.lang/Thread_Alive.xfail: New file.
* lib/libjava.exp (libjava_init): Set global
libjava_uses_threads.
(test_libjava): Document `need-threads' tag.
(test_libjava_from_source): handle need-threads tag.
(test_libjava_from_javac): Likewise.
2001-05-03 Tom Tromey <tromey@redhat.com>
* libjava.lang/err11.xfail: Removed. * libjava.lang/err11.xfail: Removed.
2001-04-25 Tom Tromey <tromey@redhat.com> 2001-04-25 Tom Tromey <tromey@redhat.com>
......
...@@ -107,11 +107,11 @@ set libjava_initialized 0 ...@@ -107,11 +107,11 @@ set libjava_initialized 0
proc libjava_init { args } { proc libjava_init { args } {
global wrapper_file; global wrapper_file;
global wrap_compile_flags; global wrap_compile_flags;
global libjava_initialized global libjava_initialized libjava_uses_threads
global GCJ_UNDER_TEST global GCJ_UNDER_TEST
global TOOL_EXECUTABLE global TOOL_EXECUTABLE
global original_ld_library_path global original_ld_library_path
global env global env objdir
if { $libjava_initialized == 1 } { return; } if { $libjava_initialized == 1 } { return; }
...@@ -127,6 +127,13 @@ proc libjava_init { args } { ...@@ -127,6 +127,13 @@ proc libjava_init { args } {
} }
} }
# The -B is so we find libgcj.spec.
set text [eval exec "$GCJ_UNDER_TEST -B$objdir/../ -v 2>@ stdout"]
regexp -- "Thread model: (\[^\n\]+)\n" $text ignore model
set libjava_uses_threads [expr {! ($model == "no"
|| $model == "none"
|| $model == "single")}]
# Always set encoding used by gcj. # Always set encoding used by gcj.
append GCJ_UNDER_TEST " --encoding=UTF-8" append GCJ_UNDER_TEST " --encoding=UTF-8"
...@@ -331,6 +338,15 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile ...@@ -331,6 +338,15 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile
set opts($item) x set opts($item) x
} }
# If we need threads and we don't have them then set the `no-exec'
# flag. This is case is also handled specially later.
if {[info exists opts(need-threads)]} {
global libjava_uses_threads
if {! $libjava_uses_threads} {
set opts(no-exec) x
}
}
set errname [file rootname [file tail $srcfile]] set errname [file rootname [file tail $srcfile]]
if {! [runtest_file_p $runtests $errname]} { if {! [runtest_file_p $runtests $errname]} {
return return
...@@ -376,7 +392,9 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile ...@@ -376,7 +392,9 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile
} }
fail "$errname compilation from source" fail "$errname compilation from source"
if {[info exists opts(xfail-gcj)] || ! [info exists opts(no-exec)]} { if {[info exists opts(xfail-gcj)]
|| ! [info exists opts(no-exec)]
|| [info exists opts(need-threads)]} {
untested "$errname execution from source compiled test" untested "$errname execution from source compiled test"
untested "$errname output from source compiled test" untested "$errname output from source compiled test"
} }
...@@ -388,8 +406,17 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile ...@@ -388,8 +406,17 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile
} }
pass "$errname compilation from source" pass "$errname compilation from source"
if {[info exists opts(no-exec)] if {[info exists opts(no-exec)]} {
|| [info exists opts(no-link)]} { if {[info exists opts(need-threads)]} {
# This means we wanted to try to run it but we couldn't
# because threads aren't supported. So we have to
# generate an `untested'.
untested "$errname execution from source compiled test"
untested "$errname output from source compiled test"
}
return
}
if {[info exists opts(no-link)]} {
return return
} }
...@@ -464,6 +491,14 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e ...@@ -464,6 +491,14 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
set opts($item) x set opts($item) x
} }
# If we need threads and we don't have them then set the `no-exec'
# flag. This is case is also handled specially later.
if {[info exists opts(need-threads)]} {
global libjava_uses_threads
if {! $libjava_uses_threads} {
set opts(no-exec) x
}
}
set errname [file rootname [file tail $srcfile]] set errname [file rootname [file tail $srcfile]]
if {! [runtest_file_p $runtests $errname]} { if {! [runtest_file_p $runtests $errname]} {
return return
...@@ -489,7 +524,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e ...@@ -489,7 +524,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
} }
fail "$errname byte compilation" fail "$errname byte compilation"
untested "$errname compilation from bytecode" untested "$errname compilation from bytecode"
if {! [info exists opts(no-exec)]} { if {! [info exists opts(no-exec)]
|| [info exists opts(need-threads)]} {
untested "$errname execution from bytecode->native test" untested "$errname execution from bytecode->native test"
untested "$errname output from bytecode->native test" untested "$errname output from bytecode->native test"
} }
...@@ -521,7 +557,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e ...@@ -521,7 +557,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
if {[string match "*parse error*" $main_name] if {[string match "*parse error*" $main_name]
|| [string match "*parse error*" $class_out]} { || [string match "*parse error*" $class_out]} {
untested "$errname compilation from bytecode" untested "$errname compilation from bytecode"
if {! [info exists opts(no-exec)]} { if {! [info exists opts(no-exec)]
|| [info exists opts(need-threads)]} {
untested "$errname execution from bytecode->native test" untested "$errname execution from bytecode->native test"
untested "$errname output from bytecode->native test" untested "$errname output from bytecode->native test"
} }
...@@ -599,7 +636,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e ...@@ -599,7 +636,8 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
if { $x != "" } { if { $x != "" } {
verbose "target_compile failed: $x" 2 verbose "target_compile failed: $x" 2
fail "$errname compilation from bytecode" fail "$errname compilation from bytecode"
if {! [info exists opts(no-exec)]} { if {! [info exists opts(no-exec)]
|| [info exists opts(need-threads)]} {
untested "$errname execution from bytecode->native test" untested "$errname execution from bytecode->native test"
untested "$errname output from bytecode->native test" untested "$errname output from bytecode->native test"
} }
...@@ -608,6 +646,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e ...@@ -608,6 +646,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
pass "$errname compilation from bytecode" pass "$errname compilation from bytecode"
if {[info exists opts(no-exec)]} { if {[info exists opts(no-exec)]} {
if {[info exists opts(need-threads)]} {
untested "$errname execution from bytecode->native test"
untested "$errname output from bytecode->native test"
}
return return
} }
...@@ -676,7 +718,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e ...@@ -676,7 +718,10 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
# front end. # front end.
# `xfail-byte' compilation from bytecode will fail # `xfail-byte' compilation from bytecode will fail
# `xfail-exec' exec will fail # `xfail-exec' exec will fail
# `xfail-output' output will be wrong # `xfail-output'
# output will be wrong
# `need-threads'
# test relies on thread support
# #
proc test_libjava { options srcfile compile_args inpfile resultfile exec_args } { proc test_libjava { options srcfile compile_args inpfile resultfile exec_args } {
test_libjava_from_source $options $srcfile $compile_args $inpfile $resultfile $exec_args test_libjava_from_source $options $srcfile $compile_args $inpfile $resultfile $exec_args
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment