r63830 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63829‎ | r63830 | r63831 >
Date:20:06, 16 March 2010
Author:mah
Status:deferred
Tags:
Comment:
Create test target for ant.
Modified paths:
  • /trunk/lucene-search-2/build.xml (modified) (history)

Diff [purge]

Index: trunk/lucene-search-2/build.xml
@@ -4,6 +4,7 @@
55 <property name="bin" value="bin"/>
66 <property name="src" value="src"/>
77 <property name="jars" value="jars"/>
 8+ <property name="test" value="test"/>
89 <property name="dist" location="dist"/>
910 <property name="pack.name" value="lucene-search-2.1"/>
1011 <property name="src.name" value="lucene-search-src-2.1"/>
@@ -21,6 +22,7 @@
2223
2324 <path id="classpath">
2425 <fileset dir="${lib}" includes="*.jar"/>
 26+ <file name="${jar.name}"/>
2527 </path>
2628
2729 <target name="run">
@@ -123,4 +125,32 @@
124126 <delete file="${dist}/${binary.name}.tar"/>
125127 </target>
126128
 129+ <target name="test-build" description="Compile the junit tests">
 130+ <javac srcdir="${test}" destdir="${test}">
 131+ <classpath>
 132+ <pathelement path="${java.class.path}"/>
 133+ <pathelement location="${collector.dir}"/>
 134+ <pathelement path="${jar.name}"/>
 135+ </classpath>
 136+ </javac>
 137+ </target>
 138+
 139+ <target name="test" depends="test-build">
 140+ <property name="collector.dir" value="${test}"/>
 141+ <available file="${collector.dir}/${collector.class}.class" property="hasFailingTests"/>
 142+
 143+ <junit haltonerror="false" haltonfailure="false">
 144+ <classpath>
 145+ <pathelement path="${java.class.path}"/>
 146+ <pathelement location="${collector.dir}"/>
 147+ <pathelement path="${jar.name}"/>
 148+ </classpath>
 149+ <sysproperty key="ant.junit.failureCollector" value="${collector.dir}/${collector.class}"/>
 150+
 151+ <batchtest fork="yes" todir="${collector.dir}" unless="hasFailingTests">
 152+ <fileset dir="${collector.dir}" includes="**/*.java" excludes="**/${collector.class}.*"/>
 153+ <formatter type="plain" usefile="false"/>
 154+ </batchtest>
 155+ </junit>
 156+ </target>
127157 </project>

Status & tagging log