[jboss-cvs] JBossAS SVN: r80327 - in trunk/testsuite: imports and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Nov 1 17:38:48 EDT 2008
Author: rrajesh
Date: 2008-11-01 17:38:47 -0400 (Sat, 01 Nov 2008)
New Revision: 80327
Modified:
trunk/testsuite/build.xml
trunk/testsuite/imports/server-config.xml
Log:
JBAS-5873 Adding compatibility matrix to the testsuite build
Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml 2008-11-01 10:24:39 UTC (rev 80326)
+++ trunk/testsuite/build.xml 2008-11-01 21:38:47 UTC (rev 80327)
@@ -3510,4 +3510,146 @@
</style>
</target>
+ <target name="tests-matrix" description="Executes only the version check compatibility suite. Use -Dmatrix-versions=[version container] for this task" depends="maybejars" if="matrix-versions">
+
+ <fail message="Use -Dmatrix-versions=[version container] for this task" unless="matrix-versions"/>
+ <fail message="Set -Djdk15= to a JDK1.5 installation" unless="HAVE_JDK_1.5"/>
+ <fail message="Set -Djdk15= to a JDK1.6 installation" unless="HAVE_JDK_1.6"/>
+
+ <!-- testing interoperating with clients using the unified invokers over jboss remoting -->
+ <test-compatibility client-version="4_2_x" label="15c-15s" client-jdk="${jdk15}" server-jdk="${jdk15}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
+ <test-compatibility client-version="4_2_x" label="15c-16s" client-jdk="${jdk15}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
+ <test-compatibility client-version="4_2_x" label="16c-16s" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
+
+ <!-- testing interoperating with clients using the pooled invokers -->
+ <test-compatibility-pooled-invokers label="15c-15s" client-version="4_2_x" client-jdk="${jdk15}" server-jdk="${jdk15}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
+ <test-compatibility-pooled-invokers label="15c-16s" client-version="4_2_x" client-jdk="${jdk15}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
+ <test-compatibility-pooled-invokers label="16c-16s" client-version="4_2_x" client-jdk="${jdk16}" server-jdk="${jdk16}" client-serialization-flag="-Dnone" serialization-flag="-Dnone"/>
+ </target>
+
+ <macrodef name="test-compatibility-pooled-invokers">
+ <attribute name="client-version"/>
+ <attribute name="label"/>
+ <attribute name="client-jdk"/>
+ <attribute name="server-jdk"/>
+ <attribute name="client-serialization-flag"/>
+ <attribute name="serialization-flag"/>
+ <sequential>
+ <start-jboss conf="default" jvmargs="-Xmx128m @{serialization-flag}" java.exec="@{server-jdk}/bin/java"/>
+ <wait-on-host/>
+ <antcall target="tests-standard-unit-matrix-version-pooled">
+ <param name="matrix-configuration" value="@{client-version}-@{label}"/>
+ <param name="junit-jvm-command" value="@{client-jdk}/bin/java"/>
+ <param name="current-version-dir" value="${matrix-versions}/@{client-version}"/>
+ <param name="client-serialization-flag" value="@{client-serialization-flag}"/>
+ </antcall>
+ <stop-jboss jvmargs="@{serialization-flag}" java.exec="@{server-jdk}/bin/java"/>
+ <wait-on-shutdown conf="default"/>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="test-compatibility">
+ <attribute name="client-version"/>
+ <attribute name="label"/>
+ <attribute name="client-jdk"/>
+ <attribute name="server-jdk"/>
+ <attribute name="client-serialization-flag"/>
+ <attribute name="serialization-flag"/>
+ <attribute name="server-config"/>
+ <sequential>
+ <start-jboss conf="default" jvmargs="-Xmx128m @{serialization-flag}" java.exec="@{server-jdk}/bin/java"/>
+ <wait-on-host/>
+ <antcall target="tests-standard-unit-matrix-version">
+ <param name="matrix-configuration" value="@{client-version}-@{label}"/>
+ <param name="junit-jvm-command" value="@{client-jdk}/bin/java"/>
+ <param name="current-version-dir" value="${matrix-versions}/@{client-version}"/>
+ <param name="client-serialization-flag" value="@{client-serialization-flag}"/>
+ </antcall>
+ <stop-jboss jvmargs="@{serialization-flag}" java.exec="@{server-jdk}/bin/java"/>
+ <wait-on-shutdown conf="@{server-config}"/>
+ </sequential>
+ </macrodef>
+
+ <target name="tests-standard-unit-matrix-version">
+ <execute-matrix-unit test-name="testbyvalue" parameter-filter="org/jboss/test/testbyvalue/test/**/*TestCase.class"/>
+ <execute-matrix-unit test-name="client" parameter-filter="org/jboss/test/client/**/*TestCase.class"/>
+ <execute-matrix-unit test-name="bmp" parameter-filter="org/jboss/test/bmp/**/*TestCase.class"/>
+ <execute-matrix-unit test-name="cmp2" parameter-filter="org/jboss/test/cmp2/**/*TestCase.class"/>
+ <execute-matrix-unit test-name="jms" parameter-filter="org/jboss/test/jbossmessaging/test/JBossJMSUnitTestCase.class"/>
+ </target>
+
+ <target name="tests-standard-unit-matrix-version-pooled">
+ <execute-matrix-unit test-name="pooled-invoker" parameter-filter="org/jboss/test/pooled/test/**/BeanStressTestCase.class"/>
+ </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}"/>
+ <!-- The following test excluded because they need jboss.jar to
+ access the following classes not included with the client libs:
+ org/jboss/ejb/plugins/cmp/jdbc/metadata/JDBCQueryMetaData
+ org/jboss/metadata/ClientMetaData -->
+ <exclude name="org/jboss/test/client/test/MetaDataUnitTestCase.class"/>
+ <exclude name="org/jboss/test/cmp2/commerce/QueryTest.class"/>
+ <exclude name="org/jboss/test/cmp2/commerce/LimitOffsetTest.class"/>
+ <exclude name="org/jboss/test/cmp2/commerce/CompleteUnitTestCase.class"/>
+ </fileset>
+ </path>
+ </pathconvert>
+
+ <junit dir="${module.output}" printsummary="${junit.printsummary}" haltonerror="${junit.haltonerror}" haltonfailure="${junit.haltonfailure}" fork="true"
+ timeout="${junit.timeout}" jvm="${junit-jvm-command}">
+
+ <jvmarg line="${junit.jvm.options}"/>
+ <!-- Used for JGroups -->
+ <jvmarg value="-Dbind.address=${node0}"/>
+ <jvmarg value="${client-serialization-flag}"/>
+ <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}"/>
+ <sysproperty key="java.naming.provider.url" value="${node0.jndi.url}"/>
+ <sysproperty key="jbosstest.server.host" value="${node0}"/>
+ <!-- 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="tests.classpath"/>
+ <path refid="tests.compile.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>
</project>
Modified: trunk/testsuite/imports/server-config.xml
===================================================================
--- trunk/testsuite/imports/server-config.xml 2008-11-01 10:24:39 UTC (rev 80326)
+++ trunk/testsuite/imports/server-config.xml 2008-11-01 21:38:47 UTC (rev 80327)
@@ -17,6 +17,9 @@
<!-- Override for non-Sun compatible JDK layouts -->
<property name="javac.jar"
value="${env.JAVA_HOME}/lib/tools.jar"/>
+ <!--Default java executable for starting server -->
+ <property name="java.exec"
+ value="${env.JAVA_HOME}/bin/java"/>
<!-- Override with the jpda settings for debugging start-jboss. An example
for connecting with a debugger via the socket protocol:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y
@@ -788,9 +791,11 @@
description="An additional jvmarg line set after any ${jpda.cmdline}"/>
<attribute name="jboss.dist" default="${jboss.dist}"
description="The jboss dist root directory" />
+ <attribute name="java.exec" default="${java.exec}"
+ description="Path to the java ececutable" />
<sequential>
<echo message="Will start the jboss instance @{host} with @{conf}, dist=@{jboss.dist}"/>
- <java classname="org.jboss.Main" fork="true" spawn="true" dir="@{jboss.dist}/bin">
+ <java classname="org.jboss.Main" fork="true" spawn="true" dir="@{jboss.dist}/bin" jvm="@{java.exec}">
<classpath>
<pathelement location="@{jboss.dist}/bin/run.jar"/>
<pathelement location="${javac.jar}"/>
@@ -813,10 +818,12 @@
description="Addtional jvm args"/>
<attribute name="jboss.dist" default="${jboss.dist}"
description="The jboss dist root directory" />
+ <attribute name="java.exec" default="${java.exec}"
+ description="Path to the java ececutable" />
<sequential>
<echo message="Will stop the jboss instance at url @{url}"/>
<java classname="org.jboss.Shutdown" fork="true" dir="@{jboss.dist}/bin"
- jvmargs="@{jvmargs}">
+ jvmargs="@{jvmargs}" jvm="@{java.exec}">
<classpath>
<pathelement location="@{jboss.dist}/bin/shutdown.jar"/>
<pathelement location="@{jboss.dist}/client/jbossall-client.jar"/>
More information about the jboss-cvs-commits
mailing list