Diff

Differences From Artifact [ebc8777c64]:

To Artifact [a10ea41136]:


136
137
138
139
140
141
142


143





















144
145
146
147
148

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

169
170
171
172
173
174
175
136
137
138
139
140
141
142
143
144

145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199







+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+





+




















+







		"*.log" - "*.ttml" - "*.html" - "*.desc" {
			continue
		}
	}

	# Derive what we can from the filename
	set buildfile "${shortfile}-build.log"

	# Determine which tests passed/failed
	set failedtests [glob -nocomplain -tails -directory $WEBDIR "${shortfile}-\[0-9\]\[0-9\]-*.log"]
	set failedtests [list]
	set passedtests [list]
	set testsfile "${file}-tests.log"
	if {[file exists $testsfile]} {
		set testfd [open $testsfile r]
		foreach line [split [read $testfd] \n] {
			set work [split $line :]
			set test [string trim [lindex $work 0]]
			set result [string trim [lindex $work 1]]

			switch -- $result {
				"PASS" {
					lappend passedtests "${shortfile}-${test}.log"
				}
				"FAIL" {
					lappend failedtests "${shortfile}-${test}.log"
				}
			}
		}
		close $testfd
	}

	# If this kit represents a failed build, set the failed tests to that
	set kitbuilt 1
	if {[file tail [file dirname $file]] == "failed"} {
		set failedtests [list "${shortfile}-XX-build.log"]
		set passedtests [list]
		set kitbuilt 0
	}

	## Split the filename into parts and store each part
	unset -nocomplain kitos kitcpu
	set kitbuildinfo [split $shortfile -]
	set tclversion [lindex $kitbuildinfo 1]
	set kitos [lindex $kitbuildinfo 2]
	set kitcpu [lindex $kitbuildinfo 3]

	### Store the remainder as a list of tags
	set kitbuildinfo [lsort -dictionary [lrange $kitbuildinfo 4 end]]

	# Generate array to describe this kit
	unset -nocomplain kitinfo
	set kitinfo(version) $tclversion
	set kitinfo(file) $shortfile
	set kitinfo(fullfile) $file
	set kitinfo(buildfile) $buildfile
	set kitinfo(failedtests) $failedtests
	set kitinfo(passedtests) $passedtests
	set kitinfo(buildflags) $kitbuildinfo
	set kitinfo(os) $kitos
	set kitinfo(cpu) $kitcpu
	set kitinfo(built) $kitbuilt

	# Store kit information with all kits
	set key [list $tclversion $kitos $kitcpu]
200
201
202
203
204
205
206
207

208
209
210
211
212
213
214
224
225
226
227
228
229
230

231
232
233
234
235
236
237
238







-
+







		unset -nocomplain kitinfo
		array set kitinfo $kitinfo_list

		if {[llength $kitinfo(failedtests)] == 0} {
			set status ok

			# If we are cross-compiled, note that no tests were run
			if {[lsearch -exact $kitinfo(buildflags) xcompile] != -1} {
			if {[llength $kitinfo(passedtests)] == 0} {
				set status untested
			}
		} else {
			set status non-critical
		}