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.7 +63 -12 jbosscx/Attic/build.xml
Index: build.xml
===================================================================
RCS file: /cvsroot/jboss/jbosscx/Attic/build.xml,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- build.xml 2001/08/01 22:01:53 1.1.2.6
+++ build.xml 2001/08/02 06:25:49 1.1.2.7
@@ -10,7 +10,7 @@
<!-- -->
<!-- ====================================================================== -->
-<!-- $Id: build.xml,v 1.1.2.6 2001/08/01 22:01:53 user57 Exp $ -->
+<!-- $Id: build.xml,v 1.1.2.7 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.
@@ -355,6 +363,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 -->
<!-- ================================================================== -->
@@ -401,8 +455,5 @@
<target name="min" depends="compile"
description="Builds a minimal subset."/>
-
- <target name="tests" depends="init"
- description="Execute all tests."/>
</project>
1.1.2.5 +27 -2 jbosscx/Attic/config.xml
Index: config.xml
===================================================================
RCS file: /cvsroot/jboss/jbosscx/Attic/config.xml,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- config.xml 2001/07/31 05:05:59 1.1.2.4
+++ config.xml 2001/08/02 06:25:49 1.1.2.5
@@ -7,7 +7,7 @@
<!-- -->
<!-- ====================================================================== -->
-<!-- $Id: config.xml,v 1.1.2.4 2001/07/31 05:05:59 user57 Exp $ -->
+<!-- $Id: config.xml,v 1.1.2.5 2001/08/02 06:25:49 user57 Exp $ -->
<!-- ================================================================== -->
<!-- Module Setup -->
@@ -23,7 +23,20 @@
<!-- Tool Setup -->
<!-- ================================================================== -->
- <!-- No tool dependencies -->
+ <!-- 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>
<!-- ================================================================== -->
@@ -142,6 +155,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>
+
<!-- Where source files live -->
<property name="source.java" value="${module.source}/main"/>
<property name="source.etc" value="${module.source}/etc"/>
@@ -151,6 +173,7 @@
<property name="build.jars" value="${module.build}/lib"/>
<property name="build.api" value="${module.build}/api"/>
<property name="build.etc" value="${module.build}/etc"/>
+ <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}"/>
@@ -188,4 +211,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