[Japi-cvs] SF.net SVN: japi: [499] common/trunk/commonBuild.xml
Status: Beta
Brought to you by:
christianhujer
From: <chr...@us...> - 2007-07-05 20:48:24
|
Revision: 499 http://svn.sourceforge.net/japi/?rev=499&view=rev Author: christianhujer Date: 2007-07-05 13:48:04 -0700 (Thu, 05 Jul 2007) Log Message: ----------- [ 1748267 ] missing ant target for performing unit tests Modified Paths: -------------- common/trunk/commonBuild.xml Modified: common/trunk/commonBuild.xml =================================================================== --- common/trunk/commonBuild.xml 2007-07-05 20:07:53 UTC (rev 498) +++ common/trunk/commonBuild.xml 2007-07-05 20:48:04 UTC (rev 499) @@ -11,6 +11,7 @@ <property name="distName" value="${module.name}-${module.version}" /> <property name="distPath" value="dist/${distName}" /> <property name="commonPath" value="common" /> +<property name="javaversion" value="1.5" /> <path id="class.path"> <fileset dir="." includes="lib/*.jar" excludes="lib/LICENSE-*.jar" /> @@ -31,9 +32,7 @@ </target> <target name="compile" description="Compiles this module."> - <property name="javaversion" value="1.5" /> <mkdir dir="classes/production/${module.shortname}" /> - <mkdir dir="classes/test/${module.shortname}" /> <javac srcdir="src" destdir="classes/production/${module.shortname}" @@ -44,6 +43,8 @@ > <classpath refid="class.path" /> <exclude name="test/**/*.java" /> + <exclude name="doc/**/*.java" /> + <exclude name="**/package-info.java" /> </javac> <copy todir="classes/production/${module.shortname}" @@ -61,6 +62,48 @@ </checkstyle> </target> +<target name="test" description="Performs JUnit tests." depends="compile"> + <mkdir dir="classes/test/${module.shortname}" /> + <mkdir dir="docs/test" /> + <javac + srcdir="src" + destdir="classes/test/${module.shortname}" + encoding="utf-8" + source="${javaversion}" + target="${javaversion}" + debug="yes" + > + <classpath refid="class.path" /> + <classpath location="classes/production/${module.shortname}" /> + <include name="test/**/*.java" /> + <exclude name="**/package-info.java" /> + </javac> + <copy + todir="classes/production/${module.shortname}" + > + <fileset dir="src" includes="test/**/*.properties" /> + </copy> + <junit printsummary="yes" haltonfailure="no"> + <classpath refid="class.path" /> + <classpath location="classes/production/${module.shortname}" /> + <classpath location="classes/test/${module.shortname}" /> + <formatter type="plain" /> + <formatter type="xml" /> + <batchtest todir="docs/test"> + <fileset dir="src"> + <include name="test/**/*Test.java" /> + <exclude name="test/**/Abstract*Test.java" /> + </fileset> + </batchtest> + </junit> + <junitreport todir="docs/test"> + <fileset dir="docs/test"> + <include name="TEST-*.xml" /> + </fileset> + <report format="frames" todir="docs/test" /> + </junitreport> +</target> + <target name = "doc" description = "Creates public API documentation" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |