PR: MPTEST-49

test:test should honour the maven.test.compile.src.set variable.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@388943 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl
2006-03-26 19:20:36 +00:00
parent 0e51f0abbc
commit 1e8d685729
3 changed files with 20 additions and 4 deletions

View File

@@ -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>

View File

@@ -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>

View File

@@ -156,6 +156,13 @@
</p>
</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>