geirm 2003/10/27 04:31:35
Modified: build build.xml
Log:
added parallel-directory unit test support
Revision Changes Path
1.64 +31 -1 jakarta-velocity/build/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity/build/build.xml,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- build.xml 10 Oct 2003 20:44:54 -0000 1.63
+++ build.xml 27 Oct 2003 12:31:35 -0000 1.64
@@ -21,6 +21,7 @@
<property name="example.dir" value="../examples"/>
<property name="src.java.dir" value="../src/java"/>
+ <property name="test.java.dir" value="../src/test"/>
<property name="javadoc.destdir" value="../docs/api"/>
<property name="final.name" value="${project}-${version}"/>
<property name="dist.root" value="../dist"/>
@@ -155,6 +156,12 @@
</fileset>
</copy>
+ <copy todir="${build.src}" filtering="yes">
+ <fileset dir="${test.java.dir}">
+ <include name="**/*.java"/>
+ </fileset>
+ </copy>
+
<!-- chose a class that's from j2ee.jar -->
<available classname="javax.sql.DataSource"
property="J2EE.present">
@@ -835,10 +842,33 @@
<!-- JUnit Tests for Velocity -->
<!-- =================================================================== -->
<target name="test"
- depends="compile"
+ depends="compile, junittest"
description="--> Run the testcases">
<ant antfile="testcases.xml" target="test-all"/>
</target>
+
+ <target name="junittest" depends="compile"
+ description="Run non-legacy unit test cases">
+
+ <junit dir="./" printSummary="yes" fork="true" haltonerror="true">
+
+ <sysproperty key="basedir" value="../src/test"></sysproperty>
+
+ <classpath>
+ <fileset dir="lib">
+ <include name="*.jar"></include>
+ </fileset>
+ <pathelement path="${build.dest}"></pathelement>
+ </classpath>
+
+ <batchtest>
+ <fileset dir="../src/test">
+ <include name="**/Test*.java"></include>
+ </fileset>
+ </batchtest>
+
+ </junit>
+ </target>
<target name="test-clean"
description="--> Cleanup after the testcases">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]