buildframework/helium/external/helium-antlib/build.xml
changeset 179 d8ac696cc51f
parent 1 be27ed110b50
child 217 0f5e3a7fb6af
--- a/buildframework/helium/external/helium-antlib/build.xml	Wed Oct 28 14:39:48 2009 +0000
+++ b/buildframework/helium/external/helium-antlib/build.xml	Wed Dec 23 19:29:07 2009 +0200
@@ -24,7 +24,9 @@
     <description>Helium Antlib build file.</description>
     
     <property environment="env" />
-    
+
+    <dirname property="helium.antlib.root.dir" file="${ant.file.helium-antlib}" />    
+
     <import file="macros.ant.xml" />    
     
     
@@ -52,23 +54,41 @@
     
     <target name="junit" description="Runs jUnit tests">
         <subantPreset target="junit"/>
+        <antcall target="merge-coverage" />
     </target>
     
     
     <target name="unittest" description="Runs AntUnit tests">
         <subantPreset target="unittest"/>
+        <antcall target="merge-coverage" />
     </target>
     
-    
+        
     <target name="test" description="Runs all tests">
         <subantPreset target="test"/>
+        <antcall target="merge-coverage" />
     </target>
     
-
     <target name="clean" description="Cleans build outputs">
         <subantPreset target="clean"/>
     </target>
 
+    <target name="merge-coverage">
+        <emma enabled="true">
+            <report>
+                <sourcepath>
+                    <dirset dir="${helium.antlib.root.dir}" >
+                        <include name="**/src" /> 
+                    </dirset>
+                </sourcepath>
+                <infileset dir="${build.temp.dir}" includes="**/*.emma" />
+                <txt outfile="${build.temp.dir}/coverage.txt" />
+                <html outfile="${build.temp.dir}/coverage.html" />
+                <xml outfile="${build.temp.dir}/coverage.xml" />
+            </report>
+        </emma>
+    </target>
+    
 </project>