Author: ltheussl
Date: Sun Mar 26 11:20:36 2006
New Revision: 388943

URL: http://svn.apache.org/viewcvs?rev=388943&view=rev
Log:
PR: MPTEST-49
test:test should honour the maven.test.compile.src.set variable.

Modified:
    maven/maven-1/plugins/trunk/test/plugin.jelly
    maven/maven-1/plugins/trunk/test/xdocs/changes.xml
    maven/maven-1/plugins/trunk/test/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/test/plugin.jelly
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/test/plugin.jelly?rev=388943&r1=388942&r2=388943&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/test/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/test/plugin.jelly Sun Mar 26 11:20:36 2006
@@ -39,12 +39,16 @@
 
     <j:set var="maven.test.searchdir" value="${maven.test.dest}"/>
     <j:if test="${context.getVariable('maven.test.search.classdir') == null}">
-         <j:set var="maven.test.searchdir" 
value="${pom.build.unitTestSourceDirectory}"/>
+      <j:set var="maven.test.searchdir" 
value="${pom.build.unitTestSourceDirectory}"/>
     </j:if>
+    <ant:path id="_searchdir" location="${maven.test.searchdir}"/>
+    <maven:addPath id="maven.test.compile.src.set" refid="_searchdir"/>
+    <pathconvert pathsep=":" property="_testSrcDirs" 
refid="maven.test.compile.src.set"/>
+    <u:tokenize var="_listOfTestSrcDirs" delim=":">${_testSrcDirs}</u:tokenize>
 
     <j:if test="${unitTestSourcesPresent == 'true' and 
context.getVariable('maven.test.skip') != 'true'}">
       
-      <javac 
+      <javac
         destdir="${maven.test.dest}"
         excludes="**/package.html"
         debug="${maven.compile.debug}"
@@ -185,7 +189,8 @@
           </j:if>
         </classpath>
         <batchtest todir="${maven.test.reportsDirectory}">
-          <fileset dir="${maven.test.searchdir}">
+          <j:forEach var="srcDir" items="${_listOfTestSrcDirs}">
+          <fileset dir="${srcDir}">
             <j:forEach var="pat" items="${pom.build.unitTest.includes}">
               <include name="${pat}"/>
             </j:forEach>
@@ -195,6 +200,7 @@
               <!-- KEEP ALL ABSTRACT TESTS FROM BEING RUN! -->
               <exclude name="**/*AbstractTestCase.java"/>
           </fileset>
+          </j:forEach>
         </batchtest>
       </junit>
 
@@ -443,7 +449,8 @@
             </classpath>
 
             <batchtest todir="${maven.test.reportsDirectory}">
-              <fileset dir="${maven.test.searchdir}">
+              <j:forEach var="srcDir" items="${_listOfTestSrcDirs}">
+              <fileset dir="${srcDir}">
 
                 <!-- includes -->
                 <u:tokenize var="includeItems" 
delim=",">${testmatchpattern}</u:tokenize>
@@ -460,6 +467,7 @@
                 </j:if>
 
               </fileset>
+              </j:forEach>
             </batchtest>
 
           </junit>

Modified: maven/maven-1/plugins/trunk/test/xdocs/changes.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/test/xdocs/changes.xml?rev=388943&r1=388942&r2=388943&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/test/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/test/xdocs/changes.xml Sun Mar 26 11:20:36 2006
@@ -24,6 +24,7 @@
   </properties>
   <body>
     <release version="1.8-SNAPSHOT" date="in SVN">
+      <action dev="ltheussl" type="fix" 
issue="MPTEST-49"><code>test:test</code> should honour the 
<code>maven.test.compile.src.set</code> variable.</action>
       <action dev="ltheussl" type="add" issue="MPTEST-43">Set junit's 
<code>showoutput</code> attribute if Maven is executed in debug (-X) 
mode.</action>
       <action dev="ltheussl" type="add" issue="MPTEST-47" due-to="Henning 
Schmiedehausen">Allow to add additional elements to the test classpath, new 
property <code>maven.test.classpath</code>.</action>
       <action dev="ltheussl" type="add" issue="MPTEST-36">Display a warning if 
some tests do not pass (and 
<code>maven.test.failure.ignore=true</code>).</action>

Modified: maven/maven-1/plugins/trunk/test/xdocs/properties.xml
URL: 
http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/test/xdocs/properties.xml?rev=388943&r1=388942&r2=388943&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/test/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/test/xdocs/properties.xml Sun Mar 26 11:20:36 
2006
@@ -157,6 +157,13 @@
           </td>
         </tr>
         <tr>
+          <td>maven.test.compile.src.set</td>
+          <td>Yes</td>
+          <td>
+            The source directories Maven uses to compile test code.
+          </td>
+        </tr>
+        <tr>
           <td>maven.test.reportsDirectory</td>
           <td>Yes</td>
           <td>


Reply via email to