From: Clebert S. <csu...@jb...> - 2005-04-28 23:43:13
|
User: csuconic Date: 05/04/28 19:43:00 Modified: jbosstest Tag: Branch_4_0 build.xml Log: Adding test-container for matrix checkings, acording to JBAS-1598 Revision Changes Path No revision No revision 1.406.2.59 +108 -2 jbosstest/build.xml (In the diff below, changes in quantity of whitespace are not shown.) Index: build.xml =================================================================== RCS file: /cvsroot/jboss/jbosstest/build.xml,v retrieving revision 1.406.2.58 retrieving revision 1.406.2.59 diff -u -b -r1.406.2.58 -r1.406.2.59 --- build.xml 28 Apr 2005 22:16:37 -0000 1.406.2.58 +++ build.xml 28 Apr 2005 23:43:00 -0000 1.406.2.59 @@ -6,7 +6,7 @@ <!-- See terms of license at http://www.gnu.org. --> <!-- ============================================================ --> -<!-- $Id: build.xml,v 1.406.2.58 2005/04/28 22:16:37 starksm Exp $ --> +<!-- $Id: build.xml,v 1.406.2.59 2005/04/28 23:43:00 csuconic Exp $ --> <project default="main" name="JBoss/Testsuite"> <import file="../tools/etc/buildmagic/build-common.xml"/> @@ -613,6 +613,10 @@ description="The units tests which are run against the jboss all config"> <start-jboss conf="all" jvmargs="-Xmx128m"/> <wait-on-host/> + <!-- It requires -Dmatrix-versions=defined if you want to execute this task. + More information at http://www.jboss.org/wiki/Edit.jsp?page=HowToExecuteMatrixTests + --> + <antcall target="tests-standard-unit-matrix"/> <antcall target="tests-standard-unit"/> <antcall target="tests-client-unit"/> <antcall target="tests-security-basic-unit"/> @@ -2777,6 +2781,108 @@ </junitreport> </target> + + <target name="jboss-matrix-tests" + description="Executes only the version check compatibility suite. Use -Dmatrix-versions=[version container] for this task" depends="maybejars" if="matrix-versions"> + <start-jboss conf="all" jvmargs="-Xmx128m"/> + <wait-on-host/> + <antcall target="tests-standard-unit-matrix"/> + <stop-jboss/> + <wait-on-shutdown conf="all"/> + </target> + + <target name="define-matrix-task"> + <taskdef name="matrixtask" classname="org.jboss.ant.taskdefs.AntCallOnDirectoryList"> + <classpath> + <pathelement location="${build.classes}"/> + </classpath> + </taskdef> + </target> + + <target name="tests-standard-unit-matrix" depends="define-matrix-task" if="matrix-versions"> + <matrixtask targetToExecute="tests-standard-unit-matrix-version" directoryProperty="current-version-dir" versionNameProperty="matrix-configuration"> + <dirset dir="${matrix-versions}"/> + </matrixtask> + </target> + + + <macrodef name="execute-matrix-unit"> + <attribute name="test-name"/> + <attribute name="parameter-filter"/> + <sequential> + <!-- this requires antcall as a property can't be redefined --> + <antcall target="execute-matrix-unit-target"> + <param name="test-name" value="@{test-name}"/> + <param name="parameter-filter" value="@{parameter-filter}"/> + </antcall> + </sequential> + </macrodef> + + <target name="execute-matrix-unit-target"> + <echo message=">>>>>> Executing test=${test-name} filter=${parameter-filter}"/> + <pathconvert pathSep="," dirSep="/" property="jbosstest.hometest"> + <path location="${build.classes}"/> + </pathconvert> + + <pathconvert pathSep="," dirSep="/" property="jbosstest.executionlist"> + <path > + <fileset dir="${build.classes}"> + <include name="${parameter-filter}"/> + </fileset> + </path> + </pathconvert> + + <junit dir="${module.output}" + printsummary="${junit.printsummary}" + haltonerror="${junit.haltonerror}" + haltonfailure="${junit.haltonfailure}" + fork="true" + timeout="${junit.timeout}" + jvm="${junit.jvm}"> + + <jvmarg value="${junit.jvm.options}"/> + <!-- Used for JGroups --> + <jvmarg value="-Dbind.address=${node0}"/> + <sysproperty key="jbosstest.deploy.dir" file="${build.lib}"/> + <sysproperty key="build.testlog" value="${build.testlog}"/> + <sysproperty key="log4j.configuration" value="file:${build.resources}/log4j.xml"/> + <sysproperty key="jboss-junit-configuration" value="${test-name}_${matrix-configuration}"/> + <!-- Pass along any jbosstest.* system properties --> + <syspropertyset> + <propertyref prefix="jbosstest."/> + </syspropertyset> + <classpath> + <pathelement location="${build.classes}"/> + <pathelement location="${build.resources}"/> + <fileset dir="${current-version-dir}" includes="*.jar"/> + <path refid="library.classpath" /> + </classpath> + <formatter classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter" + usefile="${junit.formatter.usefile}" + extension="-${test-name}_${matrix-configuration}.xml"/> + + <batchtest todir="${build.reports}" + haltonerror="${junit.batchtest.haltonerror}" + haltonfailure="${junit.batchtest.haltonfailure}" + fork="${junit.batchtest.fork}"> + + <fileset dir="${build.classes}"> + <include name="org/jboss/test/compatibility/test/matrix/MatrixTestContainer.class"/> + </fileset> + </batchtest> + </junit> + + </target> + + <target name="tests-standard-unit-matrix-version"> + <execute-matrix-unit test-name="client" parameter-filter="org/jboss/test/client/**/*TestCase.class"/> + <execute-matrix-unit test-name="WebService" parameter-filter="org/jboss/test/webservice/**/*TestCase.class"/> + <execute-matrix-unit test-name="BMP" parameter-filter="org/jboss/test/bmp/**/*TestCase.class"/> + <execute-matrix-unit test-name="CMP" parameter-filter="org/jboss/test/cmp2/**/*TestCase.class"/> + <execute-matrix-unit test-name="JBossMX" parameter-filter="org/jboss/test/jbossmx/**/*TestCase.class"/> + <execute-matrix-unit test-name="JMS" parameter-filter="org/objectweb/jtests/jms/**/*Test.class"/> + </target> + <!-- | this currently spews logs of VariableReference crap, so it is turned | off by default. Once this is fixed, it should be built after |