You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by br...@apache.org on 2002/03/08 15:23:03 UTC

cvs commit: jakarta-turbine-maven/src/templates/build build-test.xml build.xml

brekke      02/03/08 06:23:03

  Modified:    src/templates/build build-test.xml build.xml
  Log:
  Added a single test target for running just one test case.  Specify the class
  name to run in the testcase property.  Example:
  
  ant -Dtestcase=org.apache.maven.java.JavaDocVisitorTest maven:singletest
  
  Revision  Changes    Path
  1.9       +28 -0     jakarta-turbine-maven/src/templates/build/build-test.xml
  
  Index: build-test.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build-test.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- build-test.xml	5 Mar 2002 16:27:18 -0000	1.8
  +++ build-test.xml	8 Mar 2002 14:23:03 -0000	1.9
  @@ -75,4 +75,32 @@
       </junit>
     </target>
   
  +  <!-- ================================================================== -->
  +  <!-- R U N  A  S I N G L E  T E S T                                     -->
  +  <!-- ================================================================== -->
  +
  +  <target 
  +    name="run-singletest" 
  +    depends="compile"
  +    if="testcase"
  +    description="runs a single (junit) unit test.  Define the testcase on the command-line: -Dtestcase=">
  +    
  +    <echo>
  +      Running a single JUnit test
  +    </echo>
  +    
  +    <mkdir dir="${test.reportsDirectory}"/>
  +    
  +    <junit printSummary="yes" haltonfailure="yes">
  +      <sysproperty key="basedir" value="${basedir}"/>
  +      <formatter type="plain"/>
  +      <classpath>
  +        <path refid="classpath"/>
  +        <pathelement location="${build.dest}"/>
  +      </classpath>
  +      
  +       <test todir="${test.reportsDirectory}" name="${testcase}"/>
  +    </junit>
  +  </target>
  +
   </project>
  
  
  
  1.20      +5 -1      jakarta-turbine-maven/src/templates/build/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/templates/build/build.xml,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- build.xml	5 Mar 2002 04:58:43 -0000	1.19
  +++ build.xml	8 Mar 2002 14:23:03 -0000	1.20
  @@ -43,7 +43,11 @@
       <target name="maven:test">
         <ant antfile="maven/build-test.xml" target="test"/>
       </target>
  -        
  +
  +    <target name="maven:singletest">
  +      <ant antfile="maven/build-test.xml" target="run-singletest"/>
  +    </target>
  +          
       <target name="maven:clean">
         <ant antfile="maven/build-maven.xml" target="clean"/>
       </target>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>