You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by bm...@apache.org on 2004/12/05 19:24:36 UTC
cvs commit: jakarta-lucene build.xml
bmesser 2004/12/05 10:24:36
Modified: . build.xml
Log:
add task "test-deprecated" to run deprecated test cases.
Revision Changes Path
1.68 +81 -15 jakarta-lucene/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-lucene/build.xml,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- build.xml 20 Sep 2004 18:16:50 -0000 1.67
+++ build.xml 5 Dec 2004 18:24:35 -0000 1.68
@@ -59,6 +59,12 @@
<pathelement location="${build.dir}/classes/test"/>
</path>
+ <!-- classpath for deprecated test cases, should be removed when moving from 1.9 to 2.0 -->
+ <path id="test-deprecated.classpath">
+ <path refid="demo.classpath"/>
+ <pathelement location="${build.dir}/classes/test-deprecated"/>
+ </path>
+
<path id="junit.classpath">
<pathelement location="${build.dir}/classes/test"/>
<pathelement location="${build.dir}/classes/java"/>
@@ -69,6 +75,17 @@
<pathelement path="${java.class.path}"/>
</path>
+ <!-- junit classpath for deprecated test cases, should be removed when moving from 1.9 to 2.0 -->
+ <path id="junit-deprecated.classpath">
+ <pathelement location="${build.dir}/classes/test-deprecated"/>
+ <pathelement location="${build.dir}/classes/java"/>
+ <pathelement location="${build.dir}/classes/demo"/>
+ <fileset dir="lib">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement path="${java.class.path}"/>
+ </path>
+
<path id="anakia.classpath">
<fileset dir="${jakarta.site2.home}/lib">
<include name="*.jar"/>
@@ -226,28 +243,28 @@
<!-- ================================================================== -->
- <!-- B U I L D T E S T -->
+ <!-- B U I L D D E P R E C A T E D T E S T -->
<!-- ================================================================== -->
- <!-- -->
+ <!-- should be removed when moving from lucene 1.9 to 2.0 -->
<!-- ================================================================== -->
- <target name="compile-test" depends="compile-core,compile-demo">
- <mkdir dir="${build.dir}/classes/test"/>
+ <target name="compile-test-deprecated" depends="compile-core,compile-demo">
+ <mkdir dir="${build.dir}/classes/test-deprecated"/>
<javac
encoding="${build.encoding}"
- srcdir="src/test"
+ srcdir="src/test-deprecated"
includes="**/*.java"
- destdir="${build.dir}/classes/test"
+ destdir="${build.dir}/classes/test-deprecated"
debug="true">
- <classpath refid="test.classpath"/>
+ <classpath refid="test-deprecated.classpath"/>
</javac>
</target>
<!-- ================================================================== -->
- <!-- R U N T E S T S -->
+ <!-- R U N D E P R E C A T E D T E S T S -->
<!-- ================================================================== -->
- <!-- -->
+ <!-- should be removed when moving from lucene 1.9 to 2.0 -->
<!-- ================================================================== -->
- <target name="test" depends="compile-test" description="Runs unit tests">
+ <target name="test-deprecated" depends="compile-test-deprecated" description="Runs deprecated unit tests">
<fail unless="junit.present">
##################################################################
JUnit not found.
@@ -258,22 +275,71 @@
<mkdir dir="${junit.output.dir}"/>
<junit printsummary="off" haltonfailure="no"
errorProperty="tests.failed" failureProperty="tests.failed">
- <classpath refid="junit.classpath"/>
- <sysproperty key="dataDir" file="src/test"/>
- <sysproperty key="tempDir" file="${build.dir}/test"/>
+ <classpath refid="junit-deprecated.classpath"/>
+ <sysproperty key="dataDir" file="src/test-deprecated"/>
+ <sysproperty key="tempDir" file="${build.dir}/test-deprecated"/>
<formatter type="xml"/>
<formatter type="brief" usefile="false"/>
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
- <fileset dir="src/test" includes="**/Test*.java"/>
+ <fileset dir="src/test-deprecated" includes="**/Test*.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
- <fileset dir="src/test" includes="**/${testcase}.java"/>
+ <fileset dir="src/test-deprecated" includes="**/${testcase}.java"/>
</batchtest>
</junit>
<fail if="tests.failed">Tests failed!</fail>
</target>
+ <!-- ================================================================== -->
+ <!-- B U I L D T E S T -->
+ <!-- ================================================================== -->
+ <!-- -->
+ <!-- ================================================================== -->
+ <target name="compile-test" depends="compile-core,compile-demo">
+ <mkdir dir="${build.dir}/classes/test"/>
+ <javac
+ encoding="${build.encoding}"
+ srcdir="src/test"
+ includes="**/*.java"
+ destdir="${build.dir}/classes/test"
+ debug="true">
+ <classpath refid="test.classpath"/>
+ </javac>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- R U N T E S T S -->
+ <!-- ================================================================== -->
+ <!-- -->
+ <!-- ================================================================== -->
+ <target name="test" depends="compile-test" description="Runs unit tests">
+ <fail unless="junit.present">
+ ##################################################################
+ JUnit not found.
+ Please make sure junit.jar is in ANT_HOME/lib, or made available
+ to Ant using other mechanisms like -lib or CLASSPATH.
+ ##################################################################
+ </fail>
+ <mkdir dir="${junit.output.dir}"/>
+ <junit printsummary="off" haltonfailure="no"
+ errorProperty="tests.failed" failureProperty="tests.failed">
+ <classpath refid="junit.classpath"/>
+ <sysproperty key="dataDir" file="src/test"/>
+ <sysproperty key="tempDir" file="${build.dir}/test"/>
+ <formatter type="xml"/>
+ <formatter type="brief" usefile="false"/>
+ <batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
+ <fileset dir="src/test" includes="**/Test*.java"/>
+ </batchtest>
+ <batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
+ <fileset dir="src/test" includes="**/${testcase}.java"/>
+ </batchtest>
+ </junit>
+
+ <fail if="tests.failed">Tests failed!</fail>
+ </target>
+
<!-- backwards compatible target - may be removed -->
<target name="test-unit" depends="test"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org