SOLR-2612 -- Add testpackage and testpackageroot conditions to clustering and analysis-extras build files

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1138319 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2011-06-22 06:58:57 +00:00
parent feb428d5fb
commit 32e456ebbf
2 changed files with 35 additions and 3 deletions

View File

@ -135,6 +135,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="no" <junit printsummary="no"
haltonfailure="no" haltonfailure="no"
maxmemory="512M" maxmemory="512M"
@ -169,12 +179,18 @@
<enable package="org.apache.solr"/> <enable package="org.apache.solr"/>
</assertions> </assertions>
<formatter type="${junit.formatter}"/> <formatter type="${junit.formatter}"/>
<batchtest fork="yes" todir="${junit.output.dir}" unless="testcase"> <batchtest fork="yes" todir="${junit.output.dir}" if="runall">
<fileset dir="src/test" includes="${junit.includes}"/> <fileset dir="src/test" 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" includes="**/${testcase}.java"/> <fileset dir="src/test" includes="**/${testcase}.java"/>
</batchtest> </batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackage">
<fileset dir="src/test" includes="**/${testpackage}/**/Test*.java,**/${testpackage}/**/*Test.java" />
</batchtest>
<batchtest fork="yes" todir="${junit.output.dir}" if="testpackageroot">
<fileset dir="src/test" includes="**/${testpackageroot}/Test*.java,**/${testpackageroot}/*Test.java" />
</batchtest>
</junit> </junit>
<fail if="tests.failed">Tests failed!</fail> <fail if="tests.failed">Tests failed!</fail>

View File

@ -107,6 +107,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="no" <junit printsummary="no"
haltonfailure="no" haltonfailure="no"
maxmemory="512M" maxmemory="512M"
@ -141,7 +151,7 @@
<enable package="org.apache.solr"/> <enable package="org.apache.solr"/>
</assertions> </assertions>
<formatter type="${junit.formatter}"/> <formatter type="${junit.formatter}"/>
<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}">
<exclude name="**/AbstractClusteringTest*"/> <exclude name="**/AbstractClusteringTest*"/>
</fileset> </fileset>
@ -149,6 +159,12 @@
<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>