mirror of https://github.com/apache/lucene.git
test failure = build failure.
also, added XML test output capture and a standalone generate-test-reports target to make HTML test results reports. git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150046 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
404a71b517
commit
9f8e6fcaf1
16
build.xml
16
build.xml
|
@ -259,9 +259,11 @@ Implementation-Vendor: Lucene
|
|||
<!-- ================================================================== -->
|
||||
<target name="test" depends="compile-test" if="junit.present">
|
||||
<mkdir dir="${junit.reports}"/>
|
||||
<junit printsummary="off" haltonfailure="no">
|
||||
<junit printsummary="off" haltonfailure="no"
|
||||
errorProperty="tests.failed" failureProperty="tests.failed">
|
||||
<classpath refid="junit.classpath"/>
|
||||
<formatter type="plain"/>
|
||||
<formatter type="xml"/>
|
||||
<formatter type="brief" usefile="false"/>
|
||||
<batchtest fork="yes" todir="${junit.reports}" unless="testcase">
|
||||
<fileset dir="${junit.src}" includes="**/Test*.java"/>
|
||||
|
@ -270,11 +272,23 @@ Implementation-Vendor: Lucene
|
|||
<fileset dir="${junit.src}" includes="**/${testcase}.java"/>
|
||||
</batchtest>
|
||||
</junit>
|
||||
|
||||
<fail if="tests.failed">Tests failed!</fail>
|
||||
</target>
|
||||
|
||||
<!-- backwards compatible target - may be removed -->
|
||||
<target name="test-unit" depends="test"/>
|
||||
|
||||
<target name="generate-test-reports" description="Generate test reports">
|
||||
<mkdir dir="${junit.reports}/html"/>
|
||||
<junitreport todir="${junit.reports}">
|
||||
<fileset dir="${junit.reports}">
|
||||
<include name="TEST-*.xml"/>
|
||||
</fileset>
|
||||
<report format="frames" todir="${junit.reports}/html"/>
|
||||
</junitreport>
|
||||
</target>
|
||||
|
||||
<!-- ================================================================== -->
|
||||
<!-- D O C U M E N T A T I O N -->
|
||||
<!-- ================================================================== -->
|
||||
|
|
Loading…
Reference in New Issue