1<?xml version='1.0'?>
2<xsl:stylesheet
3	version="1.0"
4	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
5
6	<xsl:template match="BCUNIT_TEST_RUN_REPORT">
7		<html>
8			<head>
9				<title> BCUnit - Automated Test Run Summary Report </title>
10			</head>
11
12			<body bgcolor="#e0e0f0">
13				<xsl:apply-templates/>
14			</body>
15		</html>
16	</xsl:template>
17
18	<xsl:template match="BCUNIT_HEADER">
19		<div align="center">
20			<h3>
21				<b> BCUnit - A Unit testing framework for C. </b> <br/>
22				<a href="https://github.com/BelledonneCommunications/bcunit/"> https://github.com/BelledonneCommunications/bcunit/ </a>
23			</h3>
24		</div>
25	</xsl:template>
26
27	<xsl:template match="BCUNIT_RESULT_LISTING">
28		<p/>
29		<div align="center">
30			<h2> Automated Test Run Results </h2>
31		</div>
32		<table cols="4" width="90%" align="center">
33			<tr>
34				<td width="25%"> </td>
35				<td width="25%"> </td>
36				<td width="25%"> </td>
37				<td width="25%"> </td>
38			</tr>
39			<xsl:apply-templates/>
40		</table>
41	</xsl:template>
42
43	<xsl:template match="BCUNIT_RUN_SUITE">
44		<xsl:apply-templates/>
45	</xsl:template>
46
47	<xsl:template match="SUITE_NAME">
48	</xsl:template>
49
50	<xsl:template match="BCUNIT_RUN_SUITE_SUCCESS">
51		<tr bgcolor="#f0e0f0">
52			<td colspan="4">
53				Running Suite <xsl:value-of select="SUITE_NAME"/>
54			</td>
55		</tr>
56		<xsl:apply-templates/>
57	</xsl:template>
58
59	<xsl:template match="BCUNIT_RUN_GROUP">
60		<xsl:apply-templates/>
61	</xsl:template>
62
63	<xsl:template match="BCUNIT_RUN_GROUP_SUCCESS">
64		<tr bgcolor="#f0e0f0">
65			<td colspan="4">
66				Running Group <xsl:apply-templates/>
67			</td>
68		</tr>
69	</xsl:template>
70
71	<xsl:template match="BCUNIT_RUN_TEST_RECORD">
72		<xsl:apply-templates/>
73	</xsl:template>
74
75	<xsl:template match="BCUNIT_RUN_TEST_SUCCESS">
76		<tr bgcolor="#e0f0d0">
77			<td> </td>
78			<td colspan="2">
79				Running test <xsl:apply-templates/>...
80			</td>
81			<td bgcolor="#50ff50"> Passed </td>
82		</tr>
83	</xsl:template>
84
85	<xsl:template match="BCUNIT_RUN_TEST_FAILURE">
86		<tr bgcolor="#e0f0d0">
87			<td> </td>
88			<td colspan="2">
89				Running test <xsl:value-of select="TEST_NAME"/>...
90			</td>
91			<td bgcolor="#ff5050"> Failed </td>
92		</tr>
93
94		<tr>
95			<td colspan="4" bgcolor="#ff9090">
96				<table width="100%">
97					<tr>
98						<th width="15%"> File Name </th>
99						<td width="50%" bgcolor="#e0eee0">
100							<xsl:value-of select="FILE_NAME"/>
101						</td>
102						<th width="20%"> Line Number </th>
103						<td width="10%" bgcolor="#e0eee0">
104							<xsl:value-of select="LINE_NUMBER"/>
105						</td>
106					</tr>
107					<tr>
108						<th width="15%"> Condition </th>
109						<td colspan="3" width="85%" bgcolor="#e0eee0">
110							<xsl:value-of select="CONDITION"/>
111						</td>
112					</tr>
113				</table>
114			</td>
115		</tr>
116	</xsl:template>
117
118	<xsl:template match="BCUNIT_RUN_SUITE_FAILURE">
119		<tr>
120			<td colspan="3" bgcolor="#f0b0f0">
121				Running Suite <xsl:value-of select="SUITE_NAME"/>...
122			</td>
123			<td bgcolor="#ff7070">
124				<xsl:value-of select="FAILURE_REASON"/>
125			</td>
126		</tr>
127	</xsl:template>
128
129	<xsl:template match="BCUNIT_RUN_GROUP_FAILURE">
130		<tr>
131			<td colspan="3" bgcolor="#f0b0f0">
132				Running Group <xsl:value-of select="GROUP_NAME"/>...
133			</td>
134			<td bgcolor="#ff7070">
135				<xsl:value-of select="FAILURE_REASON"/>
136			</td>
137		</tr>
138	</xsl:template>
139
140	<xsl:template match="BCUNIT_RUN_SUMMARY">
141		<p/>
142		<table width="90%" rows="5" align="center">
143			<tr align="center" bgcolor="skyblue">
144				<th colspan="6"> Cumulative Summary for Run </th>
145			</tr>
146			<tr>
147				<th width="15%" bgcolor="#ffffc0" align="center"> Type </th>
148				<th width="17%" bgcolor="#ffffc0" align="center"> Total </th>
149				<th width="17%" bgcolor="#ffffc0" align="center"> Run </th>
150				<th width="17%" bgcolor="#ffffc0" align="center"> Succeeded </th>
151				<th width="17%" bgcolor="#ffffc0" align="center"> Failed </th>
152				<th width="17%" bgcolor="#ffffc0" align="center"> Inactive </th>
153			</tr>
154			<xsl:for-each select="BCUNIT_RUN_SUMMARY_RECORD">
155				<tr align="center" bgcolor="lightgreen">
156					<td> <xsl:value-of select="TYPE" /> </td>
157					<td> <xsl:value-of select="TOTAL" /> </td>
158					<td> <xsl:value-of select="RUN" /> </td>
159					<td> <xsl:value-of select="SUCCEEDED" /> </td>
160					<td> <xsl:value-of select="FAILED" /> </td>
161					<td> <xsl:value-of select="INACTIVE" /> </td>
162				</tr>
163			</xsl:for-each>
164		</table>
165	</xsl:template>
166
167	<xsl:template match="BCUNIT_FOOTER">
168		<p/>
169		<hr align="center" width="90%" color="maroon" />
170		<h5 align="center"> <xsl:apply-templates/> </h5>
171	</xsl:template>
172
173</xsl:stylesheet>
174