Overview
Comment: | Updated tests results page: Added legend Added header row for entire set Added new results "USABLE" and "NO TESTS" |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | e1afa417650057ac313ff3400e2bfcba0190ad47 |
User & Date: | rkeene on 2010-09-26 04:48:15 |
Other Links: | manifest | tags |
Context
2010-09-26
| ||
04:48 | Minor cleanup of diff check-in: 6992d94246 user: rkeene tags: trunk | |
04:48 | Updated tests results page: Added legend Added header row for entire set Added new results "USABLE" and "NO TESTS" check-in: e1afa41765 user: rkeene tags: trunk | |
04:48 | Updated to emit error message and abort if tests are unable to be run check-in: ede5eb67b8 user: rkeene tags: trunk | |
Changes
Modified build/test/publish-tests from [cd043e5464] to [ebc8777c64].
22 22 23 23 if {![file isdir "kits"]} { 24 24 puts stderr "Could not find kits/ directory, aborting." 25 25 26 26 exit 1 27 27 } 28 28 29 +# Define non-critical tests 29 30 set noncriticaltests [list "05-locale"] 30 31 32 +# Define legend 33 +set statusdata(ok) [list OK green "Software built successfully and passed all tests"] 34 +set statusdata(untested) [list "NO TESTS" yellow "Software built successfully but no tests were run"] 35 +set statusdata(non-critical) [list "USABLE" orange "Software built successfully and all tests were run, but some non-critical tests failed"] 36 +set statusdata(failed) [list "FAILED" red "Some critical tests failed or the software did not build"] 37 + 31 38 ########################################################################## 32 39 ## PROCEDURES ############################################################ 33 40 ########################################################################## 34 41 proc pretty_print_key {key} { 35 42 set version [lindex $key 0] 36 43 set os [lindex $key 1] 37 44 set cpu [lindex $key 2] ................................................................................ 175 182 puts $fd " </head>" 176 183 puts $fd " <body>" 177 184 puts $fd " <h1>KitCreator Build and Test Status</h1>" 178 185 puts $fd " <p>The following table represents the status of the test results from the KitCreator test suite.</p>" 179 186 puts $fd " <table cellpadding=\"2\" border=\"1\">" 180 187 foreach key [lsort -dictionary [array names allkitinfo]] { 181 188 puts $fd " <tr>" 182 - puts $fd " <th><u>Tclkit for [pretty_print_key $key]</u></th>" 189 + puts $fd " <th colspan=\"5\"><u>Tclkit for [pretty_print_key $key]</u></th>" 190 + puts $fd " </tr>" 191 + puts $fd " <tr>" 192 + puts $fd " <th>Kit Features</th>" 183 193 puts $fd " <th>Kit Size</th>" 184 194 puts $fd " <th>Status</th>" 185 195 puts $fd " <th>Log</th>" 186 196 puts $fd " <th>Failed Tests</th>" 187 197 puts $fd " </tr>" 188 198 foreach kitinfo_list $allkitinfo($key) { 189 199 puts $fd " <tr>" 190 200 unset -nocomplain kitinfo 191 201 array set kitinfo $kitinfo_list 192 202 193 203 if {[llength $kitinfo(failedtests)] == 0} { 194 - set status "OK" 195 - set bgcolor "green" 204 + set status ok 205 + 206 + # If we are cross-compiled, note that no tests were run 207 + if {[lsearch -exact $kitinfo(buildflags) xcompile] != -1} { 208 + set status untested 209 + } 196 210 } else { 197 - set status "FAILED" 198 - set bgcolor "yellow" 211 + set status non-critical 199 212 } 200 213 201 - if {[lsearch -exact $kitinfo(buildflags) xcompile] != -1} { 202 - set bgcolor "yellow" 203 - } 204 214 205 215 set failedtestshtml [list] 206 216 foreach test [lsort -dictionary $kitinfo(failedtests)] { 207 217 set testname [file rootname $test] 208 218 set testname [split $testname -] 209 219 210 220 for {set idx 0} {$idx < [llength $testname]} {incr idx} { ................................................................................ 219 229 } 220 230 221 231 break 222 232 } 223 233 } 224 234 225 235 if {[lsearch -exact $noncriticaltests $testname] == -1} { 226 - set bgcolor "red" 236 + set status failed 227 237 } 228 238 229 239 if {$loglink} { 230 240 lappend failedtestshtml "<small><a href=\"$test\">$testname</a></small>" 231 241 } else { 232 242 lappend failedtestshtml "<small>$testname</small>" 233 243 } 234 244 } 235 245 246 + set statusinfo $statusdata($status) 247 + set statustext [lindex $statusinfo 0] 248 + set bgcolor [lindex $statusinfo 1] 249 + 236 250 set kitdesc [pretty_print_buildinfo $kitinfo(buildflags)] 237 251 if {$kitinfo(built)} { 238 252 puts $fd " <td><a href=\"$kitinfo(file)\">$kitdesc</a></td>" 239 253 } else { 240 254 puts $fd " <td>$kitdesc</td>" 241 255 } 242 256 puts $fd " <td>[pretty_print_size [file size [file join $WEBDIR $kitinfo(fullfile)]]]</td>" 243 - puts $fd " <td bgcolor=\"$bgcolor\">$status</td>" 257 + puts $fd " <td bgcolor=\"$bgcolor\">$statustext</td>" 244 258 puts $fd " <td><small><a href=\"$kitinfo(buildfile)\">([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])</a></small></td>" 245 259 puts $fd " <td>[join $failedtestshtml {, }]</td>" 246 260 puts $fd " </tr>" 247 261 } 248 262 263 +} 264 +puts $fd " </table>" 265 +puts $fd " <table cellpadding=\"2\" border=\"1\">" 266 +puts $fd " <tr>" 267 +puts $fd " <th colspan=\"2\"><small>Legend</small></th>" 268 +puts $fd " </tr>" 269 +foreach status [list ok untested non-critical failed] { 270 + set statusinfo $statusdata($status) 271 + set statustext [lindex $statusinfo 0] 272 + set bgcolor [lindex $statusinfo 1] 273 + set statusdetail [lindex $statusinfo 2] 274 + 275 + puts $fd " <tr>" 276 + puts $fd " <td bgcolor=\"$bgcolor\"><small>$statustext</small></td>" 277 + puts $fd " <td><small>$statusdetail</small></td>" 278 + puts $fd " </tr>" 249 279 } 250 280 puts $fd " </table>" 251 281 puts $fd " <p>Generated on [clock format [clock seconds]]</p>" 252 282 puts $fd " </body>" 253 283 puts $fd "</html>" 254 284 255 285 close $fd