Index: build/test/publish-tests ================================================================== --- build/test/publish-tests +++ build/test/publish-tests @@ -24,12 +24,19 @@ puts stderr "Could not find kits/ directory, aborting." exit 1 } +# Define non-critical tests set noncriticaltests [list "05-locale"] +# Define legend +set statusdata(ok) [list OK green "Software built successfully and passed all tests"] +set statusdata(untested) [list "NO TESTS" yellow "Software built successfully but no tests were run"] +set statusdata(non-critical) [list "USABLE" orange "Software built successfully and all tests were run, but some non-critical tests failed"] +set statusdata(failed) [list "FAILED" red "Some critical tests failed or the software did not build"] + ########################################################################## ## PROCEDURES ############################################################ ########################################################################## proc pretty_print_key {key} { set version [lindex $key 0] @@ -177,11 +184,14 @@ puts $fd "

KitCreator Build and Test Status

" puts $fd "

The following table represents the status of the test results from the KitCreator test suite.

" puts $fd " " foreach key [lsort -dictionary [array names allkitinfo]] { puts $fd " " - puts $fd " " + puts $fd " " + puts $fd " " + puts $fd " " + puts $fd " " puts $fd " " puts $fd " " puts $fd " " puts $fd " " puts $fd " " @@ -189,20 +199,20 @@ puts $fd " " unset -nocomplain kitinfo array set kitinfo $kitinfo_list if {[llength $kitinfo(failedtests)] == 0} { - set status "OK" - set bgcolor "green" + set status ok + + # If we are cross-compiled, note that no tests were run + if {[lsearch -exact $kitinfo(buildflags) xcompile] != -1} { + set status untested + } } else { - set status "FAILED" - set bgcolor "yellow" + set status non-critical } - if {[lsearch -exact $kitinfo(buildflags) xcompile] != -1} { - set bgcolor "yellow" - } set failedtestshtml [list] foreach test [lsort -dictionary $kitinfo(failedtests)] { set testname [file rootname $test] set testname [split $testname -] @@ -221,35 +231,55 @@ break } } if {[lsearch -exact $noncriticaltests $testname] == -1} { - set bgcolor "red" + set status failed } if {$loglink} { lappend failedtestshtml "$testname" } else { lappend failedtestshtml "$testname" } } + set statusinfo $statusdata($status) + set statustext [lindex $statusinfo 0] + set bgcolor [lindex $statusinfo 1] + set kitdesc [pretty_print_buildinfo $kitinfo(buildflags)] if {$kitinfo(built)} { puts $fd " " } else { puts $fd " " } puts $fd " " - puts $fd " " + puts $fd " " puts $fd " " puts $fd " " puts $fd " " } +} +puts $fd "
Tclkit for [pretty_print_key $key]Tclkit for [pretty_print_key $key]
Kit FeaturesKit SizeStatusLogFailed Tests
$kitdesc$kitdesc[pretty_print_size [file size [file join $WEBDIR $kitinfo(fullfile)]]]$status$statustext([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])[join $failedtestshtml {, }]
" +puts $fd " " +puts $fd " " +puts $fd " " +puts $fd " " +foreach status [list ok untested non-critical failed] { + set statusinfo $statusdata($status) + set statustext [lindex $statusinfo 0] + set bgcolor [lindex $statusinfo 1] + set statusdetail [lindex $statusinfo 2] + + puts $fd " " + puts $fd " " + puts $fd " " + puts $fd " " } puts $fd "
Legend
$statustext$statusdetail
" puts $fd "

Generated on [clock format [clock seconds]]

" puts $fd " " puts $fd "" close $fd