Skip to content

Commit

Permalink
Added DocLava and Cobertura (disabled by default).
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeust committed Jun 1, 2011
1 parent ecc0d50 commit afd8e4a
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 4 deletions.
Binary file added 3rdparty/cobertura.jar
Binary file not shown.
Binary file added 3rdparty/doclava-1.0.3.jar
Binary file not shown.
13 changes: 12 additions & 1 deletion build-tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,22 @@ TESTNG.REPORT.DIR=${testng.report.dir}
classpath="${build.dir}"/>
</target>

<!-- ==================================================================== -->
<property name="cobertura.dir" value="../cobertura-1.9.4.1" />

<path id="cobertura.classpath">
<fileset dir="${cobertura.dir}">
<include name="cobertura.jar" />
<include name="lib/**/*.jar" />
</fileset>
</path>

<!-- ==================================================================== -->
<!-- Run -->
<!-- ==================================================================== -->

<path id="run.cp">
<path location="target/instrumented-classes" />
<path refid="cobertura.classpath" />
<path refid="compile.cp"/>
<pathelement location="${test.build.dir}"/>
</path>
Expand Down
74 changes: 71 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,47 @@
<!-- Documentation -->
<!-- ==================================================================== -->

<target name="javadocs">
<target name="javadocs" depends="javadocs-current" />

<target name="doclava">
<javadoc
docletpath="3rdparty/doclava-1.0.3.jar"
bootclasspath="${javahome}/jre/lib/rt.jar"
classpath="${testng.jar}:lib/${ant.jar}:lib/${guice2.jar}:lib/aopalliance-1.0.jar"
maxmemory="2048M"
additionalparam="-quiet"
verbose="false"
destdir="javadocs"
>
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="org/testng/*.java" />
</fileset>
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="org/testng/xml/Xml*.java" />
</fileset>
<fileset dir="${src.dir}" defaultexcludes="yes">
<include name="org/testng/annotations/**" />
</fileset>
<doclet name="com.google.doclava.Doclava">
<param name="-stubs" value="build/stubs" />
<param name="-hdf"/>
<param name="project.name" value="TestNG" />
<!-- versioning -->
<param name="-since"/>
<param name="doclava/previous.xml"/>
<param name="v1" />
<param name="-apiversion" value="v2"/>
<!-- federation -->
<param name="-federate" />
<param name="JDK"/>
<param name="http://download.oracle.com/javase/6/docs/api/index.html?"/>
<param name="-federationxml"/><param name="JDK"/>
<param name="http://doclava.googlecode.com/svn/static/api/openjdk-6.xml"/>
</doclet>
</javadoc>
</target>

<target name="javadocs-current">
<javadoc additionalparam="-quiet" destdir="javadocs" source="1.5" windowtitle="TestNG"
classpath="${testng.jar}" classpathref="compile2.cp" verbose="false">
<fileset dir="${src.dir}" defaultexcludes="yes">
Expand Down Expand Up @@ -347,7 +387,8 @@
<!-- ==================================================================== -->
<!-- Ivy -->
<!-- ==================================================================== -->
<target name="retrieve-dependencies" description="Retrieve dependencies with ivy">

<target name="retrieve-dependencies" description="Retrieve dependencies with ivy">
<ivy:retrieve log="quiet" />
</target>

Expand All @@ -361,5 +402,32 @@
<target name="pom">
<ivy:makepom ivyfile="ivy.xml" pomfile="ivy-pom.xml" />
</target>


<!-- ==================================================================== -->
<!-- Code coverage -->
<!-- ==================================================================== -->

<property name="cobertura.dir" value="../cobertura-1.9.4.1" />

<path id="cobertura.classpath">
<fileset dir="${cobertura.dir}">
<include name="cobertura.jar" />
<include name="lib/**/*.jar" />
</fileset>
</path>

<taskdef classpathref="cobertura.classpath" resource="tasks.properties" />

<target name="coverage:create">
<cobertura-instrument classpath="cobertura-1.9.4.1/lib/*" todir="target/instrumented-classes">
<fileset dir="${build.dir}">
<include name="**/*.class" />
</fileset>
</cobertura-instrument>
</target>

<target name="coverage">
<cobertura-report srcdir="${src.dir}" destdir="target/coverage-report"/>
</target>

</project>

0 comments on commit afd8e4a

Please sign in to comment.