5ne3wwUnKzB1blwSkgnqHu changeset

Changeset626334383736 (b)
Parent373630626161 (a)
ab
88
99   <xsl:template match="/">
1010      <testsuites>
...
11-         <xsl:attribute name="errors">0</xsl:attribute>
11-         <xsl:attribute name="failures">
11+        <!--
11+          <xsl:attribute name="errors">0</xsl:attribute>
11+          <xsl:attribute name="failures">
...
1313          <xsl:value-of select="$cunitFailureCount"/>
...
14-         </xsl:attribute>
14-         <xsl:attribute name="tests">
14-          <xsl:value-of select="$cunitCount"/>
14-         </xsl:attribute>
14-         <xsl:attribute name="name">
14+          </xsl:attribute>
14+          <xsl:attribute name="tests">
14+            <xsl:value-of select="$cunitCount"/>
14+          </xsl:attribute>
14+
14+          <xsl:attribute name="name">
...
1919            <xsl:value-of select="$suitename" />
...
20-         </xsl:attribute>
20-         <xsl:apply-templates />
20+          </xsl:attribute>
20+        -->
20+          <xsl:apply-templates />
...
2222      </testsuites>
2323   </xsl:template>
2424   
...
5151  <xsl:template match="CUNIT_RUN_TEST_SUCCESS">
5252    <testcase>
5353       <xsl:attribute name="classname">
...
54-          <xsl:value-of select="substring-before(substring-after(TEST_NAME,'test_'),'_')" />
54+          <xsl:value-of select="substring-before(substring-after(TEST_NAME,'Test_'),'_')" />
...
5555       </xsl:attribute>
5656       <xsl:attribute name="name">
5757          <xsl:value-of select="normalize-space(TEST_NAME)" />
...
6262  <xsl:template match="CUNIT_RUN_TEST_FAILURE">
6363    <testcase>
6464        <xsl:attribute name="classname">
...
65-          <xsl:value-of select="substring-before(substring-after(TEST_NAME,'test_'),'_')" />
65+          <xsl:value-of select="substring-before(substring-after(TEST_NAME,'Test_'),'_')" />
...
6666       </xsl:attribute>
6767       <xsl:attribute name="name">
6868          <xsl:value-of select="normalize-space(TEST_NAME)" />
...
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
--- Revision 373630626161
+++ Revision 626334383736
@@ -3,35 +3,38 @@
<xsl:output method="xml" indent="yes" />
<xsl:param name="suitename" />
-
+
<xsl:variable name="cunitCount" select="count(//CUNIT_RUN_TEST_RECORD)"/>
- <xsl:variable name="cunitFailureCount" select="count(//CUNIT_RUN_TEST_FAILURE)"/>
+ <xsl:variable name="cunitFailureCount" select="count(//CUNIT_RUN_TEST_FAILURE)"/>
<xsl:template match="/">
<testsuites>
- <xsl:attribute name="errors">0</xsl:attribute>
- <xsl:attribute name="failures">
+ <!--
+ <xsl:attribute name="errors">0</xsl:attribute>
+ <xsl:attribute name="failures">
<xsl:value-of select="$cunitFailureCount"/>
- </xsl:attribute>
- <xsl:attribute name="tests">
- <xsl:value-of select="$cunitCount"/>
- </xsl:attribute>
- <xsl:attribute name="name">
+ </xsl:attribute>
+ <xsl:attribute name="tests">
+ <xsl:value-of select="$cunitCount"/>
+ </xsl:attribute>
+
+ <xsl:attribute name="name">
<xsl:value-of select="$suitename" />
- </xsl:attribute>
- <xsl:apply-templates />
+ </xsl:attribute>
+ -->
+ <xsl:apply-templates />
</testsuites>
</xsl:template>
-
+
<xsl:template match="/CUNIT_TEST_RUN_REPORT/CUNIT_RESULT_LISTING">
<xsl:for-each select="CUNIT_RUN_SUITE/CUNIT_RUN_SUITE_SUCCESS">
- <xsl:variable name="localCunitFailureCount" select="count(CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_FAILURE)"/>
+ <xsl:variable name="localCunitFailureCount" select="count(CUNIT_RUN_TEST_RECORD/CUNIT_RUN_TEST_FAILURE)"/>
<xsl:variable name="localCunitCount" select="count(CUNIT_RUN_TEST_RECORD)"/>
<xsl:variable name="sn" select="normalize-space(SUITE_NAME/text())"/>
<testsuite>
- <xsl:attribute name="errors">0</xsl:attribute>
- <xsl:attribute name="failures">
- <xsl:value-of select="$localCunitFailureCount"/>
+ <xsl:attribute name="errors">0</xsl:attribute>
+ <xsl:attribute name="failures">
+ <xsl:value-of select="$localCunitFailureCount"/>
</xsl:attribute>
<xsl:attribute name="tests">
<xsl:value-of select="$localCunitCount"/>
@@ -39,20 +42,20 @@
<xsl:attribute name="name">
<xsl:value-of select="$sn"/>
</xsl:attribute>
- <xsl:apply-templates select="CUNIT_RUN_TEST_RECORD" />
+ <xsl:apply-templates select="CUNIT_RUN_TEST_RECORD" />
</testsuite>
</xsl:for-each>
</xsl:template>
-
+
<xsl:template match="CUNIT_RUN_TEST_RECORD">
<xsl:apply-templates select="CUNIT_RUN_TEST_SUCCESS" />
<xsl:apply-templates select="CUNIT_RUN_TEST_FAILURE" />
</xsl:template>
-
+
<xsl:template match="CUNIT_RUN_TEST_SUCCESS">
<testcase>
<xsl:attribute name="classname">
- <xsl:value-of select="substring-before(substring-after(TEST_NAME,'test_'),'_')" />
+ <xsl:value-of select="substring-before(substring-after(TEST_NAME,'Test_'),'_')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="normalize-space(TEST_NAME)" />
@@ -63,7 +66,7 @@
<xsl:template match="CUNIT_RUN_TEST_FAILURE">
<testcase>
<xsl:attribute name="classname">
- <xsl:value-of select="substring-before(substring-after(TEST_NAME,'test_'),'_')" />
+ <xsl:value-of select="substring-before(substring-after(TEST_NAME,'Test_'),'_')" />
</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="normalize-space(TEST_NAME)" />
@@ -73,14 +76,14 @@
<xsl:attribute name="message">
<xsl:value-of select=" normalize-space(CONDITION)" />
</xsl:attribute>
- <xsl:attribute name="type">Failure</xsl:attribute>
+ <xsl:attribute name="type">Failure</xsl:attribute>
<xsl:value-of select="normalize-space(CONDITION)" />
File: <xsl:value-of select="normalize-space(FILE_NAME)" />
Line: <xsl:value-of select="normalize-space(LINE_NUMBER)" />
</failure>
</testcase>
</xsl:template>
-
+
<xsl:template match="text()|@*" />
-
+
</xsl:stylesheet>