Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
Updated to use junit task for running tests and report
Browse files Browse the repository at this point in the history
  • Loading branch information
glen_a_smith committed Jun 27, 2007
1 parent 83f9f1b commit a741116
Showing 1 changed file with 40 additions and 5 deletions.
45 changes: 40 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ limitations under the License.
<property name="doc.dir" location="doc"/>
<property name="classes.dir" location="build/classes"/>
<property name="test.classes.dir" location="build/test.classes"/>
<property name="reports.dir" location="build/reports"/>
<property name="deploy.dir" location="deploy"/>
<property name="lib.dir" location="lib"/>
<property name="app.name" value="opencsv"/>
Expand Down Expand Up @@ -123,16 +124,50 @@ limitations under the License.
<pathelement location="${classes.dir}"/>
</classpath>

</javac>

</javac>

<mkdir dir="${reports.dir}/junit/xml"/>

<junit printsummary="yes" haltonerror="no" haltonfailure="no" fork="true">

<classpath>
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${classes.dir}"/>
<pathelement location="${test.classes.dir}"/>
</classpath>

<formatter type="plain" usefile="false"/>
<formatter type="xml" usefile="true"/>
<batchtest todir="${reports.dir}/junit/xml">
<fileset dir="${test.classes.dir}" includes="**/*Test.class"/>
</batchtest>

</junit>

<!--
<java classname="au.com.bytecode.opencsv.CSVReaderTest">
<classpath>
<pathelement location="${lib.dir}/junit.jar"/>
<pathelement location="${classes.dir}"/>
<pathelement location="${test.classes.dir}"/>
</classpath>
</java>

</java>
-->

</target>

<target name="report" depends="test" description="Generate JUnit report files">

<mkdir dir="${reports.dir}/junit/html"/>
<junitreport todir="${reports.dir}/junit/html">
<fileset dir="${reports.dir}/junit/xml">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${reports.dir}/junit/html"/>
</junitreport>

</target>

<target name="clean" depends="init" description="Remove all class files">
Expand Down Expand Up @@ -176,7 +211,7 @@ limitations under the License.
use="true" windowtitle="opencsv API ${build.version.brief}">
<doctitle><![CDATA[<h1>opencsv</h1>]]>
</doctitle>
<bottom><![CDATA[<i>Copyright &#169; 2005-2006 <a href="http://www.bytecode.com.au"/>Bytecode Pty Ltd.</a></i>]]>
<bottom><![CDATA[<i>Copyright &#169; 2005-2007 <a href="http://www.bytecode.com.au"/>Bytecode Pty Ltd.</a></i>]]>
</bottom>

</javadoc>
Expand Down

0 comments on commit a741116

Please sign in to comment.