Bump pillow to 10.2.0 (dependabot, see #5)
[ci.git] / hbuild / web / report.xsl
blobe49147b9ce11fce03209312952e20afb9cb255f4
1 <!--
2 - Copyright (c) 2017 Vojtech Horky
3 - All rights reserved.
5 - Redistribution and use in source and binary forms, with or without
6 - modification, are permitted provided that the following conditions
7 - are met:
9 - - Redistributions of source code must retain the above copyright
10 - notice, this list of conditions and the following disclaimer.
11 - - Redistributions in binary form must reproduce the above copyright
12 - notice, this list of conditions and the following disclaimer in the
13 - documentation and/or other materials provided with the distribution.
14 - - The name of the author may not be used to endorse or promote products
15 - derived from this software without specific prior written permission.
17 - THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 - IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 - OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 - IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 - DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 -->
28 <xsl:stylesheet version="1.0"
29 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
30 xmlns="http://www.w3.org/1999/xhtml">
32 <xsl:import href="common.xsl" />
34 <xsl:output
35 method="xml"
36 indent="yes"
37 omit-xml-declaration="yes"
38 doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
39 doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
42 <xsl:key name="by-arch" match="/build/*" use="@arch" />
43 <xsl:key name="by-harbour" match="/build/*" use="@package" />
44 <xsl:key name="by-scenario" match="/build/*" use="@scenario" />
46 <xsl:variable name="LINK_TO_TOP">
47 <span class="back-to-top"><a href="#top-of-page">(back to top)</a></span>
48 </xsl:variable>
51 <xsl:template match="build">
52 <xsl:variable name="BUILD" select="." />
53 <xsl:call-template name="HTML_PAGE">
54 <xsl:with-param name="TITLE">
55 <xsl:text>HelenOS CI (build </xsl:text>
56 <xsl:value-of select="@number" />
57 <xsl:text>)</xsl:text>
58 </xsl:with-param>
59 <xsl:with-param name="EXTRA_HEAD">
60 <script type="text/javascript" language="JavaScript">
61 $( document ).ready(function() {
62 $(".logdump").hide();
63 });
64 function showHideLog(link, target) {
65 target = $(link).parents("table").find("." + target)
66 if (target.is(":hidden")) {
67 target.show();
68 $(link).text("hide");
69 } else {
70 target.hide();
71 $(link).text("tail");
73 return false;
75 </script>
76 </xsl:with-param>
77 <xsl:with-param name="BODY">
78 <div id="centeredd">
80 <h1 id="top-of-page">HelenOS continuous integration testing</h1>
81 <h2 id="build-info">
82 Build <xsl:value-of select="@number" /> from <xsl:value-of select="buildinfo/@started" />
83 (<xsl:apply-templates select="buildinfo" mode="duration" />)
84 </h2>
85 <div id="summary">
86 <h2>Summary results</h2>
87 <xsl:apply-templates select="." mode="html-summary-table" />
88 </div>
90 <div id="quick-links" class="buttonset">
91 <h2>Quick links</h2>
93 <div class="quick-link-group">
94 <h3>Miscellaneous</h3>
95 <ul>
96 <li><a href="#buildinfo">Build details</a></li>
97 <li><a href="#matrix">Summary matrix</a></li>
98 <li><a href="#failures">List of failed tasks</a></li>
99 <xsl:if test="helenos-build">
100 <li><a href="#helenos">HelenOS</a></li>
101 </xsl:if>
102 </ul>
103 </div>
105 <xsl:if test="count(*[@arch]) &gt; 0">
106 <div class="quick-link-group">
107 <h3>Architectures</h3>
108 <ul>
109 <xsl:for-each select="*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
110 <xsl:sort select="@arch" />
111 <xsl:variable name="ARCH" select="@arch" />
112 <li><a href="#arch-{$ARCH}"><xsl:value-of select="$ARCH" /></a></li>
113 </xsl:for-each>
114 </ul>
115 </div>
116 </xsl:if>
118 <xsl:if test="count(*[@package]) &gt; 0">
119 <div class="quick-link-group">
120 <h3>Harbours</h3>
121 <ul>
122 <xsl:for-each select="*[@package and count(. | key('by-harbour', @package)[parent::build = $BUILD][1]) = 1]">
123 <xsl:sort select="@package" />
124 <xsl:variable name="PKG" select="@package" />
125 <li><a href="#harbour-{$PKG}"><xsl:value-of select="$PKG" /></a></li>
126 </xsl:for-each>
127 </ul>
128 </div>
129 </xsl:if>
131 <xsl:if test="count(*[@scenario]) &gt; 0">
132 <div class="quick-link-group">
133 <h3>Testing scenarios</h3>
134 <ul>
135 <xsl:for-each select="*[@scenario and count(. | key('by-scenario', @scenario)[parent::build = $BUILD][1]) = 1]">
136 <xsl:sort select="@description" />
137 <xsl:variable name="SCENARIO" select="@scenario" />
138 <li><a href="#scenario-{$SCENARIO}"><xsl:value-of select="@description" /></a></li>
139 </xsl:for-each>
140 </ul>
141 </div>
142 </xsl:if>
144 </div>
146 <h2 id="buildinfo">Build details<xsl:copy-of select="$LINK_TO_TOP" /></h2>
147 <table style="width: 60%">
148 <thead>
149 <tr>
150 <th width="50%">Key</th>
151 <th width="50%">Value</th>
152 </tr>
153 </thead>
154 <tbody>
155 <tr class="result-ok">
156 <td>Build number</td>
157 <td><xsl:value-of select="/build/@number" /></td>
158 </tr>
159 <tr class="result-ok">
160 <td>Build start time</td>
161 <td><xsl:value-of select="buildinfo/@started" /></td>
162 </tr>
163 <tr class="result-ok">
164 <td>Build duration</td>
165 <td><xsl:apply-templates select="buildinfo" mode="duration" /></td>
166 </tr>
167 <tr class="result-ok">
168 <td>Build parallelism level</td>
169 <td><xsl:value-of select="buildinfo/@parallelism" /></td>
170 </tr>
171 <xsl:for-each select="checkout[@alias!='']">
172 <xsl:sort select="alias" />
173 <tr class="result-ok">
174 <td>Repository <i><xsl:value-of select="@alias" /></i> version</td>
175 <td><xsl:value-of select="@revision" /></td>
176 </tr>
177 </xsl:for-each>
178 </tbody>
179 </table>
181 <h2 id="matrix">Summary matrix<xsl:copy-of select="$LINK_TO_TOP" /></h2>
182 <table class="matrix">
183 <thead>
184 <tr>
185 <th></th>
186 <xsl:for-each select="*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
187 <xsl:sort select="@arch" />
188 <th>
189 <a href="#arch-{@arch}">
190 <xsl:apply-templates select="@arch" mode="architecture-with-hyphens" />
191 </a>
192 </th>
193 </xsl:for-each>
194 </tr>
195 </thead>
196 <tbody>
197 <tr>
198 <th>
199 <a href="#helenos">HelenOS</a>
200 </th>
201 <xsl:for-each select="*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
202 <xsl:sort select="@arch" />
203 <xsl:variable name="ARCH" select="@arch" />
204 <xsl:variable name="RESULT" select="//helenos-build[@arch=$ARCH]" />
205 <td class="result-{$RESULT/@result}"><xsl:apply-templates select="$RESULT" mode="log-link-matrix" /></td>
206 </xsl:for-each>
207 </tr>
208 <xsl:for-each select="*[@package and count(. | key('by-harbour', @package)[parent::build = $BUILD][1]) = 1]">
209 <xsl:sort select="@package" />
210 <xsl:variable name="PKG" select="@package" />
211 <tr>
212 <th>
213 <a href="#harbour-{$PKG}">
214 <xsl:value-of select="$PKG" />
215 </a>
216 </th>
217 <xsl:for-each select="//*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
218 <xsl:sort select="@arch" />
219 <xsl:variable name="ARCH" select="@arch" />
220 <xsl:variable name="RESULT" select="//harbour-build[@arch=$ARCH and @package=$PKG]" />
221 <xsl:choose>
222 <xsl:when test="$RESULT">
223 <td class="result-{$RESULT/@result}"><xsl:apply-templates select="$RESULT" mode="log-link-matrix" /></td>
224 </xsl:when>
225 <xsl:otherwise>
226 <td class="result-na">N/A</td>
227 </xsl:otherwise>
228 </xsl:choose>
229 </xsl:for-each>
230 </tr>
231 </xsl:for-each>
232 <xsl:for-each select="*[@scenario and count(. | key('by-scenario', @scenario)[parent::build = $BUILD][1]) = 1]">
233 <xsl:sort select="@description" />
234 <xsl:variable name="SCENARIO" select="@scenario" />
235 <tr>
236 <th style="white-space: nowrap;">
237 <a title="{$SCENARIO}" href="#scenario-{$SCENARIO}">
238 <xsl:value-of select="@description" />
239 </a>
240 </th>
241 <xsl:for-each select="//*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
242 <xsl:sort select="@arch" />
243 <xsl:variable name="ARCH" select="@arch" />
244 <xsl:variable name="RESULT" select="//test[@arch=$ARCH and @scenario=$SCENARIO]" />
245 <xsl:choose>
246 <xsl:when test="$RESULT">
247 <td class="result-{$RESULT/@result}"><xsl:apply-templates select="$RESULT" mode="log-link-matrix" /></td>
248 </xsl:when>
249 <xsl:otherwise>
250 <td class="result-na">N/A</td>
251 </xsl:otherwise>
252 </xsl:choose>
253 </xsl:for-each>
254 </tr>
255 </xsl:for-each>
256 </tbody>
257 </table>
259 <h2>Miscellaneous</h2>
260 <h3 id="failures">List of failed tasks <xsl:copy-of select="$LINK_TO_TOP" /></h3>
261 <xsl:choose>
262 <xsl:when test="count(*[@result='fail']) = 0">
263 <p>There were no failures.</p>
264 </xsl:when>
265 <xsl:otherwise>
266 <table>
267 <thead>
268 <tr>
269 <th width="25%">Task</th>
270 <th width="25%">Component</th>
271 <th width="20%">Architecture</th>
272 <th width="20%">Log</th>
273 <th width="10%">Duration</th>
274 </tr>
275 </thead>
276 <tbody>
277 <xsl:for-each select="checkout[@result='fail']">
278 <xsl:sort select="@repository" />
279 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
280 </xsl:for-each>
281 <xsl:apply-templates select="harbour-check[@result='fail']" mode="html-failed-task-table-row" />
282 <xsl:for-each select="helenos-build[@result='fail']">
283 <xsl:sort select="@arch" />
284 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
285 </xsl:for-each>
286 <xsl:for-each select="harbour-fetch[@result='fail']">
287 <xsl:sort select="@package" />
288 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
289 </xsl:for-each>
290 <xsl:for-each select="harbour-build[@result='fail']">
291 <xsl:sort select="@package" />
292 <xsl:sort select="@arch" />
293 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
294 </xsl:for-each>
295 <xsl:for-each select="helenos-extra-build[@result='fail']">
296 <xsl:sort select="@arch" />
297 <xsl:sort select="@packages" />
298 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
299 </xsl:for-each>
300 <xsl:for-each select="test[@result='fail']">
301 <xsl:sort select="@description" />
302 <xsl:sort select="@arch" />
303 <xsl:apply-templates select="." mode="html-failed-task-table-row" />
304 </xsl:for-each>
305 <!-- xsl:apply-templates select="*[@result='fail']" mode="html-failed-task-table-row" /-->
306 </tbody>
307 </table>
308 </xsl:otherwise>
309 </xsl:choose>
311 <xsl:if test="helenos-build or browsable-sources-global or doxygen or style-check">
312 <h3 id="helenos">HelenOS <xsl:copy-of select="$LINK_TO_TOP" /></h3>
313 <table>
314 <thead>
315 <tr>
316 <th width="25%">Architecture</th>
317 <th width="10%">Result</th>
318 <th width="35%">Download</th>
319 <th width="20%">Log</th>
320 <th width="10%">Duration</th>
321 </tr>
322 </thead>
323 <tbody>
324 <xsl:if test="doxygen">
325 <tr class="result-{doxygen/@result}">
326 <td>
327 <i>Doxygen documentation</i>
328 </td>
329 <td>
330 <xsl:apply-templates select="doxygen" mode="yes-no" />
331 </td>
332 <td>
333 <xsl:apply-templates select="doxygen" mode="download" />
334 </td>
335 <td>
336 <xsl:apply-templates select="doxygen" mode="log-link" />
337 </td>
338 <td>
339 <xsl:apply-templates select="doxygen" mode="duration" />
340 </td>
341 </tr>
342 <xsl:apply-templates select="doxygen" mode="log-dump" />
343 </xsl:if>
344 <xsl:if test="browsable-sources-global">
345 <tr class="result-{browsable-sources-global/@result}">
346 <td>
347 <i>Source code browser</i>
348 </td>
349 <td>
350 <xsl:apply-templates select="browsable-sources-global" mode="yes-no" />
351 </td>
352 <td>
353 <xsl:apply-templates select="browsable-sources-global" mode="download" />
354 </td>
355 <td>
356 <xsl:apply-templates select="browsable-sources-global" mode="log-link" />
357 </td>
358 <td>
359 <xsl:apply-templates select="browsable-sources-global" mode="duration" />
360 </td>
361 </tr>
362 <xsl:apply-templates select="browsable-sources-global" mode="log-dump" />
363 </xsl:if>
364 <xsl:if test="sycek-style-check">
365 <tr class="result-{sycek-style-check/@result}">
366 <td>
367 <i>Sycek C style check</i>
368 </td>
369 <td>
370 <xsl:apply-templates select="sycek-style-check" mode="yes-no" />
371 </td>
372 <td>
373 <xsl:apply-templates select="sycek-style-check" mode="download" />
374 </td>
375 <td>
376 <xsl:apply-templates select="sycek-style-check" mode="log-link" />
377 </td>
378 <td>
379 <xsl:apply-templates select="sycek-style-check" mode="duration" />
380 </td>
381 </tr>
382 <xsl:apply-templates select="sycek-style-check" mode="log-dump" />
383 </xsl:if>
384 <xsl:for-each select="helenos-build">
385 <xsl:sort select="@arch" />
386 <tr class="result-{@result}">
387 <td>
388 <xsl:value-of select="@arch" />
389 </td>
390 <td>
391 <xsl:apply-templates select="." mode="yes-no" />
392 </td>
393 <td>
394 <xsl:apply-templates select="." mode="download" />
395 </td>
396 <td>
397 <xsl:apply-templates select="." mode="log-link" />
398 </td>
399 <td>
400 <xsl:apply-templates select="." mode="duration" />
401 </td>
402 </tr>
403 <xsl:apply-templates select="." mode="log-dump" />
404 </xsl:for-each>
405 </tbody>
406 </table>
407 </xsl:if>
410 <xsl:if test="count(*[@arch]) &gt; 0">
411 <h2>Per-architecture details <xsl:copy-of select="$LINK_TO_TOP" /></h2>
412 <xsl:for-each select="$BUILD/*[@arch and count(. | key('by-arch', @arch)[parent::build = $BUILD][1]) = 1]">
413 <xsl:sort select="@arch" />
414 <xsl:variable name="ARCH" select="@arch" />
415 <h3 id="arch-{$ARCH}"><xsl:value-of select="$ARCH" /><xsl:copy-of select="$LINK_TO_TOP" /></h3>
416 <table>
417 <thead>
418 <tr>
419 <th width="25%">Task</th>
420 <th width="10%">Result</th>
421 <th width="35%">Download</th>
422 <th width="20%">Log</th>
423 <th width="10%">Duration</th>
424 </tr>
425 </thead>
426 <tbody>
427 <tr class="result-{$BUILD/helenos-build[@arch=$ARCH]/@result}">
428 <td>HelenOS</td>
429 <td>
430 <xsl:apply-templates select="$BUILD/helenos-build[@arch=$ARCH]" mode="yes-no" />
431 </td>
432 <td>
433 <xsl:apply-templates select="." mode="download" />
434 </td>
435 <td>
436 <xsl:apply-templates select="$BUILD/helenos-build[@arch=$ARCH]" mode="log-link" />
437 </td>
438 <td>
439 <xsl:apply-templates select="." mode="duration" />
440 </td>
441 </tr>
442 <xsl:apply-templates select="$BUILD/helenos-build[@arch=$ARCH]" mode="log-dump" />
443 <xsl:for-each select="$BUILD/harbour-build[@arch=$ARCH]">
444 <tr class="result-{@result}">
445 <td><xsl:value-of select="@package" /></td>
446 <td>
447 <xsl:apply-templates select="." mode="yes-no" />
448 </td>
449 <td>
450 <xsl:apply-templates select="." mode="download" />
451 </td>
452 <td>
453 <xsl:apply-templates select="." mode="log-link" />
454 </td>
455 <td>
456 <xsl:apply-templates select="." mode="duration" />
457 </td>
458 </tr>
459 <xsl:apply-templates select="." mode="log-dump" />
460 </xsl:for-each>
461 <xsl:for-each select="$BUILD/helenos-extra-build[@arch=$ARCH]">
462 <tr class="result-{@result}">
463 <td>HelenOS with <xsl:value-of select="@harbours" /></td>
464 <td>
465 <xsl:apply-templates select="." mode="yes-no" />
466 </td>
467 <td>
468 <xsl:apply-templates select="." mode="download" />
469 </td>
470 <td>
471 <xsl:apply-templates select="." mode="log-link" />
472 </td>
473 <td>
474 <xsl:apply-templates select="." mode="duration" />
475 </td>
476 </tr>
477 <xsl:apply-templates select="." mode="log-dump" />
478 </xsl:for-each>
479 <xsl:for-each select="$BUILD/test[@arch=$ARCH]">
480 <tr class="result-{@result}">
481 <td><xsl:value-of select="@description" /></td>
482 <td>
483 <xsl:apply-templates select="." mode="yes-no" />
484 </td>
485 <td>
486 <xsl:apply-templates select="." mode="download" />
487 </td>
488 <td>
489 <xsl:apply-templates select="." mode="log-link" />
490 </td>
491 <td>
492 <xsl:apply-templates select="." mode="duration" />
493 </td>
494 </tr>
495 <xsl:apply-templates select="." mode="log-dump" />
496 </xsl:for-each>
497 </tbody>
498 </table>
499 </xsl:for-each>
500 </xsl:if>
502 <xsl:if test="count(*[@package]) &gt; 0">
503 <h2>Per-harbour details<xsl:copy-of select="$LINK_TO_TOP" /></h2>
504 <xsl:for-each select="$BUILD/*[@package and count(. | key('by-harbour', @package)[parent::build = $BUILD][1]) = 1]">
505 <xsl:sort select="@package" />
506 <xsl:variable name="PKG" select="@package" />
507 <h3 id="harbour-{$PKG}"><xsl:value-of select="$PKG" /><xsl:copy-of select="$LINK_TO_TOP" /></h3>
508 <table>
509 <thead>
510 <tr>
511 <th width="25%">Architecture</th>
512 <th width="10%">Result</th>
513 <th width="35%">Download</th>
514 <th width="20%">Log</th>
515 <th width="10%">Duration</th>
516 </tr>
517 </thead>
518 <tbody>
519 <tr class="result-{$BUILD/harbour-fetch[@package=$PKG]/@result}">
520 <td><i>Tarball fetch</i></td>
521 <td>
522 <xsl:apply-templates select="$BUILD/harbour-fetch[@package=$PKG]" mode="yes-no" />
523 </td>
524 <td>
525 <xsl:apply-templates select="." mode="download" />
526 </td>
527 <td>
528 <xsl:apply-templates select="$BUILD/harbour-fetch[@package=$PKG]" mode="log-link" />
529 </td>
530 <td>
531 <xsl:apply-templates select="." mode="duration" />
532 </td>
533 </tr>
534 <xsl:apply-templates select="$BUILD/harbour-fetch[@package=$PKG]" mode="log-dump" />
535 <xsl:for-each select="$BUILD/harbour-build[@package=$PKG]">
536 <xsl:sort select="@arch" />
537 <tr class="result-{@result}">
538 <td><xsl:value-of select="@arch" /></td>
539 <td>
540 <xsl:apply-templates select="." mode="yes-no" />
541 </td>
542 <td>
543 <xsl:apply-templates select="." mode="download" />
544 </td>
545 <td>
546 <xsl:apply-templates select="." mode="log-link" />
547 </td>
548 <td>
549 <xsl:apply-templates select="." mode="duration" />
550 </td>
551 </tr>
552 <xsl:apply-templates select="." mode="log-dump" />
553 </xsl:for-each>
554 </tbody>
555 </table>
556 </xsl:for-each>
557 </xsl:if>
559 <xsl:if test="count(*[@scenario]) &gt; 0">
560 <h2>Per-scenario details<xsl:copy-of select="$LINK_TO_TOP" /></h2>
561 <xsl:for-each select="$BUILD/*[@scenario and count(. | key('by-scenario', @scenario)[parent::build = $BUILD][1]) = 1]">
562 <xsl:sort select="@scenario" />
563 <xsl:variable name="SCENARIO" select="@scenario" />
564 <h3 id="scenario-{$SCENARIO}"><xsl:value-of select="@description" /><xsl:copy-of select="$LINK_TO_TOP" /></h3>
565 <table>
566 <thead>
567 <tr>
568 <th width="25%">Architecture</th>
569 <th width="10%">Result</th>
570 <th width="35%">Download</th>
571 <th width="20%">Log</th>
572 <th width="10%">Duration</th>
573 </tr>
574 </thead>
575 <tbody>
576 <xsl:for-each select="$BUILD/test[@scenario=$SCENARIO]">
577 <xsl:sort select="@arch" />
578 <tr class="result-{@result}">
579 <td><xsl:value-of select="@arch" /></td>
580 <td>
581 <xsl:apply-templates select="." mode="yes-no" />
582 </td>
583 <td>
584 <xsl:apply-templates select="." mode="download" />
585 </td>
586 <td>
587 <xsl:apply-templates select="." mode="log-link" />
588 </td>
589 <td>
590 <xsl:apply-templates select="." mode="duration" />
591 </td>
592 </tr>
593 <xsl:apply-templates select="." mode="log-dump" />
594 </xsl:for-each>
595 </tbody>
596 </table>
597 </xsl:for-each>
598 </xsl:if>
600 </div>
602 </xsl:with-param>
603 </xsl:call-template>
604 </xsl:template>
606 <xsl:template match="@*" mode="architecture-with-hyphens">
607 <xsl:variable name="PLATFORM" select="substring-before(., '/')" />
608 <xsl:variable name="MACHINE" select="substring-after(., '/')" />
609 <xsl:choose>
610 <xsl:when test="concat($PLATFORM, $MACHINE) = ''">
611 <xsl:value-of select="." />
612 </xsl:when>
613 <xsl:otherwise>
614 <xsl:value-of select="$PLATFORM" />
615 <xsl:text> </xsl:text>
616 <xsl:choose>
617 <xsl:when test="$MACHINE = 'beagleboardxm'">
618 <xsl:text disable-output-escaping="yes"><![CDATA[beagle&shy;board&shy;xm]]></xsl:text>
619 </xsl:when>
620 <xsl:when test="$MACHINE = 'beaglebone'">
621 <xsl:text disable-output-escaping="yes"><![CDATA[beagle&shy;bone]]></xsl:text>
622 </xsl:when>
623 <xsl:when test="$MACHINE = 'malta-be'">
624 <xsl:text disable-output-escaping="yes"><![CDATA[malta&shy;-be]]></xsl:text>
625 </xsl:when>
626 <xsl:when test="$MACHINE = 'malta-le'">
627 <xsl:text disable-output-escaping="yes"><![CDATA[malta&shy;-le]]></xsl:text>
628 </xsl:when>
629 <xsl:when test="$MACHINE = 'integratorcp'">
630 <xsl:text disable-output-escaping="yes"><![CDATA[inte&shy;gra&shy;torcp]]></xsl:text>
631 </xsl:when>
632 <xsl:when test="$MACHINE = 'raspberrypi'">
633 <xsl:text disable-output-escaping="yes"><![CDATA[rasp&shy;ber&shy;ry&shy;pi]]></xsl:text>
634 </xsl:when>
635 <xsl:when test="$MACHINE = 'raspberrypi'">
636 <xsl:text disable-output-escaping="yes"><![CDATA[rasp&shy;ber&shy;ry&shy;pi]]></xsl:text>
637 </xsl:when>
638 <xsl:otherwise>
639 <xsl:value-of select="$MACHINE" />
640 </xsl:otherwise>
641 </xsl:choose>
642 </xsl:otherwise>
643 </xsl:choose>
644 </xsl:template>
646 <xsl:template match="*" mode="yes-no">
647 <xsl:choose>
648 <xsl:when test="@result = 'ok'">
649 <xsl:text>OK</xsl:text>
650 </xsl:when>
651 <xsl:when test="@result = 'fail'">
652 <xsl:text>Failed</xsl:text>
653 </xsl:when>
654 <xsl:when test="@result = 'skip'">
655 <xsl:text>Skipped</xsl:text>
656 </xsl:when>
657 <xsl:otherwise>
658 <xsl:text>? </xsl:text>
659 <code>(<xsl:value-of select="@result" />)</code>
660 </xsl:otherwise>
661 </xsl:choose>
662 </xsl:template>
664 <xsl:template match="*" mode="image-link">
665 <xsl:if test="@image">
666 <a href="{@image}">Image</a>
667 </xsl:if>
668 </xsl:template>
670 <xsl:template match="*" mode="log-link">
671 <xsl:if test="@log">
672 <a href="{@log}">View</a>
673 <xsl:if test="log/logline">
674 (<a href="#" onclick="return showHideLog(this, 'log-{generate-id(.)}');">tail</a>)
675 </xsl:if>
676 </xsl:if>
677 </xsl:template>
679 <xsl:template match="*" mode="log-link-matrix">
680 <xsl:if test="@log">
681 <a href="{@log}"><xsl:apply-templates select="." mode="yes-no" /></a>
682 </xsl:if>
683 </xsl:template>
685 <xsl:template match="*" mode="duration">
686 <xsl:if test="@duration">
687 <xsl:variable name="SECONDS" select="@duration div 1000" />
688 <xsl:variable name="MINUTES" select="floor($SECONDS div 60)" />
689 <xsl:variable name="HOURS" select="floor($MINUTES div 60)" />
690 <xsl:choose>
691 <xsl:when test="$MINUTES &gt; 90">
692 <xsl:value-of select="$HOURS" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>h </xsl:text>
693 <xsl:value-of select="format-number($MINUTES - 60 * $HOURS, '#')" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>min</xsl:text>
694 </xsl:when>
695 <xsl:when test="$SECONDS &gt; 90">
696 <xsl:value-of select="$MINUTES" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>min </xsl:text>
697 <xsl:value-of select="format-number($SECONDS - 60 * $MINUTES, '#')" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>s</xsl:text>
698 </xsl:when>
699 <xsl:otherwise>
700 <xsl:value-of select="format-number($SECONDS, '#')" /><xsl:text disable-output-escaping="yes"><![CDATA[&#8201;]]>s</xsl:text>
701 </xsl:otherwise>
702 </xsl:choose>
703 <!-- (<xsl:value-of select="format-number(@duration div 1000, '#.00')" />s) -->
704 </xsl:if>
705 </xsl:template>
707 <xsl:template match="*" mode="log-dump">
708 <xsl:if test="count(log/logline) > 0">
709 <tr class="logdump log-{generate-id(.)}">
710 <td colspan="5">
711 <pre><xsl:for-each select="log/logline">
712 <xsl:value-of select="text()" /><xsl:text>
713 </xsl:text>
714 </xsl:for-each></pre>
715 </td>
716 </tr>
717 </xsl:if>
718 </xsl:template>
720 <xsl:template match="*" mode="download">
721 <xsl:for-each select="file">
722 <a href="{@filename}"><xsl:value-of select="@title" /></a>
723 <xsl:if test="not(position() = last())">
724 <xsl:text>, </xsl:text>
725 </xsl:if>
726 </xsl:for-each>
727 <xsl:if test="not(file)">
728 <xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text>
729 </xsl:if>
730 </xsl:template>
734 <xsl:template match="*" mode="html-failed-task-table-row">
735 <tr class="result-fail">
736 <xsl:apply-templates select="." mode="html-failed-task-table-row-inner" />
737 <td>
738 <xsl:apply-templates select="." mode="log-link" />
739 </td>
740 <td>
741 <xsl:apply-templates select="." mode="duration" />
742 </td>
743 </tr>
744 <xsl:apply-templates select="." mode="log-dump" />
745 </xsl:template>
747 <xsl:template match="checkout" mode="html-failed-task-table-row-inner">
748 <td>Repository checkout</td>
749 <td><xsl:value-of select="@repository" /></td>
750 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
751 </xsl:template>
753 <xsl:template match="harbour-check" mode="html-failed-task-table-row-inner">
754 <td>Harbour self-check</td>
755 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
756 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
757 </xsl:template>
759 <xsl:template match="harbour-fetch" mode="html-failed-task-table-row-inner">
760 <td>Tarball fetch</td>
761 <td><xsl:value-of select="@package" /></td>
762 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
763 </xsl:template>
765 <xsl:template match="helenos-build" mode="html-failed-task-table-row-inner">
766 <td>HelenOS</td>
767 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
768 <td><xsl:value-of select="@arch" /></td>
769 </xsl:template>
771 <xsl:template match="harbour-build" mode="html-failed-task-table-row-inner">
772 <td>Harbour build</td>
773 <td><xsl:value-of select="@package" /></td>
774 <td><xsl:value-of select="@arch" /></td>
775 </xsl:template>
777 <xsl:template match="helenos-extra-build" mode="html-failed-task-table-row-inner">
778 <td>Extras build</td>
779 <td>HelenOS and <xsl:value-of select="@packages" /></td>
780 <td><xsl:value-of select="@arch" /></td>
781 </xsl:template>
783 <xsl:template match="test" mode="html-failed-task-table-row-inner">
784 <td>Test in VM</td>
785 <td><xsl:value-of select="@description" /></td>
786 <td><xsl:value-of select="@arch" /></td>
787 </xsl:template>
789 <xsl:template match="*" mode="html-failed-task-table-row-inner">
790 <td><xsl:value-of select="name()" /></td>
791 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
792 <td><xsl:text disable-output-escaping="yes"><![CDATA[&mdash;]]></xsl:text></td>
793 </xsl:template>
795 </xsl:stylesheet>