You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2006/01/04 23:14:55 UTC

svn commit: r366007 - in /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general: adbAntBuildTemplate.xsl xmlbeansAntBuildTemplate.xsl

Author: dims
Date: Wed Jan  4 14:14:50 2006
New Revision: 366007

URL: http://svn.apache.org/viewcvs?rev=366007&view=rev
Log:
targets for compiling and running the tests


Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl?rev=366007&r1=366006&r2=366007&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl Wed Jan  4 14:14:50 2006
@@ -75,6 +75,21 @@
                     </classpath>
                 </javac>
             </target>
+            <target name="compile.test" depends="pre.compile.test">
+                <xsl:attribute name="if">jars.ok</xsl:attribute>
+                <javac debug="on">
+                    <xsl:attribute name="destdir">${classes}</xsl:attribute>
+                    <src>
+                        <xsl:attribute name="path">${src}</xsl:attribute>
+                    </src>
+                    <src>
+                        <xsl:attribute name="path">${test}</xsl:attribute>
+                    </src>
+                    <classpath>
+                        <xsl:attribute name="location">${java.class.path}</xsl:attribute>
+                    </classpath>
+                </javac>
+            </target>
 
             <target name="echo.classpath.problem" depends="pre.compile.test">
                 <xsl:attribute name="unless">jars.ok</xsl:attribute>
@@ -121,6 +136,31 @@
                         <xsl:attribute name="value">${build}/repo</xsl:attribute>
                     </arg>
                 </java>
+            </target>
+            <target if="jars.ok" name="run.test" depends="compile.test">
+                <mkdir>
+                    <xsl:attribute name="dir">${build}/test-reports/</xsl:attribute>
+                </mkdir>
+                <junit printsummary="yes" haltonfailure="yes">
+                    <classpath>
+                        <pathelement>
+                            <xsl:attribute name="location">${classes}</xsl:attribute>
+                        </pathelement>
+                        <pathelement>
+                            <xsl:attribute name="path">${java.class.path}</xsl:attribute>
+                        </pathelement>
+                    </classpath>
+                    <formatter type="plain"/>
+                    <batchtest fork="yes">
+                        <xsl:attribute name="toDir">${build}/test-reports/</xsl:attribute>
+                        <fileset>
+                            <xsl:attribute name="dir">${test}</xsl:attribute>
+                            <include>
+                                <xsl:attribute name="name">**/*Test*.java</xsl:attribute>
+                            </include>
+                        </fileset>
+                    </batchtest>			
+                </junit>
             </target>
             <target name="clean">
                 <delete>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl?rev=366007&r1=366006&r2=366007&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl Wed Jan  4 14:14:50 2006
@@ -90,6 +90,24 @@
                     </classpath>
                 </javac>
             </target>
+            <target name="compile.test" depends="pre.compile.test">
+                <xsl:attribute name="if">jars.ok</xsl:attribute>
+                <javac debug="on">
+                    <xsl:attribute name="destdir">${classes}</xsl:attribute>
+                    <src>
+                        <xsl:attribute name="path">${src}</xsl:attribute>
+                    </src>
+                    <src>
+                        <xsl:attribute name="path">${test}</xsl:attribute>
+                    </src>
+                    <classpath>
+                        <xsl:attribute name="location">${lib}\${xbeans.packaged.jar.name}</xsl:attribute>
+                    </classpath>
+                    <classpath>
+                        <xsl:attribute name="location">${java.class.path}</xsl:attribute>
+                    </classpath>
+                </javac>
+            </target>
 
             <target name="echo.classpath.problem" depends="pre.compile.test">
                 <xsl:attribute name="unless">jars.ok</xsl:attribute>
@@ -141,6 +159,34 @@
                         <xsl:attribute name="value">${build}/repo</xsl:attribute>
                     </arg>
                 </java>
+            </target>
+            <target if="jars.ok" name="run.test" depends="compile.test">
+                <mkdir>
+                    <xsl:attribute name="dir">${build}/test-reports/</xsl:attribute>
+                </mkdir>
+                <junit printsummary="yes" haltonfailure="yes">
+                    <classpath>
+                        <pathelement>
+                            <xsl:attribute name="location">${classes}</xsl:attribute>
+                        </pathelement>
+                        <pathelement>
+                            <xsl:attribute name="location">${lib}\${xbeans.packaged.jar.name}</xsl:attribute>
+                        </pathelement>
+                        <pathelement>
+                            <xsl:attribute name="path">${java.class.path}</xsl:attribute>
+                        </pathelement>
+                    </classpath>
+                    <formatter type="plain"/>
+                    <batchtest fork="yes">
+                        <xsl:attribute name="toDir">${build}/test-reports/</xsl:attribute>
+                        <fileset>
+                            <xsl:attribute name="dir">${test}</xsl:attribute>
+                            <include>
+                                <xsl:attribute name="name">**/*Test*.java</xsl:attribute>
+                            </include>
+                        </fileset>
+                    </batchtest>			
+                </junit>
             </target>
             <target name="clean">
               <delete>