Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[r16068]: rvmroot / branches / RVM-127-JMX / build / results2report.xsl Maximize Restore History

Download this file

results2report.xsl    109 lines (101 with data), 4.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
<!--
~ This file is part of the Jikes RVM project (http://jikesrvm.org).
~
~ This file is licensed to You under the Common Public License (CPL);
~ You may not use this file except in compliance with the License. You
~ may obtain a copy of the License at
~
~ http://www.opensource.org/licenses/cpl1.0.php
~
~ See the COPYRIGHT.txt file distributed with this work for information
~ regarding copyright ownership.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:key name="configurations" match="results" use="build-parameters/parameter[@key='config.name']/@value"/>
<xsl:key name="tags" match="test-configuration" use="@tag"/>
<xsl:template match="test-run">
<report version="1.0">
<id>
<xsl:value-of select="@name"/>
</id>
<xsl:copy-of select="revision|time|variant|target"/>
<builds>
<xsl:for-each select="builds/build">
<build>
<xsl:copy-of select="configuration|time|result|output"/>
</build>
</xsl:for-each>
</builds>
<xsl:for-each
select="builds/build/configuration">
<xsl:call-template name="configuration">
<xsl:with-param name="config-name" select="text()"/>
</xsl:call-template>
</xsl:for-each>
</report>
</xsl:template>
<xsl:template name="configuration">
<xsl:param name="config-name"/>
<configuration>
<id>
<xsl:value-of select="$config-name"/>
</id>
<parameters>
<xsl:copy-of
select="/test-run/builds/build/configuration[text() = $config-name]/../parameters/parameter"/>
</parameters>
<xsl:if
test="/test-run/test-configuration/results/build-parameters/parameter[@key='config.name' and @value=$config-name]">
<xsl:call-template name="do-test-configuration">
<xsl:with-param name="excludes" select="'|'"/>
<xsl:with-param name="config-name" select="$config-name"/>
<xsl:with-param name="tag-name"
select="/test-run/test-configuration/results/build-parameters/parameter[@key='config.name' and @value=$config-name]/../../../@tag"/>
</xsl:call-template>
</xsl:if>
</configuration>
</xsl:template>
<xsl:template name="do-test-configuration">
<xsl:param name="config-name"/>
<xsl:param name="tag-name"/>
<xsl:param name="excludes"/>
<xsl:variable name="test-excludes" select="concat($excludes,$tag-name,'|')"/>
<test-configuration>
<id>
<xsl:value-of select="$tag-name"/>
</id>
<name>
<xsl:value-of select="/test-run/test-configuration[@tag=$tag-name]/@name"/>
</name>
<parameters>
<xsl:copy-of
select="/test-run/test-configuration[@tag=$tag-name][1]/results[1]/test-parameters/parameter[@key='extra.args' or @key='mode']"/>
</parameters>
<xsl:for-each
select="/test-run/test-configuration[@tag=$tag-name][1]/results/build-parameters/parameter[@key='config.name' and @value=$config-name]">
<test-group>
<id>
<xsl:value-of select="../../group/text()"/>
</id>
<xsl:for-each select="../../test/result[text() != 'EXCLUDED']/..">
<test>
<id>
<xsl:value-of select="tag"/>
</id>
<xsl:copy-of select="*[not(local-name()='tag')]"/>
</test>
</xsl:for-each>
</test-group>
</xsl:for-each>
</test-configuration>
<xsl:if
test="/test-run/test-configuration[not(contains($test-excludes,concat(@tag,'|')))]/results/build-parameters/parameter[@key='config.name' and @value=$config-name]">
<xsl:call-template name="do-test-configuration">
<xsl:with-param name="config-name" select="$config-name"/>
<xsl:with-param name="tag-name"
select="/test-run/test-configuration[not(contains($test-excludes,concat(@tag,'|')))]/results/build-parameters/parameter[@key='config.name' and @value=$config-name]/../../../@tag"/>
<xsl:with-param name="excludes" select="$test-excludes"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>