You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bd...@apache.org on 2005/07/13 19:08:54 UTC
svn commit: r216189 - in /myfaces: api/trunk/build.properties
build/trunk/build.xml impl/trunk/build.properties
sandbox/trunk/build.properties tomahawk/trunk/build.properties
Author: bdudney
Date: Wed Jul 13 10:08:53 2005
New Revision: 216189
URL: http://svn.apache.org/viewcvs?rev=216189&view=rev
Log:
initial crack at testing
Modified:
myfaces/api/trunk/build.properties
myfaces/build/trunk/build.xml
myfaces/impl/trunk/build.properties
myfaces/sandbox/trunk/build.properties
myfaces/tomahawk/trunk/build.properties
Modified: myfaces/api/trunk/build.properties
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/build.properties?rev=216189&r1=216188&r2=216189&view=diff
==============================================================================
--- myfaces/api/trunk/build.properties (original)
+++ myfaces/api/trunk/build.properties Wed Jul 13 10:08:53 2005
@@ -3,6 +3,9 @@
subproject.dir = ${basedir}/../
src.dir = ${subproject.dir}/src/java
+test.src.dir = ${subproject.dir}/src/test
+test.classes.dir = ${temp.dir}/tests/classes
+test.reports.dir = ${temp.dir}/tests/reports
temp.dir = ${basedir}/temp
jar.file = myfaces-api.jar
jar.include.pattern = javax/**/*.class
Modified: myfaces/build/trunk/build.xml
URL: http://svn.apache.org/viewcvs/myfaces/build/trunk/build.xml?rev=216189&r1=216188&r2=216189&view=diff
==============================================================================
--- myfaces/build/trunk/build.xml (original)
+++ myfaces/build/trunk/build.xml Wed Jul 13 10:08:53 2005
@@ -233,6 +233,7 @@
<pathelement location="${tlddoc.jar}"/>
<pathelement location="${xdoclet.jar}"/>
<pathelement location="${xjavadoc.jar}"/>
+ <pathelement location="${junit.jar}"/>
<!-- these jars are built/provided locally -->
<pathelement location="${jsf-api.jar}"/>
<pathelement location="${jsf-impl.jar}"/>
@@ -336,6 +337,10 @@
<get dest="${lib.dir}/xjavadoc.jar"
usetimestamp="true" ignoreerrors="true"
src="http://www.ibiblio.org/maven/xjavadoc/jars/xjavadoc-1.1.jar"/>
+
+ <get dest="${lib.dir}/junit.jar"
+ usetimestamp="true" ignoreerrors="true"
+ src="http://www.ibiblio.org/maven/junit/jars/junit-3.8.1.jar"/>
<property name="commons-beanutils.jar" value="${lib.dir}/commons-beanutils.jar"/>
<property name="commons-codec.jar" value="${lib.dir}/commons-codec.jar"/>
@@ -355,6 +360,7 @@
<property name="xdoclet.jar" value="${lib.dir}/xdoclet.jar"/>
<property name="tlddoc.jar" value="${lib.dir}/tlddoc.jar"/>
<property name="xjavadoc.jar" value="${lib.dir}/xjavadoc.jar"/>
+ <property name="junit.jar" value="${lib.dir}/junit.jar"/>
</target>
@@ -423,6 +429,52 @@
debug="${javac.debug}"
classpathref="compile.classpath">
</javac>
+ </target>
+
+ <!--
+ Run unit tests for all subprojects that have them
+ -->
+ <target name="unit-test-all">
+
+ <ant target="project">
+ <property name="target" value="unit-test"/>
+ </ant>
+
+ </target>
+ <!--
+ Compile and run tests in current subproject
+ -->
+ <target name="unit-test" depends="compile" if="test.src.dir" description="build and run subproject unit tests">
+ <mkdir dir="${test.classes.dir}"/>
+ <mkdir dir="${test.reports.dir}/xml"/>
+ <mkdir dir="${test.reports.dir}/html"/>
+ <javac srcdir="${test.src.dir}"
+ destdir="${test.classes.dir}"
+ optimize="${javac.optimize}"
+ debug="${javac.debug}"
+ classpathref="compile.classpath">
+ </javac>
+ <junit printsummary="yes" fork="yes" haltonfailure="no">
+ <classpath>
+ <path refid="compile.classpath"/>
+ <pathelement location="${classes.dir}"/>
+ <pathelement location="${test.classes.dir}"/>
+ </classpath>
+
+ <formatter type="xml" />
+
+ <batchtest fork="yes" todir="${test.reports.dir}/xml">
+ <fileset dir="${test.classes.dir}">
+ <include name="**/**Test.class" />
+ </fileset>
+ </batchtest>
+ </junit>
+ <junitreport todir="${test.reports.dir}/html">
+ <fileset dir="${test.reports.dir}/xml">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${test.reports.dir}/html"/>
+ </junitreport>
</target>
<!--
Modified: myfaces/impl/trunk/build.properties
URL: http://svn.apache.org/viewcvs/myfaces/impl/trunk/build.properties?rev=216189&r1=216188&r2=216189&view=diff
==============================================================================
--- myfaces/impl/trunk/build.properties (original)
+++ myfaces/impl/trunk/build.properties Wed Jul 13 10:08:53 2005
@@ -4,6 +4,9 @@
subproject.dir = ${basedir}/../
temp.dir = ${basedir}/temp
src.dir = ${subproject.dir}/src/java:${share.src.dir}
+test.src.dir = ${subproject.dir}/src/test
+test.classes.dir = ${temp.dir}/tests/classes
+test.reports.dir = ${temp.dir}/tests/reports
jar.file = myfaces-impl.jar
jar.include.pattern = org/**/*.class
jar.fileset2.dir = ${subproject.dir}/src/java
Modified: myfaces/sandbox/trunk/build.properties
URL: http://svn.apache.org/viewcvs/myfaces/sandbox/trunk/build.properties?rev=216189&r1=216188&r2=216189&view=diff
==============================================================================
--- myfaces/sandbox/trunk/build.properties (original)
+++ myfaces/sandbox/trunk/build.properties Wed Jul 13 10:08:53 2005
@@ -3,6 +3,9 @@
subproject.dir = ${basedir}/../
src.dir = ${subproject.dir}/src/java:${share.src.dir}
+test.src.dir = ${subproject.dir}/src/test
+test.classes.dir = ${temp.dir}/tests/classes
+test.reports.dir = ${temp.dir}/tests/reports
jar.file = sandbox.jar
jar.include.pattern = org/**/*.class
jar.fileset2.dir = ${subproject.dir}/src/java
Modified: myfaces/tomahawk/trunk/build.properties
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/build.properties?rev=216189&r1=216188&r2=216189&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/build.properties (original)
+++ myfaces/tomahawk/trunk/build.properties Wed Jul 13 10:08:53 2005
@@ -3,6 +3,9 @@
subproject.dir = ${basedir}/../
src.dir = ${subproject.dir}/src/java:${share.src.dir}
+test.src.dir = ${subproject.dir}/src/test
+test.classes.dir = ${temp.dir}/tests/classes
+test.reports.dir = ${temp.dir}/tests/reports
jar.file = tomahawk.jar
jar.include.pattern = org/**/*.class
jar.fileset2.dir = ${subproject.dir}/src/java