lucene/build-deprecated.xml

60 lines
2.7 KiB
XML

<project name="build-deprecated">
<!-- 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>
<!-- 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>
<target name="compile-test-deprecated" depends="compile-core,compile-demo">
<mkdir dir="${build.dir}/classes/test-deprecated"/>
<compile
srcdir="src/test-deprecated"
destdir="${build.dir}/classes/test-deprecated">
<classpath refid="test-deprecated.classpath"/>
</compile>
</target>
<!-- ================================================================== -->
<!-- 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-deprecated" depends="compile-test-deprecated" description="Runs deprecated 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-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-deprecated" includes="**/Test*.java"/>
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
<fileset dir="src/test-deprecated" includes="**/${testcase}.java"/>
</batchtest>
</junit>
<fail if="tests.failed">Tests failed!</fail>
</target>
</project>