mauve.exp (test_mauve): Call `prune_warnings'.
* libjava.mauve/mauve.exp (test_mauve): Call `prune_warnings'. (test_mauve_sim): Likewise. (test_mauve): Redirect stderr in system call. (test_mauve_sim): Likewise. * lib/libjava.exp (test_libjava_from_source): Call `prune_warnings'. (test_libjava_from_javac): Likewise. (bytecompile_file): Redirect stderr in system call. * lib/libjava.exp (libjava_find_program): New proc. (find_jvscan): Use it. (find_gcjh): New proc. * libjava.compile/compile.exp: Use "", not $options. From-SVN: r33959
This commit is contained in:
parent
e0125cf32b
commit
9cb0bef59f
4 changed files with 84 additions and 61 deletions
|
@ -1,3 +1,19 @@
|
||||||
|
2000-05-17 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
|
* libjava.mauve/mauve.exp (test_mauve): Call `prune_warnings'.
|
||||||
|
(test_mauve_sim): Likewise.
|
||||||
|
(test_mauve): Redirect stderr in system call.
|
||||||
|
(test_mauve_sim): Likewise.
|
||||||
|
* lib/libjava.exp (test_libjava_from_source): Call
|
||||||
|
`prune_warnings'.
|
||||||
|
(test_libjava_from_javac): Likewise.
|
||||||
|
(bytecompile_file): Redirect stderr in system call.
|
||||||
|
* lib/libjava.exp (libjava_find_program): New proc.
|
||||||
|
(find_jvscan): Use it.
|
||||||
|
(find_gcjh): New proc.
|
||||||
|
|
||||||
|
* libjava.compile/compile.exp: Use "", not $options.
|
||||||
|
|
||||||
2000-05-16 Tom Tromey <tromey@cygnus.com>
|
2000-05-16 Tom Tromey <tromey@cygnus.com>
|
||||||
|
|
||||||
* libjava.lang/instance.out: New file.
|
* libjava.lang/instance.out: New file.
|
||||||
|
|
|
@ -21,21 +21,31 @@ proc libjava_read_xfail {file} {
|
||||||
return $tokens
|
return $tokens
|
||||||
}
|
}
|
||||||
|
|
||||||
# Find `jv-scan'. FIXME: this relies on DejaGnu internals. These
|
# Find a particular executable. FIXME: this relies on DejaGnu
|
||||||
# should probably be exposed in a better way.
|
# internals. These should probably be exposed in a better way.
|
||||||
proc find_jvscan {} {
|
proc libjava_find_program {prog} {
|
||||||
global tool_root_dir
|
global tool_root_dir
|
||||||
|
|
||||||
set file [lookfor_file $tool_root_dir jv-scan]
|
set file [lookfor_file $tool_root_dir $prog]
|
||||||
if { $file == "" } {
|
if { $file == "" } {
|
||||||
set file [lookfor_file $tool_root_dir gcc/jv-scan];
|
set file [lookfor_file $tool_root_dir gcc/$prog];
|
||||||
}
|
}
|
||||||
if {$file == ""} {
|
if {$file == ""} {
|
||||||
set file jv-scan
|
set file $prog
|
||||||
}
|
}
|
||||||
return $file
|
return $file
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Find `jv-scan'.
|
||||||
|
proc find_jvscan {} {
|
||||||
|
return [libjava_find_program jv-scan]
|
||||||
|
}
|
||||||
|
|
||||||
|
# Find `gcjh'.
|
||||||
|
proc find_gcjh {} {
|
||||||
|
return [libjava_find_program gcjh]
|
||||||
|
}
|
||||||
|
|
||||||
proc bytecompile_file { file objdir {classpath {}} } {
|
proc bytecompile_file { file objdir {classpath {}} } {
|
||||||
global env
|
global env
|
||||||
global SUN_JAVAC
|
global SUN_JAVAC
|
||||||
|
@ -61,7 +71,9 @@ proc bytecompile_file { file objdir {classpath {}} } {
|
||||||
if {$classpath != ""} then {
|
if {$classpath != ""} then {
|
||||||
set env(CLASSPATH) $classpath
|
set env(CLASSPATH) $classpath
|
||||||
}
|
}
|
||||||
if {[catch {system "cd $dirname; $SUN_JAVAC $file -d $objdir"} msg]} then {
|
if {[catch {
|
||||||
|
system "cd $dirname; $SUN_JAVAC $file -d $objdir 2>&1"
|
||||||
|
} msg]} then {
|
||||||
verbose "couldn't compile $file: $msg"
|
verbose "couldn't compile $file: $msg"
|
||||||
set r 0
|
set r 0
|
||||||
} else {
|
} else {
|
||||||
|
@ -270,20 +282,6 @@ proc libjava_arguments {{mode compile}} {
|
||||||
#
|
#
|
||||||
# Run the test specified by srcfile and resultfile. compile_args and
|
# Run the test specified by srcfile and resultfile. compile_args and
|
||||||
# exec_args are options telling this proc how to work.
|
# exec_args are options telling this proc how to work.
|
||||||
# `no-link' don't try to link the program
|
|
||||||
# `no-exec' don't try to run the test
|
|
||||||
# `xfail-gcj' compilation from source will fail
|
|
||||||
# `xfail-javac' compilation with javac will fail
|
|
||||||
# `xfail-gcjC' compilation with gcj -C will fail
|
|
||||||
# `shouldfail' compilation from source is supposed to fail
|
|
||||||
# This is different from xfail, which marks a known
|
|
||||||
# failure that we just havne't fixed.
|
|
||||||
# A compilation marked this way should fail with any
|
|
||||||
# front end.
|
|
||||||
# `xfail-byte' compilation from bytecode will fail
|
|
||||||
# `xfail-exec' exec will fail
|
|
||||||
# `xfail-output' output will be wrong
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
proc test_libjava_from_source { options srcfile compile_args inpfile resultfile exec_args } {
|
proc test_libjava_from_source { options srcfile compile_args inpfile resultfile exec_args } {
|
||||||
global base_dir
|
global base_dir
|
||||||
|
@ -333,7 +331,8 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile
|
||||||
set errname "$errname $compile_args"
|
set errname "$errname $compile_args"
|
||||||
}
|
}
|
||||||
|
|
||||||
set x [target_compile $srcfile "$executable" $target $args]
|
set x [prune_warnings \
|
||||||
|
[target_compile $srcfile "$executable" $target $args]]
|
||||||
if {[info exists opts(xfail-gcj)]} {
|
if {[info exists opts(xfail-gcj)]} {
|
||||||
setup_xfail *-*-*
|
setup_xfail *-*-*
|
||||||
}
|
}
|
||||||
|
@ -419,19 +418,6 @@ proc test_libjava_from_source { options srcfile compile_args inpfile resultfile
|
||||||
#
|
#
|
||||||
# Run the test specified by srcfile and resultfile. compile_args and
|
# Run the test specified by srcfile and resultfile. compile_args and
|
||||||
# exec_args are options telling this proc how to work.
|
# exec_args are options telling this proc how to work.
|
||||||
# `no-link' don't try to link the program
|
|
||||||
# `no-exec' don't try to run the test
|
|
||||||
# `xfail-gcj' compilation from source will fail
|
|
||||||
# `xfail-javac' compilation with javac will fail
|
|
||||||
# `xfail-gcjC' compilation with gcj -C will fail
|
|
||||||
# `shouldfail' compilation from source is supposed to fail
|
|
||||||
# This is different from xfail, which marks a known
|
|
||||||
# failure that we just havne't fixed.
|
|
||||||
# A compilation marked this way should fail with any
|
|
||||||
# front end.
|
|
||||||
# `xfail-byte' compilation from bytecode will fail
|
|
||||||
# `xfail-exec' exec will fail
|
|
||||||
# `xfail-output' output will be wrong
|
|
||||||
#
|
#
|
||||||
proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile exec_args } {
|
proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile exec_args } {
|
||||||
global base_dir
|
global base_dir
|
||||||
|
@ -488,12 +474,14 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
|
||||||
set jvscan [find_jvscan]
|
set jvscan [find_jvscan]
|
||||||
verbose "jvscan is $jvscan"
|
verbose "jvscan is $jvscan"
|
||||||
set main_name [string trim \
|
set main_name [string trim \
|
||||||
|
[prune_warnings \
|
||||||
[target_compile $srcfile "" none \
|
[target_compile $srcfile "" none \
|
||||||
"compiler=$jvscan additional_flags=--print-main"]]
|
"compiler=$jvscan additional_flags=--print-main"]]]
|
||||||
verbose "main name is $main_name"
|
verbose "main name is $main_name"
|
||||||
set class_out [string trim \
|
set class_out [string trim \
|
||||||
|
[prune_warnings \
|
||||||
[target_compile $srcfile "" none \
|
[target_compile $srcfile "" none \
|
||||||
"compiler=$jvscan additional_flags=--list-class"]]
|
"compiler=$jvscan additional_flags=--list-class"]]]
|
||||||
verbose "class list is $class_out"
|
verbose "class list is $class_out"
|
||||||
|
|
||||||
if {[string match "*parse error*" $main_name]
|
if {[string match "*parse error*" $main_name]
|
||||||
|
@ -559,13 +547,15 @@ proc test_libjava_from_javac { options srcfile compile_args inpfile resultfile e
|
||||||
if {$mode == "compile"} {
|
if {$mode == "compile"} {
|
||||||
foreach c_file $class_files {
|
foreach c_file $class_files {
|
||||||
set executable [file rootname [file tail $c_file]].o
|
set executable [file rootname [file tail $c_file]].o
|
||||||
set x [target_compile $c_file "$executable" $type $args]
|
set x [prune_warnings \
|
||||||
|
[target_compile $c_file "$executable" $type $args]]
|
||||||
if {$x != ""} {
|
if {$x != ""} {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
set x [target_compile $class_files "$executable" $type $args]
|
set x [prune_warnings \
|
||||||
|
[target_compile $class_files "$executable" $type $args]]
|
||||||
}
|
}
|
||||||
if {[info exists opts(xfail-byte)]} {
|
if {[info exists opts(xfail-byte)]} {
|
||||||
setup_xfail *-*-*
|
setup_xfail *-*-*
|
||||||
|
|
|
@ -11,8 +11,8 @@ foreach x $srcfiles {
|
||||||
}
|
}
|
||||||
lappend args no-exec
|
lappend args no-exec
|
||||||
|
|
||||||
test_libjava $options "$x" "" "" "" $args
|
test_libjava "" "$x" "" "" "" $args
|
||||||
test_libjava $options "$x" "-O" "" "" $args
|
test_libjava "" "$x" "-O" "" "" $args
|
||||||
}
|
}
|
||||||
|
|
||||||
# Local Variables:
|
# Local Variables:
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Copyright (C) 1998, 1999 Free Software Foundation.
|
# Copyright (C) 1998, 1999, 2000 Free Software Foundation.
|
||||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||||
# Incorporate Mauve into libjava's DejaGNU test suite framework.
|
# Incorporate Mauve into libjava's DejaGNU test suite framework.
|
||||||
|
|
||||||
|
@ -90,7 +90,9 @@ proc test_mauve {} {
|
||||||
# before they're installed.
|
# before they're installed.
|
||||||
set env(GCJ) "$GCJ_UNDER_TEST -B$objdir/../ -I$objdir/../libgcj.zip"
|
set env(GCJ) "$GCJ_UNDER_TEST -B$objdir/../ -I$objdir/../libgcj.zip"
|
||||||
|
|
||||||
if {[catch {system "$env(MAUVEDIR)/configure --with-gcj"} msg]} then {
|
if {[catch {
|
||||||
|
system "$env(MAUVEDIR)/configure --with-gcj 2>@ stdout"
|
||||||
|
} msg]} then {
|
||||||
fail "Mauve configure"
|
fail "Mauve configure"
|
||||||
verbose "configure failed with $msg"
|
verbose "configure failed with $msg"
|
||||||
return
|
return
|
||||||
|
@ -105,7 +107,9 @@ proc test_mauve {} {
|
||||||
puts -nonewline $fd $c
|
puts -nonewline $fd $c
|
||||||
close $fd
|
close $fd
|
||||||
|
|
||||||
if {[catch {system "make KEYS=libgcj classes.stamp"} msg]} then {
|
if {[catch {
|
||||||
|
system "make KEYS=libgcj classes.stamp 2>&1"
|
||||||
|
} msg]} then {
|
||||||
fail "Mauve build"
|
fail "Mauve build"
|
||||||
verbose "build failed with $msg"
|
verbose "build failed with $msg"
|
||||||
return
|
return
|
||||||
|
@ -132,7 +136,9 @@ proc test_mauve {} {
|
||||||
foreach base {DejaGNUTestHarness gnu/testlet/SimpleTestHarness gnu/testlet/TestHarness gnu/testlet/Testlet gnu/testlet/ResourceNotFoundException gnu/testlet/config} {
|
foreach base {DejaGNUTestHarness gnu/testlet/SimpleTestHarness gnu/testlet/TestHarness gnu/testlet/Testlet gnu/testlet/ResourceNotFoundException gnu/testlet/config} {
|
||||||
set file $base.class
|
set file $base.class
|
||||||
set obj $base.o
|
set obj $base.o
|
||||||
if {[target_compile [pwd]/$file $obj object $compile_args] != ""} then {
|
set x [prune_warnings \
|
||||||
|
[target_compile [pwd]/$file $obj object $compile_args]]
|
||||||
|
if {$x != ""} then {
|
||||||
fail "Compile $obj"
|
fail "Compile $obj"
|
||||||
set ok 0
|
set ok 0
|
||||||
} else {
|
} else {
|
||||||
|
@ -155,8 +161,9 @@ proc test_mauve {} {
|
||||||
if {! [file exists $obj]} then {
|
if {! [file exists $obj]} then {
|
||||||
verbose "compiling $obj for test of $class"
|
verbose "compiling $obj for test of $class"
|
||||||
set srcfile [file rootname $obj].class
|
set srcfile [file rootname $obj].class
|
||||||
if {[target_compile [pwd]/$srcfile $obj object $compile_args]
|
set x [prune_warnings \
|
||||||
!= ""} then {
|
[target_compile [pwd]/$srcfile $obj object $compile_args]]
|
||||||
|
if {$x != ""} then {
|
||||||
fail "Compile $obj for $class"
|
fail "Compile $obj for $class"
|
||||||
set ok 0
|
set ok 0
|
||||||
break
|
break
|
||||||
|
@ -168,8 +175,9 @@ proc test_mauve {} {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[target_compile [concat $uses($file) $objlist] \
|
set x [prune_warnings [target_compile [concat $uses($file) $objlist] \
|
||||||
$Executable executable $link_args] != ""} then {
|
$Executable executable $link_args]]
|
||||||
|
if {$x != ""} then {
|
||||||
fail "Link for $class"
|
fail "Link for $class"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -223,7 +231,9 @@ proc test_mauve_sim {} {
|
||||||
set full_srcdir [pwd]
|
set full_srcdir [pwd]
|
||||||
cd $here/mauve-build
|
cd $here/mauve-build
|
||||||
|
|
||||||
if {[catch {system "$env(MAUVEDIR)/configure --with-gcj"} msg]} then {
|
if {[catch {
|
||||||
|
system "$env(MAUVEDIR)/configure --with-gcj 2>&1"
|
||||||
|
} msg]} then {
|
||||||
fail "Mauve configure"
|
fail "Mauve configure"
|
||||||
verbose "configure failed with $msg"
|
verbose "configure failed with $msg"
|
||||||
return
|
return
|
||||||
|
@ -238,7 +248,9 @@ proc test_mauve_sim {} {
|
||||||
puts -nonewline $fd $c
|
puts -nonewline $fd $c
|
||||||
close $fd
|
close $fd
|
||||||
|
|
||||||
if {[catch {system "make KEYS=libgcj classes.stamp"} msg]} then {
|
if {[catch {
|
||||||
|
system "make KEYS=libgcj classes.stamp 2>&1"
|
||||||
|
} msg]} then {
|
||||||
fail "Mauve build"
|
fail "Mauve build"
|
||||||
verbose "build failed with $msg"
|
verbose "build failed with $msg"
|
||||||
return
|
return
|
||||||
|
@ -260,7 +272,9 @@ proc test_mauve_sim {} {
|
||||||
gnu/testlet/config} {
|
gnu/testlet/config} {
|
||||||
set file $base.class
|
set file $base.class
|
||||||
set obj $base.o
|
set obj $base.o
|
||||||
if {[target_compile [pwd]/$file $obj object $compile_args] != ""} then {
|
set x [prune_warnings \
|
||||||
|
[target_compile [pwd]/$file $obj object $compile_args]]
|
||||||
|
if {$x != ""} then {
|
||||||
fail "Compile $obj"
|
fail "Compile $obj"
|
||||||
set ok 0
|
set ok 0
|
||||||
} else {
|
} else {
|
||||||
|
@ -286,8 +300,9 @@ proc test_mauve_sim {} {
|
||||||
if {! [file exists $obj]} then {
|
if {! [file exists $obj]} then {
|
||||||
verbose "compiling $obj for test of $class"
|
verbose "compiling $obj for test of $class"
|
||||||
set srcfile [file rootname $obj].class
|
set srcfile [file rootname $obj].class
|
||||||
if {[target_compile [pwd]/$srcfile $obj object $compile_args]
|
set x [prune_warnings \
|
||||||
!= ""} then {
|
[target_compile [pwd]/$srcfile $obj object $compile_args]]
|
||||||
|
if {$x != ""} then {
|
||||||
fail "Compile $obj for $class"
|
fail "Compile $obj for $class"
|
||||||
set ok 0
|
set ok 0
|
||||||
break
|
break
|
||||||
|
@ -320,15 +335,17 @@ proc test_mauve_sim {} {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[target_compile gnu/testlet/DejaGNUTestHarness.class \
|
set x [prune_warnings \
|
||||||
gnu/testlet/DejaGNUTestHarness.o object $compile_args]
|
[target_compile gnu/testlet/DejaGNUTestHarness.class \
|
||||||
!= ""} then {
|
gnu/testlet/DejaGNUTestHarness.o object $compile_args]]
|
||||||
|
if {$x != ""} then {
|
||||||
fail "Compile DejaGNUTestHarness.java"
|
fail "Compile DejaGNUTestHarness.java"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if {[target_compile [concat $uses($file) $objlist] \
|
set x [prune_warnings [target_compile [concat $uses($file) $objlist] \
|
||||||
$Executable executable $link_args] != ""} then {
|
$Executable executable $link_args]]
|
||||||
|
if {$x != ""} then {
|
||||||
fail "Link for $class"
|
fail "Link for $class"
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue