mirror of https://github.com/apache/lucene.git
SOLR-2009: Contrib ant test targets do not respect sys props testcase,testpackage,and testpackageroot
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@966880 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c6432e97a7
commit
cec16f399a
|
@ -133,6 +133,16 @@
|
||||||
<target name="testCore" depends="compileTests">
|
<target name="testCore" depends="compileTests">
|
||||||
<mkdir dir="${junit.output.dir}"/>
|
<mkdir dir="${junit.output.dir}"/>
|
||||||
|
|
||||||
|
<condition property="runall">
|
||||||
|
<not>
|
||||||
|
<or>
|
||||||
|
<isset property="testcase"/>
|
||||||
|
<isset property="testpackage"/>
|
||||||
|
<isset property="testpackageroot"/>
|
||||||
|
</or>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<junit printsummary="on"
|
<junit printsummary="on"
|
||||||
haltonfailure="no"
|
haltonfailure="no"
|
||||||
maxmemory="512M"
|
maxmemory="512M"
|
||||||
|
@ -144,12 +154,18 @@
|
||||||
<formatter type="brief" usefile="false" if="junit.details"/>
|
<formatter type="brief" usefile="false" if="junit.details"/>
|
||||||
<classpath refid="test.classpath"/>
|
<classpath refid="test.classpath"/>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
|
||||||
<fileset dir="src/test/java" includes="${junit.includes}"/>
|
<fileset dir="src/test/java" includes="${junit.includes}"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
||||||
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
|
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
|
||||||
|
<fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
|
||||||
|
</batchtest>
|
||||||
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
|
||||||
|
<fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
|
||||||
|
</batchtest>
|
||||||
</junit>
|
</junit>
|
||||||
|
|
||||||
<fail if="tests.failed">Tests failed!</fail>
|
<fail if="tests.failed">Tests failed!</fail>
|
||||||
|
@ -158,6 +174,16 @@
|
||||||
<target name="testExtras" depends="compileExtrasTests">
|
<target name="testExtras" depends="compileExtrasTests">
|
||||||
<mkdir dir="${junit.output.dir}"/>
|
<mkdir dir="${junit.output.dir}"/>
|
||||||
|
|
||||||
|
<condition property="runall">
|
||||||
|
<not>
|
||||||
|
<or>
|
||||||
|
<isset property="testcase"/>
|
||||||
|
<isset property="testpackage"/>
|
||||||
|
<isset property="testpackageroot"/>
|
||||||
|
</or>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<junit printsummary="on"
|
<junit printsummary="on"
|
||||||
haltonfailure="no"
|
haltonfailure="no"
|
||||||
maxmemory="512M"
|
maxmemory="512M"
|
||||||
|
@ -172,12 +198,21 @@
|
||||||
<enable package="org.apache.solr"/>
|
<enable package="org.apache.solr"/>
|
||||||
</assertions>
|
</assertions>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
|
||||||
|
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
|
||||||
<fileset dir="src/extras/test/java" includes="${junit.includes}"/>
|
<fileset dir="src/extras/test/java" includes="${junit.includes}"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
||||||
<fileset dir="src/extras/test/java" includes="**/${testcase}.java"/>
|
<fileset dir="src/extras/test/java" includes="**/${testcase}.java"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
|
||||||
|
<fileset dir="src/extras/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
|
||||||
|
</batchtest>
|
||||||
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
|
||||||
|
<fileset dir="src/extras/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
|
||||||
|
</batchtest>
|
||||||
|
|
||||||
|
|
||||||
</junit>
|
</junit>
|
||||||
|
|
||||||
<fail if="tests.failed">Tests failed!</fail>
|
<fail if="tests.failed">Tests failed!</fail>
|
||||||
|
|
|
@ -81,6 +81,16 @@
|
||||||
<target name="test" depends="compileTests">
|
<target name="test" depends="compileTests">
|
||||||
<mkdir dir="${junit.output.dir}"/>
|
<mkdir dir="${junit.output.dir}"/>
|
||||||
|
|
||||||
|
<condition property="runall">
|
||||||
|
<not>
|
||||||
|
<or>
|
||||||
|
<isset property="testcase"/>
|
||||||
|
<isset property="testpackage"/>
|
||||||
|
<isset property="testpackageroot"/>
|
||||||
|
</or>
|
||||||
|
</not>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<junit printsummary="on"
|
<junit printsummary="on"
|
||||||
haltonfailure="no"
|
haltonfailure="no"
|
||||||
maxmemory="512M"
|
maxmemory="512M"
|
||||||
|
@ -96,12 +106,18 @@
|
||||||
<enable package="org.apache.solr"/>
|
<enable package="org.apache.solr"/>
|
||||||
</assertions>
|
</assertions>
|
||||||
<formatter type="xml"/>
|
<formatter type="xml"/>
|
||||||
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase">
|
<batchtest fork="yes" todir="${junit.output.dir}" if="runall">
|
||||||
<fileset dir="src/test/java" includes="${junit.includes}"/>
|
<fileset dir="src/test/java" includes="${junit.includes}"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testcase">
|
||||||
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
|
<fileset dir="src/test/java" includes="**/${testcase}.java"/>
|
||||||
</batchtest>
|
</batchtest>
|
||||||
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
|
||||||
|
<fileset dir="src/test/java" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java"/>
|
||||||
|
</batchtest>
|
||||||
|
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
|
||||||
|
<fileset dir="src/test/java" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java"/>
|
||||||
|
</batchtest>
|
||||||
</junit>
|
</junit>
|
||||||
|
|
||||||
<fail if="tests.failed">Tests failed!</fail>
|
<fail if="tests.failed">Tests failed!</fail>
|
||||||
|
|
Loading…
Reference in New Issue