1 # Tests for class verifier.
3 global gcj_verify_xfail
4 set {gcj_verify_xfail(gij verify of call.fail.Static)} 1
5 set {gcj_verify_xfail(gij verify of simple.fail.dupfield)} 1
6 set {gcj_verify_xfail(gij verify of simple.fail.dupinterface)} 1
7 set {gcj_verify_xfail(gij verify of simple.fail.dupmethod)} 1
8 set {gcj_verify_xfail(gij verify of subr.fail.jsr10)} 1
9 set {gcj_verify_xfail(gij verify of subr.fail.jsr8)} 1
12 proc gcj_verify_list_tests {srcdir} {
14 if {[file exists $srcdir]} {
17 foreach item [lsort [glob -nocomplain */*/*.class]] {
18 lappend result [file rootname $item]
25 proc gcj_verify_test_gij {gij srcdir test shouldfail} {
26 global gcj_verify_xfail
28 set testname "gij verify of $test"
29 verbose "invoking gij $test - shouldfail=$shouldfail"
30 set result [libjava_load $gij [list --cp $srcdir $test] ""]
31 set status [lindex $result 0]
32 set output [lindex $result 1]
35 # We match the few exceptions that are allowed. This may need
36 # updating from time to time. We do this rather than check the
37 # exit status because we want to catch the case where gij dies in
38 # some inappropriate way.
39 if {[string match *VerifyError* $output]
40 || [string match *AbstractMethodError* $output]
41 || [string match *IncompatibleClassChangeError* $output]} {
46 if {[info exists gcj_verify_xfail($testname)]} {
50 if {$status == "pass"} {
59 proc gcj_verify_run {} {
60 global INTERPRETER srcdir
62 set gij [libjava_find_gij]
64 # libjava_find_gij will return "" if it couldn't find the
65 # program; in this case we want to skip the test.
66 if {$INTERPRETER != "yes" || $gij == ""} {
70 set testsdir $srcdir/libjava.verify/verify
71 foreach test [gcj_verify_list_tests $testsdir] {
72 set shouldfail [string match */fail/* $test]
75 regsub -all -- / $test . gijname
76 gcj_verify_test_gij $gij $testsdir $gijname $shouldfail
79 # FIXME: run gcj --syntax-only here.