lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-lucene build.xml
Date Thu, 18 Sep 2003 18:09:28 GMT
ehatcher    2003/09/18 11:09:28

  Modified:    .        build.xml
  Log:
  test failure = build failure.
  
  also, added XML test output capture and a standalone
  generate-test-reports target to make HTML test
  results reports.
  
  Revision  Changes    Path
  1.46      +15 -1     jakarta-lucene/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/build.xml,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- build.xml	18 Sep 2003 17:42:35 -0000	1.45
  +++ build.xml	18 Sep 2003 18:09:28 -0000	1.46
  @@ -259,9 +259,11 @@
     <!-- ================================================================== -->
     <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,10 +272,22 @@
           <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                                          -->
  
  
  

Mime
View raw message