Author: markt
Date: Mon Jun 15 18:58:55 2009
New Revision: 784919
URL: http://svn.apache.org/viewvc?rev=784919&view=rev
Log:
Merge tests into main build.xml as an optional target.
Hopefully start to use Tomcat class as basis for test cases for bugs.
Removed:
tomcat/trunk/test.xml
Modified:
tomcat/trunk/build.xml
Modified: tomcat/trunk/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=784919&r1=784918&r2=784919&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Mon Jun 15 18:58:55 2009
@@ -51,8 +51,7 @@
<property name="tomcat.classes" value="${basedir}/output/classes"/>
<property name="tomcat.dist" value="${basedir}/output/dist"/>
<property name="tomcat.embed" value="${basedir}/output/embed"/>
- <property name="test.failonerror" value="true"/>
- <property name="test.runner" value="junit.textui.TestRunner"/>
+ <property name="test.classes" value="${basedir}/output/testclasses"/>
<property name="compile.source" value="1.6"/>
<property name="compile.target" value="1.6"/>
@@ -93,6 +92,12 @@
<pathelement location="${jdt.jar}"/>
</path>
+ <path id="tomcat.test.classpath">
+ <pathelement location="${test.classes}"/>
+ <pathelement location="${tomcat.classes}"/>
+ <pathelement location="${junit.jar}"/>
+ </path>
+
<!-- Version info filter set -->
<tstamp>
<format property="TODAY" pattern="MMM d yyyy" locale="en"/>
@@ -658,6 +663,42 @@
</target>
+ <target name="test-compile" depends="compile" >
+ <mkdir dir="${test.classes}"/>
+ <!-- Compile -->
+ <javac srcdir="test" destdir="${test.classes}"
+ debug="${compile.debug}"
+ deprecation="${compile.deprecation}"
+ source="${compile.source}"
+ optimize="${compile.optimize}">
+ <classpath refid="tomcat.test.classpath" />
+ <include name="org/apache/**" />
+ </javac>
+ </target>
+
+ <target name="test" description="JUnit test cases"
+ depends="compile,test-compile" >
+
+ <junit printsummary="yes" fork="yes">
+ <classpath refid="tomcat.test.classpath" />
+
+ <formatter type="plain" usefile="false" />
+
+ <batchtest>
+ <fileset dir="test" >
+ <!-- Include all by default -->
+ <include name="**/Test*.java" />
+ <!-- Exclude TestAll ortherwise there will be duplicated -->
+ <exclude name="**/TestAll.java" />
+ <!-- Exclude helper classes -->
+ <exclude name="**/Tester*.java" />
+ <!-- Exclude the tests known to fail -->
+ <exclude name="org/apache/catalina/tribes/**" />
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
<target name="clean-depend"
description="Clean depend src components">
<delete dir="${tomcat-dbcp.home}"/>
@@ -777,6 +818,14 @@
<param name="destdir" value="${json-lib.home}"/>
</antcall>
+ <target name="download" >
+ <antcall target="downloadzip">
+ <param name="sourcefile" value="${junit.loc}"/>
+ <param name="destfile" value="${junit.jar}"/>
+ <param name="destdir" value="${base.path}"/>
+ </antcall>
+ </target>
+
</target>
<target name="build-tomcat-dbcp">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]