Deprecated testmatch property by testmatchpattern to allow more complex patterns in test:match
Added testnotmatchpattern that can be used in test:match git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@190026 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -307,11 +307,16 @@
|
||||
|
||||
<j:if test="${unitTestSourcesPresent == 'true'}">
|
||||
|
||||
<j:if test="${context.getVariable('testmatch') != null}">
|
||||
<echo>[deprecated] testmatch property is deprecated, please use testmatchpattern instead</echo>
|
||||
<j:set var="testmatchpattern" value="**/${testmatch}.*"/>
|
||||
</j:if>
|
||||
|
||||
<j:choose>
|
||||
<j:when test="${empty(testmatch)}">
|
||||
<j:when test="${empty(testmatchpattern)}">
|
||||
<echo>
|
||||
You must define the test case to run via -Dtestmatch=pattern
|
||||
Example: maven -Dtestmatch=*Foo* test:match
|
||||
You must define the test case to run via -Dtestmatchpattern=pattern
|
||||
Example: maven -Dtestmatchpattern=*Foo* test:match
|
||||
</echo>
|
||||
</j:when>
|
||||
|
||||
@@ -361,7 +366,10 @@
|
||||
|
||||
<batchtest todir="${maven.test.reportsDirectory}">
|
||||
<fileset dir="${maven.test.searchdir}">
|
||||
<include name="**/${testmatch}.*"/>
|
||||
<include name="${testmatchpattern}"/>
|
||||
<j:if test="${context.getVariable('testnotmatchpattern') != null}">
|
||||
<exclude name="${testnotmatchpattern}"/>
|
||||
</j:if>
|
||||
</fileset>
|
||||
</batchtest>
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
</properties>
|
||||
<body>
|
||||
<release version="1.7-SNAPSHOT" date="in CVS">
|
||||
<action dev="carlos" type="add">Added testnotmatchpattern that can be used in test:match</action>
|
||||
<action dev="carlos" type="fix" issue="MPTEST-48">Deprecated testmatch property by testmatchpattern to allow more complex patterns in test:match</action>
|
||||
<action dev="brett" type="update">Deprecate dependency handle</action>
|
||||
</release>
|
||||
<release version="1.6.2" date="2004-06-25">
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
</goal>
|
||||
<goal>
|
||||
<name>test:match</name>
|
||||
<description>Execute all the tests matching the given 'testmatch' variable</description>
|
||||
<description>Execute all the tests matching the given 'testmatchpattern' variable
|
||||
nd excluding those in 'testnotmatchpattern' variable</description>
|
||||
</goal>
|
||||
<goal>
|
||||
<name>test:match-test</name>
|
||||
|
||||
@@ -252,10 +252,17 @@ maven.test.search.classdir=true
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>testmatch</td>
|
||||
<td>testmatchpattern</td>
|
||||
<td>Yes (required in test:match)</td>
|
||||
<td>
|
||||
Ant pattern used in test:match goal to specify the tests that should run
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>testnotmatchpattern</td>
|
||||
<td>Yes</td>
|
||||
<td>
|
||||
Used in test:match goal to specify the tests that should run
|
||||
Ant pattern used in test:match goal to specify the tests that shouldn't run
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user