changeset 45:cc9b1cd6098b

add macro for summary text junit report
author smith@nwoca.org
date Thu, 09 Jun 2011 11:57:56 -0400
parents 714576165aba
children 8b682fce9900
files ssdt-common-build.xml
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ssdt-common-build.xml	Thu Jun 09 10:35:27 2011 -0400
+++ b/ssdt-common-build.xml	Thu Jun 09 11:57:56 2011 -0400
@@ -119,5 +119,23 @@
                         />
         <delete file="${build.web.dir.path}/META-INF/context-dev.xml" failonerror="false"/>
     </target>
+    <macrodef name="junit-summary"
+              description="creates a summary of junit results"
+              uri="http://www.ssdt-ohio.org/ant/common">
+        <attribute name="dir" description="JUNIT test results" default="${build.test.results.dir}"/>
+        <attribute name="file" description="output file" default="${build.test.results.dir}/summary.txt"/>
+        <sequential>
+            <junitreport tofile="@{dir}/combined.xml">
+                <fileset dir="@{dir}">
+                    <include name="TEST-*.xml"/>
+                </fileset>
+            </junitreport>
+            <xslt in="@{dir}/combined.xml" out="@{file}">
+                <style>
+                    <javaresource name="org/ssdt_ohio/tools/ant/junit-summary_1.xsl" classpath="${user.home}/.ant/lib/ssdt-ant.jar"/>
+                </style>
+            </xslt>
+        </sequential>
+    </macrodef>
 
 </project>