User: d_jencks Date: 02/03/24 14:00:44 Modified: . build.xml Log: Tests for new ConnectionManager implementation. Many of these fail with the current less-than-spec-compliant jca-jdbc wrappers, but work ok with e.g. the firebird connector. Also, nojars combined targets removed, any test target can be run with -Dnojars=t. Also, log4j logging fixed and moved to xml config. Revision Changes Path 1.98 +147 -122 jbosstest/build.xml Index: build.xml =================================================================== RCS file: /cvsroot/jboss/jbosstest/build.xml,v retrieving revision 1.97 retrieving revision 1.98 diff -u -r1.97 -r1.98 --- build.xml 24 Mar 2002 02:27:49 -0000 1.97 +++ build.xml 24 Mar 2002 22:00:44 -0000 1.98 @@ -13,7 +13,7 @@ <!-- --> <!-- ====================================================================== --> -<!-- $Id: build.xml,v 1.97 2002/03/24 02:27:49 schaefera Exp $ --> +<!-- $Id: build.xml,v 1.98 2002/03/24 22:00:44 d_jencks Exp $ --> <project default="main" name="JBoss/Testsuite"> @@ -209,6 +209,16 @@ <pathelement path="${jboss.server.lib}/testsuite-support.jar"/> </path> + <!-- InternalServer --> +<!-- This could be a mistake. Perhaps, though, it would be a good idea to separate +tests that need internal jboss classes from those that don't. When I put it in, only +the jca XATxConnectionManagerUnitTestCase needed an internal class (the tx manager)--> + <property name="jboss.internal-server.root" value="${project.root}/server/output"/> + <property name="jboss.internal-server.lib" value="${jboss.internal-server.root}/lib"/> + <path id="jboss.internal-server.classpath"> + <pathelement path="${jboss.server.lib}/jboss.jar"/> + </path> + <!-- Messaging --> <property name="jboss.messaging.root" value="${project.root}/messaging/output"/> <property name="jboss.messaging.lib" value="${jboss.messaging.root}/lib"/> @@ -224,6 +234,13 @@ <pathelement path="${jboss.security.lib}/jbosssx.jar"/> </path> + <!-- Connector --> + <property name="jboss.connector.root" value="${project.root}/connector/output"/> + <property name="jboss.connector.lib" value="${jboss.connector.root}/lib"/> + <path id="jboss.connector.classpath"> + <pathelement path="${jboss.connector.lib}/jboss-jca.jar"/> + </path> + <!-- Cluster --> <property name="jboss.cluster.root" value="${project.root}/cluster/output"/> <property name="jboss.cluster.lib" value="${jboss.cluster.root}/lib"/> @@ -261,8 +278,10 @@ <path refid="jboss.system.classpath"/> <path refid="jboss.naming.classpath"/> <path refid="jboss.server.classpath"/> + <path refid="jboss.internal-server.classpath"/> <path refid="jboss.messaging.classpath"/> <path refid="jboss.security.classpath"/> + <path refid="jboss.connector.classpath"/> <path refid="jboss.cluster.classpath"/> <path refid="jboss.management.classpath"/> </path> @@ -510,6 +529,54 @@ mergedir="${source.resources}/jmx/undeploy/"/> </xdoclet> +<!--new jca framework tests--> + <mkdir dir="${build.resources}/jca/META-INF"/> + <xdoclet sourcepath="${source.java}" + destdir="${build.gen-src}" + classpath="${xdoclet.task.classpath}" + ejbspec="2.0" + excludedtags="@version,@author"> + <!--mergedir="${source.resources}/jca/ejb"--> + <fileset dir="${source.java}"> + <include name="org/jboss/test/jca/ejb/*Bean.java"/> + </fileset> + <packageSubstitution packages="ejb" substituteWith="interfaces"/> + <remoteinterface/> + <localinterface/> + <homeinterface/> + <localhomeinterface/> + <!--session/--> + <deploymentdescriptor xmlencoding ="UTF-8" + destdir="${build.resources}/jca/META-INF"/> + <jboss xmlencoding="UTF-8" + version="3.0" + destdir="${build.resources}/jca/META-INF" + mergedir="${source.resources}/jca/"/> + </xdoclet> + + <mkdir dir="${build.resources}/jca/bank/META-INF"/> + <xdoclet sourcepath="${source.java}" + destdir="${build.gen-src}" + classpath="${xdoclet.task.classpath}" + ejbspec="2.0" + excludedtags="@version,@author"> + <!--mergedir="${source.resources}/jca/ejb"--> + <fileset dir="${source.java}"> + <include name="org/jboss/test/jca/bank/ejb/*Bean.java"/> + </fileset> + <packageSubstitution packages="ejb" substituteWith="interfaces"/> + <remoteinterface/> + <localinterface/> + <homeinterface/> + <localhomeinterface/> + <!--session/--> + <deploymentdescriptor xmlencoding ="UTF-8" + destdir="${build.resources}/jca/bank/META-INF"/> + <jboss xmlencoding="UTF-8" + version="3.0" + destdir="${build.resources}/jca/bank/META-INF" + mergedir="${source.resources}/jca/bank/"/> + </xdoclet> </target> <target name="compile-mbean-sources" depends="init"> @@ -659,6 +726,7 @@ _jars-lock, _jars-readahead, _jars-xa, + _jars-jca, _jars-jmx, _jars-naming, _jars-jbossmq, @@ -1125,6 +1193,33 @@ </jar> </target> + <!-- jca test --> + <target name="_jars-jca" + depends="compile"> + <mkdir dir="${build.lib}"/> + + <!-- build jcatest.jar --> + <jar jarfile="${build.lib}/jcatest.jar"> + <fileset dir="${build.classes}"> + <include name="org/jboss/test/jca/interfaces/**"/> + <include name="org/jboss/test/jca/ejb/**"/> + </fileset> + <fileset dir="${build.resources}/jca"> + <include name="**/*.xml"/> + </fileset> + </jar> + + <jar jarfile="${build.lib}/jcabanktest.jar"> + <fileset dir="${build.classes}"> + <include name="org/jboss/test/jca/bank/interfaces/**"/> + <include name="org/jboss/test/jca/bank/ejb/**"/> + </fileset> + <fileset dir="${build.resources}/jca/bank"> + <include name="**/*.xml"/> + </fileset> + </jar> + </target> + <!-- jmx test --> <target name="_jars-jmx"> <mkdir dir="${build.lib}"/> @@ -2202,6 +2297,11 @@ | Run all tests. --> + <target name="maybejars" depends="init" + unless="nojars"> + <antcall target="jars"/> + </target> + <target name="tests" description="Execute all tests." depends="init, tests-standard-unit, @@ -2256,7 +2356,7 @@ | server distribution build. --> - <target name="tests-standard-unit" depends="jars"> + <target name="tests-standard-unit" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2269,7 +2369,8 @@ <jvmarg value="${junit.jvm.options}"/> <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.classes}"/> @@ -2308,7 +2409,7 @@ </junit> </target> - <target name="tests-standard-stress" depends="jars"> + <target name="tests-standard-stress" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2321,7 +2422,8 @@ <jvmarg value="${junit.jvm.options}"/> <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/> <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/> <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/> @@ -2360,7 +2462,7 @@ | control how classes are loaded. --> - <target name="tests-client-unit" depends="jars"> + <target name="tests-client-unit" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2373,7 +2475,8 @@ <jvmarg value="${junit.jvm.options}"/> <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <jvmarg value="-Djava.security.manager"/> <sysproperty key="java.security.policy" @@ -2402,7 +2505,7 @@ </junit> </target> - <target name="tests-client-stress" depends="jars"> + <target name="tests-client-stress" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2421,7 +2524,8 @@ value="${build.resources}/security/tst.policy"/> <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/> <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/> <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/> @@ -2454,7 +2558,7 @@ | JBoss server distribution build. --> - <target name="tests-security-basic-unit" depends="jars"> + <target name="tests-security-basic-unit" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2474,7 +2578,8 @@ value="${build.resources}/security/tst.policy"/> <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.classes}"/> @@ -2500,7 +2605,7 @@ </target> - <target name="tests-security-basic-stress" depends="jars"> + <target name="tests-security-basic-stress" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2519,7 +2624,8 @@ value="${build.resources}/security/tst.policy"/> <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/> <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/> <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/> @@ -2574,8 +2680,8 @@ <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/> - <sysproperty key="log4j.properties" - file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.resources}"/> @@ -2624,8 +2730,8 @@ <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/> - <sysproperty key="log4j.properties" - file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.resources}"/> @@ -2647,7 +2753,7 @@ | JBoss server distribution build. --> - <target name="tests-jsr77-unit" depends="jars"> + <target name="tests-jsr77-unit" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2667,7 +2773,8 @@ value="${build.resources}/security/tst.policy"/> <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.classes}"/> @@ -2696,7 +2803,7 @@ | JBoss server distribution build. --> - <target name="tests-util-unit" depends="jars"> + <target name="tests-util-unit" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2716,7 +2823,8 @@ value="${build.resources}/security/tst.policy"/> <sysproperty key="java.security.auth.login.config" value="${build.resources}/security/auth.conf"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.classes}"/> @@ -2744,7 +2852,7 @@ | JBossMX implementation tests that should run correctly. --> - <target name="tests-jbossmx-implementation" depends="jars"> + <target name="tests-jbossmx-implementation" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2757,7 +2865,8 @@ <jvmarg value="${junit.jvm.options}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.classes}"/> @@ -2785,7 +2894,7 @@ | JBossMX performance tests that should run correctly. --> - <target name="tests-jbossmx-performance" depends="jars"> + <target name="tests-jbossmx-performance" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2798,7 +2907,8 @@ <jvmarg value="${junit.jvm.options}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.classes}"/> @@ -2826,7 +2936,7 @@ | JBossMX compliance tests that should run correctly. --> - <target name="tests-jbossmx-compliance" depends="jars"> + <target name="tests-jbossmx-compliance" depends="maybejars"> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> <junit dir="${module.output}" @@ -2839,7 +2949,8 @@ <jvmarg value="${junit.jvm.options}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <classpath> <pathelement location="${build.classes}"/> @@ -2868,10 +2979,12 @@ | name in -Dtest=dirname in tests/dirname/test/**TestCase.class --> - <target name="test" depends="jars" if="test" + <target name="test" depends="maybejars" if="test" description="Execute a single test."> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> + <!-- Remove the test.log so each run has a fresh log --> + <delete file="${build.testlog}/test.log" /> <junit dir="${module.output}" printsummary="${junit.printsummary}" haltonerror="${junit.haltonerror}" @@ -2881,8 +2994,9 @@ jvm="${junit.jvm}"> <jvmarg value="${junit.jvm.options}"/> - <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="jbosstest.deploy.dir" value="${build.lib}"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/> <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/> <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/> @@ -3012,7 +3126,7 @@ | Here you specify the testcase class, not the directory --> - <target name="one-test" depends="jars" if="test" + <target name="one-test" depends="maybejars" if="test" description="Execute a single test."> <mkdir dir="${build.reports}"/> <mkdir dir="${build.testlog}"/> @@ -3028,7 +3142,8 @@ <jvmarg value="${junit.jvm.options}"/> <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/> <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/> <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/> @@ -3050,96 +3165,6 @@ </junit> </target> - <!-- - | Run a single testcase by specifing the fully qualified class name - | of the unit test using the test property, -Dtest=org.jboss.test.... - | Here you specify the testcase class, not the directory. This - version does not rebuild the test jars every time. - --> - <target name="one-test-nojars" depends="init" if="test" - description="Execute a single test without rebuilding."> - <mkdir dir="${build.reports}"/> - <mkdir dir="${build.testlog}"/> - <!-- Remove the test.log so each test has a fresh log --> - <delete file="${build.testlog}/test.log" /> - <junit dir="${module.output}" - printsummary="${junit.printsummary}" - haltonerror="${junit.haltonerror}" - haltonfailure="${junit.haltonfailure}" - fork="${junit.fork}" - timeout="${junit.timeout}" - jvm="${junit.jvm}"> - - <jvmarg value="${junit.jvm.options}"/> - <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> - <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/> - <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/> - <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/> - - <classpath> - <pathelement location="${build.classes}"/> - <pathelement location="${build.resources}"/> - <path refid="tests.classpath"/> - </classpath> - - <formatter classname="org.jboss.ant.taskdefs.XMLJUnitResultFormatter" - extension=".xml" usefile="${junit.formatter.usefile}"/> - - <test todir="${build.reports}" name="${test}" - haltonerror="${junit.batchtest.haltonerror}" - haltonfailure="${junit.batchtest.haltonfailure}" - fork="${junit.batchtest.fork}"/> - </junit> - </target> - - <!-- - | Run a single iiop testcase by specifing the fully qualified class name - | of the unit test using the test property, -Dtest=org.jboss.test.... - | Here you specify the testcase class, not the directory. This - version does not rebuild the test jars every time. - --> - <target name="one-iiop-test-nojars" depends="init" if="test" - description="Execute a single test without rebuilding."> - <mkdir dir="${build.reports}"/> - <mkdir dir="${build.testlog}"/> - <!-- Remove the test.log so each test has a fresh log --> - <delete file="${build.testlog}/test.log" /> - <junit dir="${module.output}" - printsummary="${junit.printsummary}" - haltonerror="${junit.haltonerror}" - haltonfailure="${junit.haltonfailure}" - fork="${junit.fork}" - timeout="${junit.timeout}" - jvm="${junit.jvm}"> - - <jvmarg value="${junit.jvm.options}"/> - <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> - - <jvmarg value="-Xbootclasspath/p:${jacorb.jacorb.lib}/jacorb.jar"/> - <jvmarg value="-Djava.security.manager"/> - - <sysproperty key="log4j.properties" file="${build.resources}/log4j.properties"/> - <sysproperty key="jbosstest.threadcount" value="${jbosstest.threadcount}"/> - <sysproperty key="jbosstest.iterationcount" value="${jbosstest.iterationcount}"/> - <sysproperty key="jbosstest.beancount" value="${jbosstest.beancount}"/> - - <classpath> - <pathelement location="${build.classes}"/> - <pathelement location="${build.resources}/"/> - <path refid="tests.classpath"/> - <path refid="jboss.iiop.classpath"/> - </classpath> - - <formatter classname="org.jboss.ant.taskdefs.XMLJUnitResultFormatter" - extension=".xml" usefile="${junit.formatter.usefile}"/> - - <test todir="${build.reports}" name="${test}" - haltonerror="${junit.batchtest.haltonerror}" - haltonfailure="${junit.batchtest.haltonfailure}" - fork="${junit.batchtest.fork}"/> - </junit> - </target> <!-- | Generates reports from JUnit output.
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development