︙ | | | ︙ | |
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
##########################################################################
proc pretty_print_key {key} {
set version [lindex $key 0]
set os [lindex $key 1]
set cpu [lindex $key 2]
switch -glob -- $version {
"cvs_HEAD" {
set version "from CVS HEAD"
}
"cvs_*" {
set tag [join [lrange [split $version _] 1 end] _]
set version "from CVS tag $tag"
}
default {
set version "version $version"
}
}
return "Tcl $version for [string totitle $os] on $cpu"
}
proc pretty_print_buildinfo {buildinfo} {
set desc [list]
foreach tag [list kitdll debug min static notk nomk4 statictk unthreaded threaded zip] {
if {[lsearch -exact $buildinfo $tag] != -1} {
switch -- $tag {
"kitdll" {
lappend desc "Built as a Library"
}
"min" {
lappend desc "Minimally Built"
}
|
|
|
|
>
>
>
>
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
##########################################################################
proc pretty_print_key {key} {
set version [lindex $key 0]
set os [lindex $key 1]
set cpu [lindex $key 2]
switch -glob -- $version {
"cvs_HEAD" - "fossil_trunk" {
set version "from Fossil trunk tip"
}
"cvs_*" {
set tag [join [lrange [split $version _] 1 end] _]
set version "from CVS tag $tag"
}
default {
set version "version $version"
}
}
return "Tcl $version for [string totitle $os] on $cpu"
}
proc pretty_print_buildinfo {buildinfo {rettype "desc"}} {
set desc [list]
set tags [list]
foreach tag [list kitdll debug min static notk nomk4 statictk unthreaded threaded zip] {
if {[lsearch -exact $buildinfo $tag] != -1} {
set pre_desc $desc
switch -- $tag {
"kitdll" {
lappend desc "Built as a Library"
}
"min" {
lappend desc "Minimally Built"
}
|
︙ | | | ︙ | |
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
"zip" {
lappend desc "Kit Filesystem in Zip"
}
"debug" {
lappend desc "With Symbols"
}
}
}
}
if {[llength $desc] == 0} {
return "Default Build"
}
return [join $desc {, }]
}
proc pretty_print_size {size} {
foreach unit [list "" K M G T P] {
if {$size < 1024} {
if {$size < 10 && $unit != ""} {
set size [expr {round($size * 10) / 10.0}]
|
>
>
>
>
>
>
|
>
>
>
>
>
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
"zip" {
lappend desc "Kit Filesystem in Zip"
}
"debug" {
lappend desc "With Symbols"
}
}
if {$desc != $pre_desc} {
lappend tags $tag
}
}
}
if {[llength $desc] == 0} {
return "Default Build"
}
switch -- $rettype {
"desc" {
return [join $desc {, }]
}
"tag" {
return $tags
}
}
}
proc pretty_print_size {size} {
foreach unit [list "" K M G T P] {
if {$size < 1024} {
if {$size < 10 && $unit != ""} {
set size [expr {round($size * 10) / 10.0}]
|
︙ | | | ︙ | |
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
##########################################################################
## MAIN BODY #############################################################
##########################################################################
file delete -force -- $WEBDIR
file mkdir $WEBDIR
set fd [open [file join $WEBDIR index.html] w]
file copy -force -- {*}[glob kits/*] $WEBDIR
set totaltests_count [llength [glob tests/*.tcl]]
foreach file [lsort -dictionary [glob -tails -directory $WEBDIR * failed/*]] {
set shortfile $file
|
|
>
>
>
|
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
##########################################################################
## MAIN BODY #############################################################
##########################################################################
file delete -force -- $WEBDIR
file mkdir $WEBDIR
set index_html_filename [file join $WEBDIR index.html]
set index_tcl_filename [file join $WEBDIR index.tcl]
set fd [open "${index_html_filename}.new" w]
file copy -force -- {*}[glob kits/*] $WEBDIR
set totaltests_count [llength [glob tests/*.tcl]]
foreach file [lsort -dictionary [glob -tails -directory $WEBDIR * failed/*]] {
set shortfile $file
|
︙ | | | ︙ | |
343
344
345
346
347
348
349
|
}
puts $fd " </table>"
puts $fd " <p>Generated on [clock format [clock seconds] -format {%Y%m%dT%H%M%SZ} -timezone :UTC]</p>"
puts $fd " </body>"
puts $fd "</html>"
close $fd
|
>
>
>
>
>
>
>
|
361
362
363
364
365
366
367
368
369
370
371
372
373
374
|
}
puts $fd " </table>"
puts $fd " <p>Generated on [clock format [clock seconds] -format {%Y%m%dT%H%M%SZ} -timezone :UTC]</p>"
puts $fd " </body>"
puts $fd "</html>"
close $fd
set tfd [open "${index_tcl_filename}.new" w]
puts $tfd [array get allkitinfo]
close $tfd
file rename -force -- "${index_html_filename}.new" $index_html_filename
file rename -force -- "${index_tcl_filename}.new" $index_tcl_filename
|