geirm 02/01/10 06:01:37
Modified: . build.xml
Log:
Added testing framework
Revision Changes Path
1.7 +59 -0 jakarta-velocity-dvsl/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-velocity-dvsl/build.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- build.xml 8 Jan 2002 10:03:29 -0000 1.6
+++ build.xml 10 Jan 2002 14:01:37 -0000 1.7
@@ -60,6 +60,26 @@
</fileset>
</path>
+
+
+
+<!-- ========== Test Execution Defaults =================================== -->
+
+
+ <!-- Construct unit test classpath -->
+ <path id="test.classpath">
+ <pathelement location="${build.home}/classes"/>
+ <pathelement location="${build.home}/tests"/>
+ <path refid="classpath" />
+ </path>
+
+ <!-- Should all tests fail if one does? -->
+ <property name="test.failonerror" value="true"/>
+
+ <!-- The test runner to execute -->
+ <property name="test.runner" value="junit.textui.TestRunner"/>
+
+
<!-- ========== Executable Targets ======================================== -->
<!-- ================================================================== -->
@@ -81,6 +101,7 @@
<mkdir dir="${build.home}/classes"/>
<mkdir dir="${build.home}/conf"/>
<mkdir dir="${build.home}/javadoc"/>
+ <mkdir dir="${build.home}/tests"/>
</target>
<!-- ================================================================== -->
@@ -121,6 +142,25 @@
<!-- ================================================================== -->
+ <!-- C O M P I L E - T E S T -->
+ <!-- ================================================================== -->
+ <target name="compile-tests" depends="compile" description="Compile Testcases">
+
+ <javac srcdir="${source.home}/test"
+ destdir="${build.home}/tests"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ optimize="${compile.optimize}">
+ <classpath refid="test.classpath"/>
+ </javac>
+
+ <copy todir="${build.home}/classes" filtering="on">
+ <fileset dir="${source.home}/java" excludes="**/*.java"/>
+ </copy>
+
+ </target>
+
+ <!-- ================================================================== -->
<!-- C L E A N -->
<!-- ================================================================== -->
<target name="clean"
@@ -198,6 +238,25 @@
excludes="**/project.xml"
includes="**/*.xml"
/>
+ </target>
+
+
+
+ <!-- ================================================================== -->
+ <!-- T E S T -->
+ <!-- ================================================================== -->
+
+ <target name="test" depends="test.transform"
+ description="Run all unit tests">
+ </target>
+
+ <target name="test.transform" depends="compile-tests">
+ <echo message="Running basic transform test"/>
+ <java classname="${test.runner}" fork="yes"
+ failonerror="${test.failonerror}">
+ <arg value="org.apache.tools.dvsl.TransformTest"/>
+ <classpath refid="test.classpath"/>
+ </java>
</target>
</project>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>