[jboss-cvs] JBossCache ...

Hany Mesha hmesha at novell.com
Fri Jul 6 12:07:45 EDT 2007


  User: hmesha  
  Date: 07/07/06 12:07:45

  Modified:    JBossCache  build.xml
  Log:
  JBCACHE-905 - Added ant targets to support building test code coverage using clover. Those targets can be invoked by calling:
  sh build.sh with.clover all-functionaltests - instrument source code with clover during compilation.
  sh build.sh clover.html - to produce html formated clover reports
  sh build.sh clover.pdf -  to produce pdf formated clover reports.
  
  Revision  Changes    Path
  1.207     +76 -3     JBossCache/build.xml
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: build.xml
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/build.xml,v
  retrieving revision 1.206
  retrieving revision 1.207
  diff -u -b -r1.206 -r1.207
  --- build.xml	14 Jun 2007 18:07:54 -0000	1.206
  +++ build.xml	6 Jul 2007 16:07:45 -0000	1.207
  @@ -1,6 +1,6 @@
   <?xml version="1.0" encoding="UTF-8"?>
   
  -<!-- $Id: build.xml,v 1.206 2007/06/14 18:07:54 jgreene Exp $ -->
  +<!-- $Id: build.xml,v 1.207 2007/07/06 16:07:45 hmesha Exp $ -->
   
   <project default="compile" name="JBossCache">
   
  @@ -17,6 +17,7 @@
      <property name="functional.tests.dir" value="${tests.dir}/functional"/>
      <property name="stress.tests.dir" value="${tests.dir}/stress"/>
      <property name="interop.tests.dir" value="${tests.dir}/interop"/>
  +   <property name="clover.dir" value="${root.dir}/clover"/>
      <property name="perf.tests.dir" value="${tests.dir}/perf"/>
      <property name="interop.tests.dir" value="${tests.dir}/interop"/>
      <property name="compat.tests.dir" value="${tests.dir}/compat"/>
  @@ -122,6 +123,7 @@
         <fileset dir="${berkeleydb.lib.dir}">
            <include name="*.jar"/>
         </fileset>
  +      <pathelement path="${ant.dir}/lib/clover.jar"/>
      </path>
   
      <path id="retro.library.classpath">
  @@ -560,10 +562,11 @@
         <delete dir="${build.reports}"/>
         <delete dir="${dist.dir}"/>
         <delete dir="${tmp.dir}"/>
  +
         <delete dir="${migration.output.dir}"/>
         <delete dir="${cache.db.dir}"/>
         <delete dir="${cache.db.1x.dir}"/>
  -
  +      <delete dir="${root.dir}/clover"/>
         <delete>
            <fileset dir="${basedir}" defaultexcludes="no">
               <include name="**/*~"/>
  @@ -1575,5 +1578,75 @@
         </jar>
      </target>
   
  +	<!-- Clover build targets -->
  +   <taskdef resource="clovertasks"/>
  +   <typedef resource="clovertypes"/>
  +
  +   <target name="with.clover">
  +     <mkdir dir="${clover.dir}"/>
  +     <mkdir dir="${clover.dir}/coverage"/>
  +     <mkdir dir="${clover.dir}/report"/>
  +   	 <clover-setup initString="${clover.dir}/coverage/JBCcoverage.db"  relative="yes">
  +   	   <fileset dir="${root.dir}">
  +   	   	<patternset id="sources" >
  +   	      <include name="**/*.java" />
  +          <exclude name="**/obsolete/**"/>
  +   	   	  <exclude name="**/*1_4*"/>
  +   	   	  <exclude name="**/interop/**/*"/>
  +          <exclude name="**/stress/**/*"/>
  +          <exclude name="**/perf/**/*"/>
  +          <exclude name="**/compat/**/*"/>
  +          <exclude name="**/data/**/*"/>
  +          <exclude name="**/demo/**/*"/>
  +   	    </patternset>
  +        <patternset refid="junit.excludes"/>
  +   	   </fileset>
  +     </clover-setup>
  +   </target>
   
  +   <target name="clover.html" depends="with.clover">
  +     <mkdir dir="${clover.dir}/report/html"/>	   	
  +   	 <clover-report>
  +       <current outfile="${clover.dir}/report/html/src">
  +         <fileset dir="${src.dir}"/>
  +       	 <format type="html"/>
  +   	   </current>
  +       <current outfile="${clover.dir}/report/html/tests">
  +         <fileset dir="${tests.dir}"/>
  +         <format type="html"/>
  + 	   </current>
  +   	 </clover-report>
  +   </target>
  +
  +   <target name="clover.xml" depends="with.clover">
  +     <mkdir dir="${clover.dir}/report/xml"/>	   	
  +     <clover-report>
  +       <current outfile="${clover.dir}/report/xml/JBCcoverage_src.xml">
  +         <fileset dir="${src.dir}"/>
  +         <format type="xml"/>
  +       </current>
  +       <current outfile="${clover.dir}/report/xml/JBCcoverage_tests.xml">
  +         <fileset dir="${tests.dir}"/>
  +         <format type="xml"/>
  +       </current>
  +	 </clover-report>
  +   </target>
  +	
  +   <target name="clover.pdf" depends="with.clover">
  +     <mkdir dir="${clover.dir}/report/pdf"/>
  +     <clover-report>
  +       <current outfile="${clover.dir}/report/pdf/JBCcoverage_src.pdf" summary="true">
  +         <fileset dir="${src.dir}"/>
  +         <format type="pdf"/>
  +       </current>
  +       <current outfile="${clover.dir}/report/pdf/JBCcoverage_tests.pdf" summary="true">
  +         <fileset dir="${tests.dir}"/>
  +         <format type="pdf"/>
  +       </current>
  +	 </clover-report>
  +   </target>
  +   
  +   <target name="clover.log" depends="with.clover">
  +     <clover-log/>
  +   </target>
   </project>
  
  
  



More information about the jboss-cvs-commits mailing list