Diff

Differences From Artifact [b70c6b112e]:

To Artifact [343dd2d6d2]:


68
69
70
71
72
73
74






75
76
77
78
79
80
81
82
83
84
85

	return [join $desc {, }]
}

proc pretty_print_size {size} {
	foreach unit [list "" K M G T P] {
		if {$size < 1024} {






			return "$size [string trim ${unit}B]"
		}

		set size [expr {${size} / 1024}]
	}
}

##########################################################################
## MAIN BODY #############################################################
##########################################################################








>
>
>
>
>
>



|







68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

	return [join $desc {, }]
}

proc pretty_print_size {size} {
	foreach unit [list "" K M G T P] {
		if {$size < 1024} {
			if {$size < 10} {
				set size [expr {round($size * 10) / 10.0}]
			} else {
				set size [expr {round($size)}]
			}

			return "$size [string trim ${unit}B]"
		}

		set size [expr {${size} / 1024.000}]
	}
}

##########################################################################
## MAIN BODY #############################################################
##########################################################################

155
156
157
158
159
160
161

162
163
164
165
166
167
168
puts $fd "    <title>KitCreator Build Status</title>"
puts $fd "  </head>"
puts $fd "  <body>"
puts $fd "    <table cellpadding=\"2\" border=\"1\">"
foreach key [lsort -dictionary [array names allkitinfo]] {
	puts $fd "      <tr>"
	puts $fd "        <th><u>Tclkit for [pretty_print_key $key]</u></th>"

	puts $fd "        <th>Status</th>"
	puts $fd "        <th>Log</th>"
	puts $fd "        <th>Failed Tests</th>"
	puts $fd "      </tr>"
	foreach kitinfo_list $allkitinfo($key) {
		puts $fd "      <tr>"
		unset -nocomplain kitinfo







>







161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
puts $fd "    <title>KitCreator Build Status</title>"
puts $fd "  </head>"
puts $fd "  <body>"
puts $fd "    <table cellpadding=\"2\" border=\"1\">"
foreach key [lsort -dictionary [array names allkitinfo]] {
	puts $fd "      <tr>"
	puts $fd "        <th><u>Tclkit for [pretty_print_key $key]</u></th>"
	puts $fd "        <th>Kit Size</th>"
	puts $fd "        <th>Status</th>"
	puts $fd "        <th>Log</th>"
	puts $fd "        <th>Failed Tests</th>"
	puts $fd "      </tr>"
	foreach kitinfo_list $allkitinfo($key) {
		puts $fd "      <tr>"
		unset -nocomplain kitinfo
195
196
197
198
199
200
201

202
203
204
205
206
207
208
209
210
211
212
213
			}

			lappend failedtestshtml "<small><a href=\"$test\">$testname</a></small>"
		}


		puts $fd "        <td><a href=\"$kitinfo(file)\">[pretty_print_buildinfo $kitinfo(buildflags)]</a></td>"

		puts $fd "        <td bgcolor=\"$bgcolor\">$status</td>"
		puts $fd "        <td><small><a href=\"$kitinfo(buildfile)\">([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])</a></small></td>"
		puts $fd "        <td>[join $failedtestshtml {, }]</td>"
		puts $fd "      </tr>"
	}

}
puts $fd "    </table>"
puts $fd "  </body>"
puts $fd "</html>"

close $fd







>












202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
			}

			lappend failedtestshtml "<small><a href=\"$test\">$testname</a></small>"
		}


		puts $fd "        <td><a href=\"$kitinfo(file)\">[pretty_print_buildinfo $kitinfo(buildflags)]</a></td>"
		puts $fd "        <td>[pretty_print_size [file size [file join $WEBDIR $kitinfo(file)]]]</td>"
		puts $fd "        <td bgcolor=\"$bgcolor\">$status</td>"
		puts $fd "        <td><small><a href=\"$kitinfo(buildfile)\">([pretty_print_size [file size [file join $WEBDIR $kitinfo(buildfile)]]])</a></small></td>"
		puts $fd "        <td>[join $failedtestshtml {, }]</td>"
		puts $fd "      </tr>"
	}

}
puts $fd "    </table>"
puts $fd "  </body>"
puts $fd "</html>"

close $fd