Blob Blame History Raw
 A simple XSLT file to transform cppunit XmlOutputer
result file, to the same format that the apache Ant
junit task produce:
<target name="test">
<junit printsummary="no" forkmode="once"
<formatter type="xml"/>

This format allows to manage result file with the Ant
junitreport task.
example usage inside a ant task:

task similar to the junit task:
<target name = "test.cxx">
<!-- assume that the exe take a '-xml
filename', and exit with code error 1 if failed -->
<exec dir = "${}/bin"
executable = "${}/bin/test.exe"
failonerror = "true"
failifexecutionfails = "true"
resultproperty = "test.ret" >
<arg line = "-xml
${}/test/data/temp-cxx-results.xml" />
<condition property = "test.failed">
<equals arg1="${test.ret}" arg2="1"/>
<!-- transform the cppunit xml file to junit
xml file -->



<fail if="test.failed">
Unit tests failed. For error messages, check
the log files in
${}/test/data or run "ant test-reports"
to generate reports at

task that use generated xml result, to produce html report:
<target name="test-reports" description="Generate
test reports from data collected after a running test">
<mkdir dir="${}/test/reports"/>
<junitreport todir="${}/test">
<fileset dir="${}/test/data">
<include name="TEST-*.xml"/>
<report format="frames"

BARBOSA Norbert - patch #1112053