User: kimptoc
Date: 01/05/26 01:09:52
Modified: src/build build.bat build.sh build.xml run_tests.xml
Log:
added test report xslt scripts and builds to jbosstest
Revision Changes Path
1.3 +6 -2 jbosstest/src/build/build.bat
Index: build.bat
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/build/build.bat,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- build.bat 2001/02/27 06:40:04 1.2
+++ build.bat 2001/05/26 08:09:52 1.3
@@ -1,11 +1,15 @@
@echo off
REM convenience bat file to build with
-set CLASSPATH=..\..\lib\ant.jar
+set CLASSPATH=..\..\lib\ant-1.3.jar
+set CLASSPATH=%CLASSPATH%;..\..\lib\ant-1.3-optional.jar
+set CLASSPATH=%CLASSPATH%;..\..\lib\jboss-ant-addon.jar
+set CLASSPATH=%CLASSPATH%;..\..\lib\xalan-2.0.0.jar
set CLASSPATH=%CLASSPATH%;..\..\lib\jaxp.jar
set CLASSPATH=%CLASSPATH%;..\..\lib\parser.jar
+set CLASSPATH=%CLASSPATH%;..\..\lib\crimson.jar
set CLASSPATH=%CLASSPATH%;..\..\build\classes
set CLASSPATH=%CLASSPATH%;..\..\lib\javac.jar
set CLASSPATH=%CLASSPATH%;..\..\src\lib\junit.jar
-java -classpath "%CLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5
+java -classpath "%CLASSPATH%"
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl
org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9
1.4 +6 -3 jbosstest/src/build/build.sh
Index: build.sh
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/build/build.sh,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- build.sh 2001/02/28 09:41:05 1.3
+++ build.sh 2001/05/26 08:09:52 1.4
@@ -1,11 +1,14 @@
#! /bin/sh
-# $Id: build.sh,v 1.3 2001/02/28 09:41:05 pra Exp $
+# $Id: build.sh,v 1.4 2001/05/26 08:09:52 kimptoc Exp $
-TARGET_CLASSPATH=../../lib/ant.jar
+TARGET_CLASSPATH=../../lib/ant-1.3.jar
+TARGET_CLASSPATH=$TARGET_CLASSPATH:../../lib/ant-1.3-optional.jar
+TARGET_CLASSPATH=$TARGET_CLASSPATH:../../lib/jboss-ant-addon.jar
+TARGET_CLASSPATH=$TARGET_CLASSPATH:../../lib/xalan-2.0.0.jar
TARGET_CLASSPATH=$TARGET_CLASSPATH:../../lib/jaxp.jar
TARGET_CLASSPATH=$TARGET_CLASSPATH:../../lib/parser.jar
TARGET_CLASSPATH=$TARGET_CLASSPATH:../../build/classes
TARGET_CLASSPATH=$TARGET_CLASSPATH:../../lib/javac.jar
TARGET_CLASSPATH=$TARGET_CLASSPATH:../../src/lib/junit.jar
-java -classpath $TARGET_CLASSPATH org.apache.tools.ant.Main $*
+java -classpath $TARGET_CLASSPATH
-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl
org.apache.tools.ant.Main $*
1.32 +39 -0 jbosstest/src/build/build.xml
Index: build.xml
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/build/build.xml,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- build.xml 2001/05/21 19:51:38 1.31
+++ build.xml 2001/05/26 08:09:52 1.32
@@ -69,6 +69,45 @@
debug="on"
deprecation="off"
optimize="off"
+ excludes="**/ant/taskdefs/**"
+ />
+ </target>
+
+
+ <!-- =================================================================== -->
+ <!-- Compiles the ant addon source code -->
+ <!-- =================================================================== -->
+ <target name="compile-ant-tasks" depends="prepare">
+ <mkdir dir="${build.classes.dir}"/>
+ <javac srcdir="${src.dir}"
+ destdir="${build.classes.dir}"
+ classpath="${classpath}"
+ debug="on"
+ deprecation="off"
+ optimize="off"
+ includes="**/ant/taskdefs/**"
+ >
+ <classpath>
+
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar"/>
+ </fileset>
+ <pathelement path="${classpath}"/>
+ </classpath>
+ </javac>
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- jars the ant addon source code -->
+ <!-- note this is done separately and saved in cvs so that generally -->
+ <!-- it can be ignored. Otherwise it needs to be recompiled each time -->
+ <!-- by the build.xml file - because the run_tests.xml file is invalid -->
+ <!-- until it is compiled ... -->
+ <!-- =================================================================== -->
+ <target name="jar-ant-tasks" depends="compile-ant-tasks">
+ <jar jarfile="${lib.dir}/jboss-ant-addon.jar"
+ basedir="${build.classes.dir}"
+ includes="**/ant/taskdefs/**"
/>
</target>
1.10 +108 -9 jbosstest/src/build/run_tests.xml
Index: run_tests.xml
===================================================================
RCS file: /cvsroot/jboss/jbosstest/src/build/run_tests.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- run_tests.xml 2001/05/22 05:20:38 1.9
+++ run_tests.xml 2001/05/26 08:09:52 1.10
@@ -2,7 +2,7 @@
<!-- An ant build file for running the test code against a
JBoss server dist
-$Revision: 1.9 $
+$Revision: 1.10 $
-->
<project name="JBossUnitTests" default="run-tests" basedir="../../">
@@ -44,7 +44,16 @@
<property name="build.javadocs.dir" value="${build.dir}/docs/api"/>
<property name="dist.dir" value="dist"/>
- <!-- Compile and jar the tests -->
+ <property name="test.results.dir" value="${basedir}/.."/>
+
+ <property name="email.from" value="[EMAIL PROTECTED]"/>
+ <property name="email.to.list" value="[EMAIL PROTECTED]"/>
+ <property name="email.mailhost" value="localhost" />
+
+
+ <!-- =================================================================== -->
+ <!-- Compile and jar the tests -->
+ <!-- =================================================================== -->
<target name="build">
<available property="junit.present" classname="junit.framework.TestCase" />
<ant antfile="src/build/build.xml" target="jar" />
@@ -53,8 +62,8 @@
<!-- The base classpath for the junit tests -->
<path id="test.classpath" >
<pathelement path="${build.classes.dir}" />
- <pathelement path="${lib.dir}/ant.jar" />
- <pathelement path="${lib.dir}/optional.jar" />
+ <pathelement path="${lib.dir}/ant-1.3.jar" />
+ <pathelement path="${lib.dir}/ant-1.3-optional.jar" />
<pathelement path="${src.lib.dir}/deploy.jar" />
<pathelement path="${src.lib.dir}/junit.jar" />
<pathelement path="${src.lib.dir}/log4j.jar" />
@@ -71,7 +80,9 @@
<pathelement path="${jboss.lib.ext}/jms.jar" />
</path>
- <!-- Execute the junit tests -->
+ <!-- =================================================================== -->
+ <!-- Execute the junit tests -->
+ <!-- =================================================================== -->
<target name="run-tests" depends="build" if="junit.present">
<antcall target="standard-tests" />
@@ -86,10 +97,12 @@
<antcall target="security-tests" />
</target>
+ <!-- =================================================================== -->
<!-- Standard tests that should run successfully against a default JBoss
server distribution build. This target looks for candidate JUnit tests
by looking for **/test/Main.java or **/test/Test*.java patterns.
-->
+ <!-- =================================================================== -->
<target name="standard-tests">
<junit printsummary="yes" haltonfailure="no" fork="true"
dir="${build.classes.dir}" timeout="120000"
@@ -101,7 +114,7 @@
<formatter type="xml" usefile="true" />
- <batchtest>
+ <batchtest todir="${test.results.dir}">
<fileset dir="${src.dir}">
<include name="**/test/*/test/Test*.java" />
<include name="**/test/*/test/AllJUnitTests.java" />
@@ -112,6 +125,8 @@
</junit>
</target>
+ <!-- =================================================================== -->
+ <!-- =================================================================== -->
<target name="basic-security-tests">
<junit printsummary="no" haltonfailure="yes" fork="true"
dir="${build.classes.dir}" timeout="120000"
@@ -127,7 +142,7 @@
<formatter type="xml" usefile="true" />
- <batchtest>
+ <batchtest todir="${test.results.dir}">
<fileset dir="${src.dir}">
<include name="**/test/security/test/TestEJBSpec.java" />
</fileset>
@@ -136,6 +151,7 @@
</junit>
</target>
+ <!-- =================================================================== -->
<!-- Setup a JBoss dist with a config suitable for the
security-tests task. The config steps consist of:
1. Patch the jboss.jcml security section to enable all mbeans
@@ -144,6 +160,7 @@
3. Copy the SRPVerifierStore.ser file from resources/security to the
jboss bin directory
-->
+ <!-- =================================================================== -->
<target name="security-setup">
<patch patchfile="${src.resources}/security/jboss.jcml.patch"
originalfile="${jboss.home}/conf/default/jboss.jcml" />
@@ -155,16 +172,20 @@
tofile="${jboss.home}/bin/SRPVerifierStore.ser" />
</target>
+ <!-- =================================================================== -->
<!-- Run security tests with different vm setup.
The steps performed by the secrity-setup task need to have
been executed either manually or by running the security-setup
task once on the JBoss dist in order for these tests to
complete successfully.
-->
+ <!-- =================================================================== -->
<target name="security-tests" if="security.configured">
<antcall target="do-security-tests" />
</target>
+ <!-- =================================================================== -->
+ <!-- =================================================================== -->
<target name="do-security-tests">
<!-- We need to jar this test up so that the Main2.SecurityDelegate
class is in a speparate jar so that it has a codesource distinct from
@@ -190,7 +211,7 @@
<formatter type="plain" usefile="false" />
- <batchtest>
+ <batchtest todir="${test.results.dir}">
<fileset dir="${src.dir}">
<include name="**/test/security/test/Test*.java" />
<exclude name="**/test/security/test/TestEJBAccess.java" />
@@ -220,10 +241,12 @@
</junit>
</target>
+ <!-- =================================================================== -->
<!-- Run all tests in the 'testcase' package. For example to run all the tests
in the org/jboss/test/cts/test package one would use:
ant -buildfile run_tests.xml -Dtestcase=cts run-testcase
-->
+ <!-- =================================================================== -->
<target name="run-testcase" if="testcase">
<junit printsummary="no" haltonfailure="no" fork="true">
<jvmarg value="-Djava.security.manager" />
@@ -234,7 +257,7 @@
<pathelement path="${jboss.lib}/jboss-jaas.jar" />
</classpath>
<formatter type="plain" usefile="false" />
- <batchtest>
+ <batchtest todir="${test.results.dir}">
<fileset dir="${src.dir}">
<include name="org/jboss/test/${testcase}/test/Test*.java" />
<include name="org/jboss/test/${testcase}/test/Main.java" />
@@ -244,6 +267,8 @@
</junit>
</target>
+ <!-- =================================================================== -->
+ <!-- =================================================================== -->
<target name="test1">
<junit printsummary="yes" haltonfailure="no" fork="true"
dir="${build.classes.dir}" timeout="1200000"
@@ -263,10 +288,12 @@
</junit>
</target>
+ <!-- =================================================================== -->
<!-- Try to get something working with the j2ee-ri for compatability
testing. Currently this is not working as the security info is
not propagated correctly.
-->
+ <!-- =================================================================== -->
<target name="test1-ri">
<property name="j2ee.home" value="/usr/local/Java/j2sdkee1.2.1" />
@@ -297,5 +324,77 @@
<test name="org.jboss.test.security.test.TestEJBAccess" />
</junit>
</target>
+
+ <!-- =================================================================== -->
+ <!-- produce a report from the result file -->
+ <!-- =================================================================== -->
+
+
+ <taskdef name="concatenate" classname="org.jboss.ant.taskdefs.ConcatenateFiles"/>
+
+
+ <target name="produce-reports">
+ <concatenate file="${test.results.dir}/TEST-all-test-results.tmp.xml"
+ >
+ <fileset dir="${test.results.dir}" includes="TEST-org*.xml"/>
+ </concatenate>
+
+ <replace file="${test.results.dir}/TEST-all-test-results.tmp.xml"
token="<?xml version="1.0"?>"/>
+
+ <concatenate file="${test.results.dir}/TEST-all-test-results.xml"
+ beginmessage="<?xml version='1.0'?><all-test-results>"
+ endmessage="</all-test-results>"
+ >
+ <fileset dir="${test.results.dir}" includes="TEST-all-test-results.tmp.xml"/>
+ </concatenate>
+
+ <delete file="${test.results.dir}/TEST-all-test-results.tmp.xml" />
+
+ <copy todir="${test.results.dir}">
+ <fileset dir="${basedir}/src/build/stylesheets/" includes="*.xsl"/>
+ </copy>
+
+ <style basedir="${test.results.dir}" destdir="${test.results.dir}"
+ extension=".log" style="summary1.xsl"
+ includes="TEST-all-test-results.xml"
+ />
+
+ <style basedir="${test.results.dir}" destdir="${test.results.dir}"
+ extension=".html" style="summary2.xsl"
+ includes="TEST-all-test-results.xml"
+ />
+
+ <copy file="${test.results.dir}/TEST-all-test-results.html"
tofile="${test.results.dir}/index.html"/>
+
+ <delete>
+ <fileset dir="${test.results.dir}" includes="*.xsl" />
+ </delete>
+
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- mail report to jboss dev -->
+ <!-- =================================================================== -->
+
+ <target name="mail-report">
+ <mail from="${email.from}"
+ tolist="${email.to.list}"
+ files="${test.results.dir}/TEST-all-test-results.log"
+ subject="jboss daily test results"
+ mailhost="${email.mailhost}"
+ />
+ </target>
+
+ <!-- =================================================================== -->
+ <!-- run tests, then produce a report from the result file -->
+ <!-- =================================================================== -->
+
+ <target name="test-and-report" depends="run-tests,produce-reports"/>
+
+ <!-- =================================================================== -->
+ <!-- run tests, produce a report, then mail it -->
+ <!-- =================================================================== -->
+
+ <target name="test-and-report-and-mail"
depends="run-tests,produce-reports,mail-report"/>
</project>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development