common/tools/brag/bragForDiamonds.xsl
author Shabe Razvi <shaber@symbian.org>
Mon, 17 May 2010 18:01:42 +0100
changeset 1035 62b7cda1c2bb
parent 968 a66215cc2b4a
permissions -rw-r--r--
Add re-packaging for prebuilt binaries into the PDK, driven from a manifest_* file delivered with the prebuilt zip file
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
581
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
     1
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
     2
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
     3
<!-- Main template -->
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
     4
<xsl:template match="/buildStatus">
886
fc600bbaa15c Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents: 587
diff changeset
     5
	<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)+sum(phase/step/failures[@level='critical']/@count)"/>
fc600bbaa15c Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents: 587
diff changeset
     6
	<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)+sum(phase/step/failures[@level='major']/@count)"/>
fc600bbaa15c Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents: 587
diff changeset
     7
	<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)+sum(phase/step/failures[@level='minor']/@count)"/>
fc600bbaa15c Fix BRAG status is different as viewed from Diamonds and from the _BRAG.xml page
Dario Sestito <darios@symbian.org>
parents: 587
diff changeset
     8
	<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)"/>
581
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
     9
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    10
	<diamonds-build>
587
97d29037659e Added schema setting, so Diamonds should accept the data.
Simon Howkins <simonh@symbian.org>
parents: 581
diff changeset
    11
	<schema>13</schema>
581
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    12
	<build>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    13
	<status>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    14
	<xsl:choose>
968
a66215cc2b4a Shift down BRAG colour attribution also for Diamonds
Dario Sestito <darios@symbian.org>
parents: 902
diff changeset
    15
		<xsl:when test="$criticalCount != 0">Red</xsl:when>
a66215cc2b4a Shift down BRAG colour attribution also for Diamonds
Dario Sestito <darios@symbian.org>
parents: 902
diff changeset
    16
		<xsl:when test="$majorCount != 0">Amber</xsl:when>
a66215cc2b4a Shift down BRAG colour attribution also for Diamonds
Dario Sestito <darios@symbian.org>
parents: 902
diff changeset
    17
		<xsl:when test="$unknownCount != 0">Amber</xsl:when>
902
6df3172848e9 Reviewed rules defining the BRAG status
Dario Sestito <darios@symbian.org>
parents: 886
diff changeset
    18
		<xsl:otherwise>Green</xsl:otherwise>
581
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    19
	</xsl:choose>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    20
	</status>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    21
	</build>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    22
	</diamonds-build>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    23
</xsl:template>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    24
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    25
</xsl:stylesheet>
46df4556c7d9 New XSL rules to generate a diamonds compatible BRAG status, which can be posted into the database.
Simon Howkins <simonh@symbian.org>
parents:
diff changeset
    26