adammurdoch 2002/06/23 03:39:46
Modified: site/src/xdocs project-descriptor.xml
tools/xsl build.xsl
Log:
- Allow <sysproperty> elements in <unitTests> elements.
- Make sure that compile include/exclude patterns are evaluated when they're
used, rather than at the start of the build.
Revision Changes Path
1.6 +15 -10
jakarta-ant-myrmidon/site/src/xdocs/project-descriptor.xml
Index: project-descriptor.xml
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/site/src/xdocs/project-descriptor.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- project-descriptor.xml 11 Jun 2002 03:52:58 -0000 1.5
+++ project-descriptor.xml 23 Jun 2002 10:39:46 -0000 1.6
@@ -201,6 +201,15 @@
</tr>
<tr>
+ <td>failing</td>
+ <td>Each failing element contains a pattern that matches
a unit test(s)
+ which is known to fail. These tests are run, but do not
abort the
+ build when they fail. This allows tests to be added
prior to implementing
+ the test solutions.</td>
+ <td>no</td>
+ </tr>
+
+ <tr>
<td>includeDescriptors</td>
<td>Controls whether antlib descriptors are generated for
the unit tests. Descriptors are generated by
default.</td>
@@ -221,21 +230,17 @@
</tr>
<tr>
- <td>unitTestPatterns</td>
- <td>The patternset to use to select the unit tests to
execute.
- This is an Ant <code><patternset></code>
datatype.</td>
- <td>no</td>
+ <td>sysproperty</td>
+ <td>Same as the <code><junit></code> Ant task.</td>
+ <td>yes</td>
</tr>
<tr>
- <td>failing</td>
- <td>Each failing element contains a pattern that matches
a unit test(s)
- which is known to fail. These tests are run, but do not
abort the
- build when they fail. This allows tests to be added
prior to implementing
- the test solutions.</td>
+ <td>unitTestPatterns</td>
+ <td>The patternset to use to select the unit tests to
execute.
+ This is an Ant <code><patternset></code>
datatype.</td>
<td>no</td>
</tr>
-
</table>
</subsection>
1.27 +8 -5 jakarta-ant-myrmidon/tools/xsl/build.xsl
Index: build.xsl
===================================================================
RCS file: /home/cvs/jakarta-ant-myrmidon/tools/xsl/build.xsl,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- build.xsl 23 Jun 2002 08:26:31 -0000 1.26
+++ build.xsl 23 Jun 2002 10:39:46 -0000 1.27
@@ -149,8 +149,7 @@
<xsl:choose>
<xsl:when test="unitTest">
<patternset id="project.test.patternset">
- <patternset refid="project.compile.patternset"/>
- <xsl:for-each select="unitTest/compilePatterns">
+ <xsl:for-each
select="../compilePatterns|unitTest/compilePatterns">
<xsl:copy-of select="*|@*"/>
</xsl:for-each>
</patternset>
@@ -214,6 +213,7 @@
<sysproperty key="test.basedir"
file="${{test.classes}}"/>
<sysproperty key="test.libdir"
file="${{build.lib}}"/>
+ <xsl:copy-of select="unitTest/sysproperty"/>
<formatter type="xml"/> <!-- xml reports for
junitreport -->
<formatter type="plain"/> <!-- text reports for
humans -->
@@ -245,7 +245,11 @@
</junit>
</target>
- <target name="test" if="tests.failed"
depends="run-tests" description="Runs the unit tests">
+ <target name="test"
+ if="tests.failed"
+ unless="test.nofail"
+ depends="run-tests"
+ description="Runs the unit tests">
<fail>Unit tests failed.</fail>
</target>
</xsl:when>
@@ -367,8 +371,7 @@
</xsl:for-each>
</path>
<patternset id="{$build-id}.compile.patternset">
- <patternset refid="project.compile.patternset"/>
- <xsl:for-each select="compilePatterns">
+ <xsl:for-each select="../compilePatterns|compilePatterns">
<xsl:copy-of select="*|@*"/>
</xsl:for-each>
</patternset>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>