11 <html> |
11 <html> |
12 <head><title>Build Status</title></head> |
12 <head><title>Build Status</title></head> |
13 <body> |
13 <body> |
14 <h1>Build Status</h1> |
14 <h1>Build Status</h1> |
15 |
15 |
16 <xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)"/> |
16 <xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)+sum(phase/step/failures[@level='critical']/@count)"/> |
17 <xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)"/> |
17 <xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)+sum(phase/step/failures[@level='major']/@count)"/> |
18 <xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)"/> |
18 <xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)+sum(phase/step/failures[@level='minor']/@count)"/> |
19 <xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)"/> |
19 <xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)+sum(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/@count)"/> |
20 |
20 |
21 <h2> |
21 <h2> |
22 Overall BRAGG staus: |
22 Overall BRAGG staus: |
23 <xsl:choose> |
23 <xsl:choose> |
24 <xsl:when test="$criticalCount != 0">BLACK</xsl:when> |
24 <xsl:when test="$criticalCount != 0">BLACK</xsl:when> |
33 <table border="1"> |
33 <table border="1"> |
34 <tr><td>Critical</td><td><xsl:value-of select="$criticalCount"/></td></tr> |
34 <tr><td>Critical</td><td><xsl:value-of select="$criticalCount"/></td></tr> |
35 <tr><td>Major</td><td><xsl:value-of select="$majorCount"/></td></tr> |
35 <tr><td>Major</td><td><xsl:value-of select="$majorCount"/></td></tr> |
36 <tr><td>Minor</td><td><xsl:value-of select="$minorCount"/></td></tr> |
36 <tr><td>Minor</td><td><xsl:value-of select="$minorCount"/></td></tr> |
37 <tr><td>Unknown</td><td><xsl:value-of select="$unknownCount"/></td></tr> |
37 <tr><td>Unknown</td><td><xsl:value-of select="$unknownCount"/></td></tr> |
38 <tr><th>Grand total</th><th><xsl:value-of select="count(phase/step/failures/failure)"/></th></tr> |
38 <tr><th>Grand total</th><th><xsl:value-of select="$criticalCount+$majorCount+$minorCount+$unknownCount"/></th></tr> |
39 </table> |
39 </table> |
40 |
40 |
41 <h2>Breakdown by phase/step</h2> |
41 <h2>Breakdown by phase/step</h2> |
42 <table border="1"> |
42 <table border="1"> |
43 |
43 |
45 <tr> |
45 <tr> |
46 <th colspan='2'>Phase: <xsl:value-of select="@name"/></th> |
46 <th colspan='2'>Phase: <xsl:value-of select="@name"/></th> |
47 </tr> |
47 </tr> |
48 <xsl:for-each select="step"> |
48 <xsl:for-each select="step"> |
49 <tr> |
49 <tr> |
|
50 <xsl:choose> |
|
51 <xsl:when test="@detailshref"> |
|
52 <td colspan='2'>Step: <a><xsl:attribute name="href"><xsl:value-of select="@detailshref"/></xsl:attribute><xsl:value-of select="@name"/></a></td> |
|
53 </xsl:when> |
|
54 <xsl:otherwise> |
50 <td colspan='2'>Step: <xsl:value-of select="@name"/></td> |
55 <td colspan='2'>Step: <xsl:value-of select="@name"/></td> |
|
56 </xsl:otherwise> |
|
57 </xsl:choose> |
51 </tr> |
58 </tr> |
52 <xsl:for-each select="failures"> |
59 <xsl:for-each select="failures"> |
53 <tr> |
60 <tr> |
54 <td>Failures: <xsl:value-of select="@level"/></td> |
61 <td>Failures: <xsl:value-of select="@level"/></td> |
|
62 |
|
63 <xsl:choose> |
|
64 <xsl:when test="@count"> |
|
65 <td>Number: <xsl:value-of select="@count"/></td> |
|
66 </xsl:when> |
|
67 <xsl:otherwise> |
55 <td>Number: <xsl:value-of select="count(failure)"/></td> |
68 <td>Number: <xsl:value-of select="count(failure)"/></td> |
|
69 </xsl:otherwise> |
|
70 </xsl:choose> |
56 </tr> |
71 </tr> |
57 </xsl:for-each> |
72 </xsl:for-each> |
58 </xsl:for-each> |
73 </xsl:for-each> |
59 </xsl:for-each> |
74 </xsl:for-each> |
60 |
75 |
61 </table> |
76 </table> |
62 |
77 |
63 <!-- If any failures are tied to a specific package... --> |
|
64 <xsl:if test="phase/step/failures/failure[@package]"> |
|
65 <h2>Breakdown by package</h2> |
|
66 <table border="1"> |
|
67 <tr><th>Package</th><th>Total failures</th></tr> |
|
68 <!-- Use the Muenchian Method to get a set of distinct packages --> |
|
69 <xsl:for-each select="phase/step/failures/failure[generate-id(.) = generate-id(key('packages', @package))]"> |
|
70 <xsl:sort select="@package"/> |
|
71 <tr> |
|
72 <td><a><xsl:attribute name="href"><xsl:value-of select="concat('#package', @package)"/></xsl:attribute><xsl:value-of select="@package"/></a></td> |
|
73 <td><xsl:value-of select="count(key('packages', @package))"/></td> |
|
74 </tr> |
|
75 </xsl:for-each> |
|
76 </table> |
|
77 |
|
78 <h2>Breakdown by package/severity</h2> |
|
79 <xsl:for-each select="phase/step/failures[@level]/failure[generate-id(.) = generate-id(key('packages', @package))]"> |
|
80 <xsl:sort select="@package"/> |
|
81 <xsl:variable name="package" select="@package"/> |
|
82 <a><xsl:attribute name="name"><xsl:value-of select="concat('package', $package)"/></xsl:attribute> |
|
83 <h3><xsl:value-of select="$package"/></h3> |
|
84 </a> |
|
85 <table border="1"> |
|
86 <tr><th>Severity</th><th>Count</th></tr> |
|
87 <xsl:for-each select="/buildStatus/phase/step/failures[generate-id(.) = generate-id(key('severities', @level))]"> |
|
88 <xsl:variable name="severity" select="@level"/> |
|
89 <tr> |
|
90 <td><a> |
|
91 <xsl:if test="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]) != 0"> |
|
92 <xsl:attribute name="href"><xsl:value-of select="concat('#', $severity, $package)"/></xsl:attribute> |
|
93 </xsl:if> |
|
94 <xsl:value-of select="$severity"/></a></td> |
|
95 <td><xsl:value-of select="count(key('packageANDseverity', concat($severity, $package)))"/></td> |
|
96 </tr> |
|
97 </xsl:for-each> |
|
98 </table> |
|
99 </xsl:for-each> |
|
100 </xsl:if> |
|
101 |
|
102 <h2>Floating failures by phase/step/severity</h2> |
78 <h2>Floating failures by phase/step/severity</h2> |
103 <xsl:if test="count(phase/step/failures/failure/@package) = count(phase/step/failures/failure)"> |
79 <xsl:if test="count(phase/step/failures/failure/@package) = count(phase/step/failures/failure)"> |
104 <p>No errors independent of package</p> |
80 <p>No failures to show. Please also check the <a href="../html/index.html">Raptor build summary</a> for details on that part of the build</p> |
105 </xsl:if> |
81 </xsl:if> |
106 <xsl:for-each select="phase[count(step/failures/failure/@package) != count(step/failures/failure)]"> |
82 <xsl:for-each select="phase[count(step/failures/failure/@package) != count(step/failures/failure)]"> |
107 <h3>Phase: <xsl:value-of select="@name"/></h3> |
83 <h3>Phase: <xsl:value-of select="@name"/></h3> |
108 <xsl:for-each select="step[count(failures/failure/@package) != count(failures/failure)]"> |
84 <xsl:for-each select="step[count(failures/failure/@package) != count(failures/failure)]"> |
109 <h4>Step: <xsl:value-of select="@name"/></h4> |
85 <h4>Step: <xsl:value-of select="@name"/></h4> |
124 </dd></dl> |
100 </dd></dl> |
125 </xsl:for-each> |
101 </xsl:for-each> |
126 </xsl:for-each> |
102 </xsl:for-each> |
127 </xsl:for-each> |
103 </xsl:for-each> |
128 |
104 |
129 <h2>Package failures by package/severity</h2> |
|
130 <xsl:if test="count(phase/step/failures/failure/@package) = 0"> |
|
131 <p>No errors specific to a package</p> |
|
132 </xsl:if> |
|
133 <xsl:for-each select="phase/step/failures[@level]/failure[generate-id(.) = generate-id(key('packages', @package))]"> |
|
134 <xsl:sort select="@package"/> |
|
135 <xsl:variable name="package" select="@package"/> |
|
136 <a><xsl:attribute name="name"><xsl:value-of select="concat('package', $package)"/></xsl:attribute> |
|
137 <h3><xsl:value-of select="$package"/></h3> |
|
138 </a> |
|
139 <xsl:for-each select="/buildStatus/phase/step/failures[generate-id(.) = generate-id(key('severities', @level))]"> |
|
140 <xsl:variable name="severity" select="@level"/> |
|
141 <xsl:if test="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]) != 0"> |
|
142 <dl><dt><a><xsl:attribute name="name"><xsl:value-of select="concat($severity, $package)"/></xsl:attribute> |
|
143 <xsl:value-of select="$severity"/> (<xsl:value-of select="count(/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package])"/>) |
|
144 </a></dt><dd> |
|
145 <ul> |
|
146 <xsl:for-each select="/buildStatus/phase/step/failures[@level = $severity]/failure[@package = $package]"> |
|
147 <xsl:sort select="@package"/> |
|
148 <li><xsl:value-of select="effect"/></li> |
|
149 <xsl:if test="@unreported_causes != '0'"> |
|
150 <br/>(Too much text to show everything; <xsl:value-of select="@unreported_causes"/> lines not shown.) |
|
151 </xsl:if> |
|
152 <xsl:for-each select="causes"> |
|
153 <pre><xsl:value-of select="."/></pre> |
|
154 </xsl:for-each> |
|
155 </xsl:for-each> |
|
156 </ul> |
|
157 </dd></dl> |
|
158 </xsl:if> |
|
159 </xsl:for-each> |
|
160 </xsl:for-each> |
|
161 |
|
162 </body> |
105 </body> |
163 </html> |
106 </html> |
164 </xsl:template> |
107 </xsl:template> |
165 |
108 |
166 </xsl:stylesheet> |
109 </xsl:stylesheet> |