Check-in [f8d3a24687]
Overview
Comment:Updated to list failed builds in published reports
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f8d3a24687226cb18595c068b722ec1f168d602c
User & Date: rkeene on 2010-09-26 04:47:25
Other Links: manifest | tags
Context
2010-09-26
04:47
Updated to fix display problem with file sizes check-in: 498cc90308 user: rkeene tags: trunk
04:47
Updated to list failed builds in published reports check-in: f8d3a24687 user: rkeene tags: trunk
04:47
Updated to require version argument to publish-tests script check-in: 7ce18d465b user: rkeene tags: trunk
Changes

Modified build/test/publish-tests from [1084c25e06] to [137a0321be].

   114    114   
   115    115   set fd [open [file join $WEBDIR index.html] w]
   116    116   
   117    117   file copy -force -- {*}[glob kits/*] $WEBDIR
   118    118   
   119    119   set totaltests_count [llength [glob tests/*.tcl]]
   120    120   
   121         -foreach file [lsort -dictionary [glob -directory $WEBDIR *]] {
          121  +foreach file [lsort -dictionary [glob -tails -directory $WEBDIR * failed/*]] {
          122  +	set shortfile $file
          123  +	set file [file join $WEBDIR $file]
   122    124   	if {[file isdirectory $file]} {
   123    125   		continue
   124    126   	}
   125    127   
   126    128   	switch -glob -- $file {
   127    129   		"*.log" - "*.ttml" - "*.html" - "*.desc" {
   128    130   			continue
   129    131   		}
   130    132   	}
   131    133   
   132    134   	# Derive what we can from the filename
   133         -	set shortfile [file tail $file]
   134    135   	set buildfile "${shortfile}-build.log"
   135    136   	set failedtests [glob -nocomplain -tails -directory $WEBDIR "${shortfile}-\[0-9\]\[0-9\]-*.log"]
          137  +
          138  +	# If this kit represents a failed build, set the failed tests to that
          139  +	set kitbuilt 1
          140  +	if {[file tail [file dirname $file]] == "failed"} {
          141  +		set failedtests [list "${shortfile}-XX-build.log"]
          142  +		set kitbuilt 0
          143  +	}
   136    144   
   137    145   	## Split the filename into parts and store each part
   138    146   	set kitbuildinfo [split $shortfile -]
   139    147   	set tclversion [lindex $kitbuildinfo 1]
   140    148   	set kitbuildinfo [lsort -dictionary [lrange $kitbuildinfo 2 end]]
   141    149   
   142    150   	## Determine Kit OS from random file names
................................................................................
   161    169   		set kitcpu [string tolower $tcl_platform(machine)]
   162    170   	}
   163    171   
   164    172   	# Generate array to describe this kit
   165    173   	unset -nocomplain kitinfo
   166    174   	set kitinfo(version) $tclversion
   167    175   	set kitinfo(file) $shortfile
          176  +	set kitinfo(fullfile) $file
   168    177   	set kitinfo(buildfile) $buildfile
   169    178   	set kitinfo(failedtests) $failedtests
   170    179   	set kitinfo(buildflags) $kitbuildinfo
   171    180   	set kitinfo(os) $kitos
   172    181   	set kitinfo(cpu) $kitcpu
          182  +	set kitinfo(built) $kitbuilt
   173    183   
   174    184   	# Store kit information with all kits
   175    185   	set key [list $tclversion $kitos $kitcpu]
   176    186   	lappend allkitinfo($key) [array get kitinfo]
   177    187   }
   178    188   
   179    189   puts $fd "<html>"
................................................................................
   208    218   		set failedtestshtml [list]
   209    219   		foreach test [lsort -dictionary $kitinfo(failedtests)] {
   210    220   			set testname [file rootname $test]
   211    221   			set testname [split $testname -]
   212    222   
   213    223   			for {set idx 0} {$idx < [llength $testname]} {incr idx} {
   214    224   				set val [lindex $testname $idx]
   215         -				if {[string match {[0-9][0-9]} $val]} {
          225  +				if {[string match {[0-9X][0-9X]} $val]} {
   216    226   					set testname [join [lrange $testname $idx end] -]
          227  +
          228  +					set loglink 1
          229  +					if {[lindex [split $testname -] 0] == "XX"} {
          230  +						set testname [join [lrange [split $testname -] 1 end] -]
          231  +						set loglink 0
          232  +					}
   217    233   
   218    234   					break
   219    235   				}
   220    236   			}
   221    237   
   222    238   			if {[lsearch -exact $noncriticaltests $testname] == -1} {
   223    239   				set bgcolor "red"
   224    240   			}
   225    241   
   226         -			lappend failedtestshtml "<small><a href=\"$test\">$testname</a></small>"
          242  +			if {$loglink} {
          243  +				lappend failedtestshtml "<small><a href=\"$test\">$testname</a></small>"
          244  +			} else {
          245  +				lappend failedtestshtml "<small>$testname</small>"
          246  +			}
   227    247   		}
   228    248   
   229    249   
   230         -		puts $fd "        <td><a href=\"$kitinfo(file)\">[pretty_print_buildinfo $kitinfo(buildflags)]</a></td>"
   231         -		puts $fd "        <td>[pretty_print_size [file size [file join $WEBDIR $kitinfo(file)]]]</td>"
          250  +		set kitdesc [pretty_print_buildinfo $kitinfo(buildflags)]
          251  +		if {$kitinfo(built)} {
          252  +			puts $fd "        <td><a href=\"$kitinfo(file)\">$kitdesc</a></td>"
          253  +		} else {
          254  +			puts $fd "        <td>$kitdesc</td>"
          255  +		}
          256  +		puts $fd "        <td>[pretty_print_size [file size [file join $WEBDIR $kitinfo(fullfile)]]]</td>"
   232    257   		puts $fd "        <td bgcolor=\"$bgcolor\">$status</td>"
   233    258   		puts $fd "        <td><small><a href=\"$kitinfo(buildfile)\">([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])</a></small></td>"
   234    259   		puts $fd "        <td>[join $failedtestshtml {, }]</td>"
   235    260   		puts $fd "      </tr>"
   236    261   	}
   237    262   
   238    263   }
   239    264   puts $fd "    </table>"
   240    265   puts $fd "    <p>Generated on [clock format [clock seconds]]</p>"
   241    266   puts $fd "  </body>"
   242    267   puts $fd "</html>"
   243    268   
   244    269   close $fd