User: user57
Date: 01/08/01 23:25:49
Modified: . Tag: jboss_buildmagic build.xml config.xml
Log:
o hooked up junit for each module's "tests" target, though it still needs
some fine tuning as to which classes to test.
o looked into junitreport again, but that task is a pile of...
Revision Changes Path
No revision
No revision
1.1.2.11 +63 -14 admin/Attic/build.xml
Index: build.xml
===================================================================
RCS file: /cvsroot/jboss/admin/Attic/build.xml,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -u -r1.1.2.10 -r1.1.2.11
--- build.xml 2001/08/01 22:01:52 1.1.2.10
+++ build.xml 2001/08/02 06:25:49 1.1.2.11
@@ -10,7 +10,7 @@
<!-- -->
<!-- ====================================================================== -->
-<!-- $Id: build.xml,v 1.1.2.10 2001/08/01 22:01:52 user57 Exp $ -->
+<!-- $Id: build.xml,v 1.1.2.11 2001/08/02 06:25:49 user57 Exp $ -->
<project default="main">
@@ -18,17 +18,25 @@
<!-- Basic module configuration -->
<!-- ================================================================== -->
+ <!--
+ | Give users a chance to use a different Buildmagic.
+ -->
+ <property file="${user.home}/.buildmagic.properties"/>
+
<!--
| Load Buildmagic Ant extentions.
-->
- <property name="planet57.buildmagic.root"
- value="../tools/planet57/buildmagic"/>
- <property name="planet57.buildmagic.lib"
- value="${planet57.buildmagic.root}/lib"/>
- <taskdef name="taskdef"
- classname="planet57.tools.buildmagic.task.Taskdef"
- classpath="${planet57.buildmagic.lib}/buildmagic-tasks.jar"/>
- <taskdef resource="planet57/tools/buildmagic/task/autoload.properties"/>
+ <property name="planet57.buildmagic.root"
value="${basedir}/../tools/planet57/buildmagic"/>
+ <property name="planet57.buildmagic.lib" value="${planet57.buildmagic.root}/lib"/>
+ <path id="planet57.buildmagic.classpath">
+ <fileset dir="${planet57.buildmagic.lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+ <taskdef name="taskdef" classname="planet57.tools.buildmagic.task.Taskdef"
+ classpathref="planet57.buildmagic.classpath"/>
+ <taskdef classpathref="planet57.buildmagic.classpath"
+ resource="planet57/tools/buildmagic/task/autoload.properties"/>
<!--
| Setup the basic module roots.
@@ -47,14 +55,12 @@
| Include user, project and module property overrides.
|
| override.properties - Used rarely (ignore)
- | .buildmagic.properties - Provide Buildmagic specific properties
| .ant.properties - Ant properties
| local.properties - User local module properties
| config.properties - Used rarely (ignore)
-->
<property file="${project.config}/override.properties"/>
<property file="${module.root}/override.properties"/>
- <property file="${user.home}/.buildmagic.properties"/>
<property file="${user.home}/.ant.properties"/>
<property file="${module.root}/local.properties"/>
<property file="${project.config}/local.properties"/>
@@ -471,6 +477,52 @@
<!-- ================================================================== -->
+ <!-- Run tests -->
+ <!-- ================================================================== -->
+
+ <target name="tests" depends="tests-junit"
+ description="Execute all tests."/>
+
+ <target name="tests-junit" depends="jars">
+ <mkdir dir="${build.reports}"/>
+ <junit dir="${module.output}"
+ printsummary="${junit.printsummary}"
+ haltonerror="${junit.haltonerror}"
+ haltonfailure="${junit.haltonfailure}"
+ fork="${junit.fork}"
+ timeout="${junit.timeout}"
+ jvm="${junit.jvm}">
+
+ <!-- junit.jvm.options must have a valid value -->
+ <jvmarg value="${junit.jvm.options}"/>
+ <sysproperty key="jbosstest.deploy.dir" file="${build.jars}"/>
+
+ <classpath>
+ <pathelement location="${build.classes}"/>
+ <path refid="javac.classpath"/>
+ <path refid="apache.ant.classpath"/>
+ <path refid="apache.ant.ext.classpath"/>
+ </classpath>
+
+ <formatter type="${junit.formatter.type}"
+ usefile="${junit.formatter.usefile}"/>
+
+ <batchtest todir="${build.reports}"
+ haltonerror="${junit.batchtest.haltonerror}"
+ haltonfailure="${junit.batchtest.haltonfailure}"
+ fork="${junit.batchtest.fork}">
+
+ <fileset dir="${build.classes}">
+ <include name="**/Test*.class"/>
+ <include name="**/*Test.class"/>
+ <include name="**/AllJUnitTests.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
+
+
+ <!-- ================================================================== -->
<!-- Cleans up generated stuff -->
<!-- ================================================================== -->
@@ -517,8 +569,5 @@
<target name="min" depends="compile"
description="Builds a minimal subset."/>
-
- <target name="tests" depends="init"
- description="Execute all tests."/>
</project>
1.1.2.9 +28 -1 admin/Attic/config.xml
Index: config.xml
===================================================================
RCS file: /cvsroot/jboss/admin/Attic/config.xml,v
retrieving revision 1.1.2.8
retrieving revision 1.1.2.9
diff -u -r1.1.2.8 -r1.1.2.9
--- config.xml 2001/07/31 23:44:10 1.1.2.8
+++ config.xml 2001/08/02 06:25:49 1.1.2.9
@@ -7,7 +7,7 @@
<!-- -->
<!-- ====================================================================== -->
-<!-- $Id: config.xml,v 1.1.2.8 2001/07/31 23:44:10 user57 Exp $ -->
+<!-- $Id: config.xml,v 1.1.2.9 2001/08/02 06:25:49 user57 Exp $ -->
<!-- ================================================================== -->
<!-- Module Setup -->
@@ -23,6 +23,21 @@
<!-- Tool Setup -->
<!-- ================================================================== -->
+ <!-- Apache Ant and Optional Tasks -->
+ <property name="apache.ant.root" value="${tools.root}/apache/ant"/>
+ <property name="apache.ant.lib" value="${apache.ant.root}/lib"/>
+ <property name="apache.ant.lib.ext" value="${apache.ant.lib}/ext"/>
+ <path id="apache.ant.classpath">
+ <fileset dir="${apache.ant.lib}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+ <path id="apache.ant.ext.classpath">
+ <fileset dir="${apache.ant.lib.ext}">
+ <include name="**/*.jar"/>
+ </fileset>
+ </path>
+
<!-- EJBDoclet -->
<property name="dreambean.ejbdoclet.root"
value="${tools.root}/dreambean/ejbdoclet"/>
<property name="dreambean.ejbdoclet.lib" value="${dreambean.ejbdoclet.root}/lib"/>
@@ -152,6 +167,15 @@
<path refid="javac.classpath"/>
</path>
+ <!-- Override JUnit defaults -->
+ <property name="junit.timeout" value="240000"/> <!-- 4 minutes -->
+ <property name="junit.batchtest.todir" value="${build.reports}"/>
+ <property name="junit.jvm.options" value="-client"/>
+ <path id="junit.task.classpath">
+ <path refid="apache.ant.ext.classpath"/>
+ <path refid="junit.junit.classpath"/>
+ </path>
+
<!-- Setup the path property used by the ejbdoclet -->
<path id="dreambean.ejbdoclet.task.classpath">
<path refid="javac.classpath"/>
@@ -175,6 +199,7 @@
<property name="build.beans" value="${module.build}/beans"/>
<property name="build.metadata" value="${module.build}/metadata"/>
<property name="build.resources" value="${module.build}/resources"/>
+ <property name="build.reports" value="${module.build}/reports"/>
<!-- Where release generated files will go -->
<property name="release.id" value="${module.name}-${module.version}-${build.id}"/>
@@ -218,4 +243,6 @@
<!-- Executed at the end of the 'init' target -->
<target name="init-hook">
<!-- Execute custom initialization tasks here. -->
+ <taskdef name="junit" classpathref="junit.task.classpath"
+ classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
</target>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development