mirror of
https://github.com/nicolabs/ciform.git
synced 2026-05-21 12:13:25 +02:00
+ unit tests
This commit is contained in:
parent
9865aabde6
commit
97faad77d8
|
|
@ -29,10 +29,14 @@ lib.dir=lib
|
|||
|
||||
# A working directory to store temporary files
|
||||
build.dir=${basedir}/build
|
||||
classes.dir=${build.dir}/classes
|
||||
|
||||
# Where to find the tests sources
|
||||
tests.dir=${basedir}/src/test/java
|
||||
|
||||
# Where to write the JUnit XML results
|
||||
tests.logs=${build.dir}/tests-results
|
||||
|
||||
# Where to create the packages
|
||||
target.dir=${basedir}/target
|
||||
|
||||
|
|
|
|||
|
|
@ -33,13 +33,15 @@
|
|||
<ivy:retrieve/>
|
||||
<!-- Creates necessary directories -->
|
||||
<mkdir dir="${build.dir}"/>
|
||||
<mkdir dir="${tests.logs}"/>
|
||||
<mkdir dir="${classes.dir}"/>
|
||||
<mkdir dir="${target.dir}" />
|
||||
</target>
|
||||
|
||||
|
||||
<target name="compile" depends="validate" description="Compiles the source code of the project.">
|
||||
|
||||
<javac srcdir="${src.dir}" destdir="${build.dir}" source="1.4">
|
||||
<javac srcdir="${src.dir}" destdir="${classes.dir}" source="1.4">
|
||||
<src path="${src.dir}" />
|
||||
<src path="${tests.dir}" />
|
||||
<classpath>
|
||||
|
|
@ -52,7 +54,7 @@
|
|||
<dirset dir="/home/cbonar/src/jsunit/java/bin"/>
|
||||
<dirset dir="${jsunit.dir}/java/config"/>
|
||||
|
||||
<copy todir="${build.dir}">
|
||||
<copy todir="${classes.dir}">
|
||||
<fileset dir="${rc.dir}" />
|
||||
</copy>
|
||||
|
||||
|
|
@ -61,14 +63,20 @@
|
|||
|
||||
<!-- NOTE : These tests should not require the code be packaged or deployed. -->
|
||||
<target name="test" depends="compile" description="Tests the compiled source code using a suitable unit testing framework.">
|
||||
<!-- nothing to do -->
|
||||
|
||||
<junit fork="true">
|
||||
<test name="java.net.jsunit.GeneratedStandaloneTestTest" todir="${tests.logs}">
|
||||
<formatter type="xml" />
|
||||
</test>
|
||||
</junit>
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
<target name="package" depends="test, doc" description="Takes the compiled code and package it in its distributable format.">
|
||||
|
||||
<jar destfile="${target.dir}/${ant.project.name}-${ivy.revision}.jar"
|
||||
basedir="${build.dir}">
|
||||
basedir="${classes.dir}">
|
||||
<include name="**/*"/>
|
||||
</jar>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue