common/tools/brag/bragForDiamonds.xsl
author Simon Howkins <simonh@symbian.org>
Thu, 10 Dec 2009 12:01:59 +0000
changeset 825 1de547e13d13
parent 587 97d29037659e
child 886 fc600bbaa15c
permissions -rw-r--r--
Updates to make the build environment check more reasonable: Mercurial v1.3 permitted The Java compiler is not a showstopping issue 7-zip can be installed in any location Update to Helium 5 Helium can be installed in PDT 1.*, not necessarily 1.0 Raptor installation path not significant Update to Raptor 2.9.* The Raptor patch to update the bundled version of python is no longer relevant BRAG calculations updated to ignore items not being in the system path, as this just doesn't matter. Overall effect is that the build environment check should pass on a machine that is able to do a build!
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">
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
     5
	<xsl:variable name="criticalCount" select="count(phase/step/failures[@level='critical']/failure)"/>
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
     6
	<xsl:variable name="majorCount" select="count(phase/step/failures[@level='major']/failure)"/>
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
     7
	<xsl:variable name="minorCount" select="count(phase/step/failures[@level='minor']/failure)"/>
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
     8
	<xsl:variable name="unknownCount" select="count(phase/step/failures[@level!='critical' and @level!='major' and @level!='minor']/failure)"/>
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>
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
    15
		<xsl:when test="$criticalCount != 0">Black</xsl:when>
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
    16
		<xsl:when test="$majorCount != 0">Red</xsl:when>
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
    17
		<xsl:when test="$minorCount != 0">Amber</xsl:when>
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
    18
		<xsl:when test="$unknownCount != 0">Green</xsl:when>
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:otherwise>Gold</xsl:otherwise>
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
	</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
    21
	</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
    22
	</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
	</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
    24
</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
    25
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
</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
    27