You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/11/23 01:47:09 UTC
cvs commit: jakarta-avalon-excalibur/assembly build.xml default.properties
mcconnell 2002/11/22 16:47:09
Modified: assembly build.xml default.properties
Log:
build updates for unit tests
Revision Changes Path
1.76 +78 -2 jakarta-avalon-excalibur/assembly/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/build.xml,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- build.xml 19 Nov 2002 19:16:01 -0000 1.75
+++ build.xml 23 Nov 2002 00:47:09 -0000 1.76
@@ -37,6 +37,11 @@
<pathelement path="${java.class.path}"/>
</path>
+ <path id="test.class.path">
+ <path refid="project.class.path"/>
+ <pathelement location="${build.testclasses}"/>
+ </path>
+
<target name="main" depends="deploy" description="Build the project"/>
<target name="rebuild" depends="clean,main" description="Rebuild the project"/>
<target name="all" depends="rebuild,docs" description="Rebuild the project"/>
@@ -111,7 +116,6 @@
deprecation="${build.deprecation}"
target="1.2">
<src path="${java.dir}" />
- <!--<src path="${build.dir}/src" />-->
<classpath refid="project.class.path" />
<include name="**/*.java"/>
</javac>
@@ -211,7 +215,7 @@
</javadoc>
</target>
- <target name="checkstyle">
+ <target name="checkstyle" if="do.checkstyle">
<taskdef classpath="${checkstyle.jar}"
resource="checkstyletask.properties"/>
@@ -312,6 +316,78 @@
<delete dir="${dist.base}" />
</target>
+ <!--
+ Test
+ -->
+
+ <!-- Compiles the unit test source code -->
+ <target name="compile-test" depends="deploy" description="Compiles unit test source code">
+
+ <mkdir dir="${build.testsrc}"/>
+
+ <!-- Copy over all of the tests applying test filters -->
+ <copy todir="${build.testsrc}">
+ <fileset dir="${test.dir}"/>
+ </copy>
+
+ <mkdir dir="${build.testclasses}"/>
+
+ <!-- Compile all test classes. -->
+ <javac srcdir="${build.testsrc}"
+ destdir="${build.testclasses}"
+ debug="${build.debug}"
+ optimize="${build.optimize}"
+ deprecation="${build.deprecation}"
+ target="1.2">
+ <classpath refid="test.class.path" />
+ <include name="**/*.java"/>
+ </javac>
+
+ <copy todir="${build.testclasses}">
+ <fileset dir="${test.dir}">
+ <exclude name="**/*.java"/>
+ <exclude name="**/package.html"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="test" depends="compile-test" description="Perform the unit tests" unless="skip.tests">
+
+ <echo message="Performing Unit Tests" />
+
+ <mkdir dir="${build.tests}"/>
+
+ <junit fork="true"
+ haltonfailure="${junit.failonerror}"
+ printsummary="yes"
+ dir="${build.tests}">
+ <classpath refid="test.class.path"/>
+
+ <formatter type="xml"/> <!-- xml reports for junitreport -->
+ <formatter type="plain" usefile="false"/> <!-- text reports for humans -->
+
+ <batchtest todir="${build.tests}">
+ <fileset dir="${build.testclasses}">
+ <include name="**/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+ <target name="test-reports" depends="test" description="Generate Reports for the unit tests">
+
+ <ant antfile="${depchecker.prefix}/depchecker.xml" target="checkBSF"/>
+
+ <mkdir dir="${build.reports}/junit"/>
+
+ <junitreport todir="${build.reports}/junit">
+ <fileset dir="${build.tests}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="frames" todir="${build.reports}/junit"/>
+ </junitreport>
+ </target>
+
<!--
Misc. utilities.
-->
1.22 +1 -14 jakarta-avalon-excalibur/assembly/default.properties
Index: default.properties
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/assembly/default.properties,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- default.properties 16 Nov 2002 12:08:50 -0000 1.21
+++ default.properties 23 Nov 2002 00:47:09 -0000 1.22
@@ -144,25 +144,12 @@
# project specific properties
lib.dir = lib
-#openorb.jar = ${lib.dir}/openorb-1.3.0.jar
-#orb.jar = ${lib.dir}/orb-2.0.jar
-#corbaloc.jar = ${lib.dir}/corbaloc-1.0.jar
-
-#local-tools.dir = tools
-#idl-compiler.jar = ${local-tools.dir}/openorb_tools-1.3.0.jar
-#idl.class = org.openorb.compiler.IdlCompiler
-
-#idl.dir = ${src.dir}/idl
extension.dir = extensions
demo.name = demo
demo.jar = ${demo.name}.jar
sar.name = ${name}-${version}.sar
-#activation.version = 1.0
-#activation.jar = ${name}-activation-${activation.version}.jar
-
-# avalon apps reference
+# references
excalibur.dir = ./..
-#apps.dir = ${excalibur.dir}/../jakarta-avalon-apps
checkstyle.cache = checkstyle.cache
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>