|
80 | 80 | </fileset> |
81 | 81 | <!-- global test dependencies --> |
82 | 82 | <fileset dir="${nutch.root}/build/test/lib"> |
| 83 | + <include name="apiguardian*.jar" /> |
83 | 84 | <include name="hamcrest*.jar" /> |
84 | 85 | <include name="junit*.jar" /> |
85 | 86 | <include name="opentest4j*.jar" /> |
|
208 | 209 | <!-- ================================================================== --> |
209 | 210 | <target name="test" depends="compile-test, deploy" if="test.available"> |
210 | 211 | <echo message="Testing plugin: ${name}"/> |
211 | | - |
212 | | - <!--junit printsummary="yes" haltonfailure="no" fork="yes" |
213 | | - errorProperty="tests.failed" failureProperty="tests.failed"> |
214 | | - <sysproperty key="test.data" value="${build.test}/data"/> |
215 | | - <sysproperty key="test.input" value="${root}/data"/> |
216 | | - <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/> |
217 | | - <classpath refid="test.classpath"/> |
218 | | - <formatter type="${test.junit.output.format}" /> |
219 | | - <batchtest todir="${build.test}" unless="testcase"> |
220 | | - <fileset dir="${src.test}" |
221 | | - includes="**/Test*.java" excludes="**/${test.exclude}.java" /> |
222 | | - </batchtest> |
223 | | - <batchtest todir="${build.test}" if="testcase"> |
224 | | - <fileset dir="${src.test}" includes="**/${testcase}.java"/> |
225 | | - </batchtest> |
226 | | - </junit--> |
227 | | - |
228 | 212 | <junitlauncher printSummary="true" haltOnFailure="true" failureProperty="tests.failed"> |
229 | 213 | <classpath refid="test.classpath"/> |
230 | 214 | <testclasses outputDir="${build.test}" unless="testcase"> |
231 | | - <listener type="${test.junit.output.format}" sendSysOut="true" sendSysErr="true"/> |
232 | | - <fork dir="${basedir}"> |
| 215 | + <listener type="legacy-plain" sendSysOut="true" sendSysErr="true"/> |
| 216 | + <listener type="legacy-xml" sendSysOut="true" sendSysErr="true"/> |
| 217 | + <fork forkMode="perTestClass"> |
| 218 | + <jvmarg value="-Xmx1000m"/> |
233 | 219 | <sysproperty key="test.data" value="${build.test}/data"/> |
234 | 220 | <sysproperty key="test.input" value="${root}/data"/> |
235 | 221 | <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/> |
|
240 | 226 | </fileset> |
241 | 227 | </testclasses> |
242 | 228 | <testclasses outputDir="${build.test}" if="testcase"> |
243 | | - <listener type="${test.junit.output.format}" sendSysOut="true" sendSysErr="true"/> |
244 | | - <fork dir="${basedir}"> |
| 229 | + <listener type="legacy-plain" sendSysOut="true" sendSysErr="true"/> |
| 230 | + <listener type="legacy-xml" sendSysOut="true" sendSysErr="true"/> |
| 231 | + <fork forkMode="perTestClass"> |
| 232 | + <jvmarg value="-Xmx1000m"/> |
245 | 233 | <sysproperty key="test.data" value="${build.test}/data"/> |
246 | 234 | <sysproperty key="test.input" value="${root}/data"/> |
247 | 235 | <sysproperty key="javax.xml.parsers.DocumentBuilderFactory" value="com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/> |
248 | 236 | </fork> |
249 | | - <fileset dir="${build.test}"> |
| 237 | + <fileset dir="${basedir}"> |
250 | 238 | <include name="**/${testcase}.class"/> |
251 | 239 | </fileset> |
252 | 240 | </testclasses> |
253 | 241 | </junitlauncher> |
254 | | - |
255 | 242 | <fail if="tests.failed">Tests failed!</fail> |
256 | 243 | </target> |
257 | 244 |
|
|
0 commit comments