added global test result reporting

This commit is contained in:
maroy 2004-07-24 08:26:12 +00:00
parent 0257515683
commit 249d53a88c
3 changed files with 87 additions and 6 deletions

View File

@ -21,17 +21,18 @@
#
#
# Author : $Author: maroy $
# Version : $Revision: 1.1 $
# Version : $Revision: 1.2 $
# Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/Attic/Makefile,v $
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# General command definitions
#-------------------------------------------------------------------------------
MKDIR = mkdir -p
RM = rm -f
RMDIR = rm -rf
DOXYGEN = doxygen
MKDIR = mkdir -p
RM = rm -f
RMDIR = rm -rf
DOXYGEN = doxygen
XSLTPROC = xsltproc
#-------------------------------------------------------------------------------
@ -44,16 +45,23 @@ ETC_DIR = ${BASE_DIR}/etc
DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config
TESTRESULTS_XSLT = ${ETC_DIR}/testResultsToHtml.xsl
TESTRESULTS_IN = ${ETC_DIR}/testResults.xml
TESTRESULTS_FILE = ${DOC_DIR}/testResults.html
#-------------------------------------------------------------------------------
# Targets
#-------------------------------------------------------------------------------
.PHONY: all doc clean docclean depclean distclean
.PHONY: all doc clean docclean depclean distclean testresults
all: doc
doc:
${DOXYGEN} ${DOXYGEN_CONFIG}
testresults:
${XSLTPROC} ${TESTRESULT_XSLT} ${TESTRESULTS_IN} > ${TESTRESULTS_FILE}
clean:
${RMDIR} ${DOXYGEN_DIR}/html

View File

@ -0,0 +1,57 @@
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>LiveSupport unit test results</title>
</head>
<body>
<h1>Preface</h1>
This document is part of the
<a href="http://livesupport.campware.org/">LiveSupport</a>
project, Copyright &#169; 2004 <a href="http://www.mdlf.org/">Media
Development Loan Fund</a>, under the GNU
<a href="http://www.gnu.org/licenses/gpl.html">GPL</a>.
<br/>
This is an automatically generated document.
<h1>Scope</h1>
This document contains the generated unit test results for the
<a href="http://livesupport.campware.org/">LiveSupport</a> project.
<h1>Summary</h1>
<table>
<tr>
<td><b>Total number of tests:</b></td>
<td><xsl:value-of select="count(//Test | //FailedTest)"/></td>
</tr>
<tr>
<td><b>Tests passed:</b></td>
<td><xsl:value-of select="count(/*/SuccessfulTests/Test)"/></td>
</tr>
<tr>
<td><b>Tests failed:</b></td>
<td><xsl:value-of select="count(/*/FailedTests/FailedTest)"/></td>
</tr>
</table>
<h1>Tests</h1>
<table>
<tr>
<th>test name</th>
<th>test status</th>
</tr>
<xsl:for-each select="//Test | //FailedTest">
<xsl:sort select="Name"/>
<tr>
<td><xsl:value-of select="Name"/></td>
<xsl:if test="ancestor::FailedTests"><td bgcolor="red">failed</td></xsl:if>
<xsl:if test="ancestor::SuccessfulTests"><td bgcolor="lightblue">passed</td></xsl:if>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="testResultToHtml.xsl"?>
<!DOCTYPE TestResults [
<!ENTITY coreResults SYSTEM "../modules/core/doc/testResults.xml" >
<!ENTITY dbResults SYSTEM "../modules/db/doc/testResults.xml" >
<!ENTITY storageResults SYSTEM "../modules/storage/doc/testResults.xml" >
<!ENTITY schedulerResults SYSTEM "../products/scheduler/doc/testResults.xml" >
]>
<TestResults>
&coreResults;
&dbResults;
&storageResults;
&schedulerResults;
</TestResults>