antlets/junit/src/resources/stylesheets test.xsl,NONE,1.1
[email protected] Thu, 26 Feb 2004 09:11:14 -0800
| Newsgroups | gmane.comp.krysalis.metamorphosis.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/metamorphosis/antlets/junit/src/resources/stylesheets
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6683/junit/src/resources/stylesheets
Added Files:
test.xsl
Log Message:
Added junit antlet
--- NEW FILE: test.xsl ---
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method = "xml"
omit-xml-declaration="no"
indent="yes" />
<xsl:param name="testcase" />
<xsl:param name="projectName" />
<xsl:template match="/">
<project default="test" >
<xsl:attribute name = "name" >junit.antlet-text-<xsl:value-of select="$projectName"/></xsl:attribute>
<description>
Actually perform the unit tests using JUnit.
</description>
<!-- =================================================================== -->
<!-- Tests -->
<!-- =================================================================== -->
<target name="test">
<junit printsummary="yes" fork="yes">
<xsl:attribute name = "haltonfailure" >${junit.test.haltonfailure}</xsl:attribute>
<formatter type="xml" />
<formatter type="plain" usefile="no"/>
<!-- add sysproperties from properties.xml -->
<xsl:for-each select = "//junit/antlet/extra/sysproperty">
<sysproperty key="{@key}"
value="{@value}"/>
</xsl:for-each>
<classpath>
<path >
<xsl:attribute name = "refid" ><xsl:value-of select="$projectName"/>.classpath</xsl:attribute>
</path>
<path refid="junit.classpath"/>
<pathelement>
<xsl:attribute name="path">${project.build.dir}/classes</xsl:attribute>
</pathelement>
<pathelement>
<xsl:attribute name="location">${junit.antlet.build.dir.passdown}/classes</xsl:attribute>
</pathelement>
</classpath>
<xsl:choose>
<!-- if we defined a testcase, run that -->
<xsl:when test="$testcase!=''">
<test name="">
<xsl:attribute name="name"><xsl:value-of select="$testcase" /></xsl:attribute>
</test>
</xsl:when>
<!-- else run all -->
<xsl:otherwise>
<batchtest>
<xsl:attribute name="todir">${junit.antlet.build.dir.passdown}/results</xsl:attribute>
<fileset>
<xsl:attribute name="dir">${junit.antlet.build.dir.passdown}/classes</xsl:attribute>
<include name="**/test/*TestCase.class"/>
<include name="**/*Test.class" />
<include name="**/Test*.class" />
<exclude name="**/AllTest.class" />
<exclude name="**/*$$*Test.class" />
<exclude name="**/*$*.class" />
</fileset>
</batchtest>
</xsl:otherwise>
</xsl:choose>
</junit>
</target>
</project>
</xsl:template>
</xsl:stylesheet>
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click