Author: ron.sigal(a)jboss.com
Date: 2009-04-05 02:49:39 -0400 (Sun, 05 Apr 2009)
New Revision: 4952
Modified:
remoting2/branches/2.2/build.xml
Log:
JBREM-139: Added tests for servlet transport.
Modified: remoting2/branches/2.2/build.xml
===================================================================
--- remoting2/branches/2.2/build.xml 2009-04-05 06:42:15 UTC (rev 4951)
+++ remoting2/branches/2.2/build.xml 2009-04-05 06:49:39 UTC (rev 4952)
@@ -30,7 +30,8 @@
<property name="compile.target"
value="${ant.java.version}"/>
<target name="configure" depends="get-jvm"
unless="configure.disable">
-
+ <property file="local.properties" />
+
<!-- This is for the jrunit benchmark results -->
<property file="database.properties"/>
@@ -907,6 +908,212 @@
</junit>
</target>
+ <!--=====================================================================-->
+ <!--=====================================================================-->
+ <!-- servlet tests -->
+ <!--=====================================================================-->
+ <!--=====================================================================-->
+
+ <target name="tests.servlet.config" depends="configure">
+ <echo>jboss home: ${jboss.home}</echo>
+ <property name="jboss.conf.dir"
value="${jboss.home}/server/default/conf/"/>
+ <property name="jboss.deploy.dir"
value="${jboss.home}/server/default/deploy/"/>
+ <property name="jboss.lib.dir"
value="${jboss.home}/server/default/lib"/>
+ <property name="jboss.log.dir"
value="${jboss.home}/server/default/log"/>
+ <property name="servlet.tests.dir"
value="${tests.dir}/org/jboss/test/remoting/transport/servlet"/>
+ </target>
+
+ <target name="tests.servlet.setup"
depends="tests.servlet.config,tests.jars,tests.servlet.clean">
+ <mkdir dir="${output.tests.results}"/>
+ <mkdir dir="${basedir}/Save"/>
+ <copy file="${jboss.lib.dir}/jboss-remoting.jar"
todir="${basedir}/Save" overwrite="true"/>
+ <copy file="${jboss.deploy.dir}/jboss-web.deployer/server.xml"
todir="${basedir}/Save" overwrite="true"/>
+ <copy file="${output.lib.dir}/jboss-remoting.jar"
todir="${jboss.lib.dir}" overwrite="true"/>
+ <copy file="${output.lib.dir}/jboss-remoting-tests.jar"
todir="${jboss.lib.dir}" overwrite="true"/>
+ <copy file="${servlet.tests.dir}/server.xml"
todir="${jboss.deploy.dir}/jboss-web.deployer"/>
+ <copy file="${servlet.tests.dir}/ssl/keystore"
tofile="${jboss.conf.dir}/keystore"/>
+ </target>
+
+ <target name="tests.servlet.teardown"
depends="tests.servlet.clean">
+ <copy file="${basedir}/Save/jboss-remoting.jar"
todir="${jboss.lib.dir}" overwrite="true"/>
+ <copy file="${basedir}/Save/server.xml"
todir="${jboss.deploy.dir}/jboss-web.deployer"/>
+ </target>
+
+ <target name="tests.servlet.clean">
+ <delete file="${jboss.lib.dir}/jboss-remoting-tests.jar"
quiet="true"/>
+ <delete file="${jboss.conf.dir}/keystore" quiet="true"/>
+ <delete file="${jboss.deploy.dir}/remoting-servlet-service.xml"
quiet="true"/>
+ <delete dir="${jboss.deploy.dir}/servlet-invoker.war"
quiet="true"/>
+ </target>
+
+ <target name="AS.start">
+ <property environment="env"/>
+ <exec executable="${shell}" searchpath="true"
dir="${jboss.home}" spawn="true">
+ <env key="Path"
path="${env.Path}${path.separator}c:/cygwin/usr/bin"/>
+ <env key="JBOSS_HOME" value="${jboss.home}"/>
+ <arg file="${jboss.home}/bin/run.sh"/>
+ <arg value="-c default"/>
+ </exec>
+ <echo>Going to sleep for ${as.startup.time} seconds</echo>
+ <sleep seconds="${as.startup.time}"/>
+ </target>
+
+ <target name="AS.start.opts">
+ <property environment="env"/>
+ <exec executable="${shell}" searchpath="true"
dir="${jboss.home}" spawn="true">
+ <env key="Path"
path="${env.Path}${path.separator}c:/cygwin/usr/bin"/>
+ <env key="JAVA_OPTS" value="${java.opts}"/>
+ <env key="JBOSS_HOME" value="${jboss.home}"/>
+ <arg file="${jboss.home}/bin/run.sh"/>
+ </exec>
+ <echo>Going to sleep for ${as.startup.time} seconds</echo>
+ <sleep seconds="${as.startup.time}"/>
+ </target>
+
+ <target name="AS.shutdown" depends="tests.servlet.config">
+ <property environment="env"/>
+ <exec executable="${shell}" searchpath="true"
dir="${jboss.home}" spawn="true">
+ <env key="Path"
path="${env.Path}${path.separator}c:/cygwin/usr/bin"/>
+ <env key="JBOSS_HOME" value="${jboss.home}"/>
+ <arg file="${jboss.home}/bin/shutdown.sh"/>
+ <arg value="-S"/>
+ </exec>
+ <sleep seconds="${as.shutdown.time}"/>
+ </target>
+
+ <target name="tests.functional.servlet"
depends="tests.servlet.setup">
+ <antcall target="tests.servlet.simple"
inheritrefs="true"/>
+ </target>
+
+ <target name="tests.servlet.simple">
+ <antcall target="AS.start"/>
+ <antcall target="tests.servlet" inheritrefs="true"/>
+ <antcall target="tests.servlet.callback"
inheritrefs="true"/>
+ <antcall target="tests.servlet.marshal"
inheritrefs="true"/>
+ <antcall target="tests.servlet.ssl" inheritrefs="true"/>
+ <antcall target="AS.shutdown"/>
+ </target>
+
+ <target name="tests.servlet">
+ <copy file="${servlet.tests.dir}/remoting-servlet-service.xml"
todir="${jboss.deploy.dir}" overwrite="true"/>
+ <sleep seconds="2"/>
+ <copy todir="${jboss.deploy.dir}">
+ <fileset dir="${output.lib.dir}">
+ <include name="servlet-invoker.war/**"/>
+ </fileset>
+ </copy>
+ <copy file="${servlet.tests.dir}/WEB-INF/web.xml"
+ todir="${jboss.deploy.dir}/servlet-invoker.war/WEB-INF"
overwrite="true"/>
+ <sleep seconds="2"/>
+ <junit printsummary="true" fork="yes"
includeantruntime="true">
+ <jvmarg
value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
+ <jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
+ <classpath>
+ <path refid="tests.classpath"/>
+ <pathelement
location="${output.lib.dir}/jboss-remoting-tests.jar"/>
+ </classpath>
+ <formatter
classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-java_serialization.xml"/>
+ <batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
+ <fileset dir="${tests.compile.dir}">
+ <include
name="**/remoting/transport/servlet/**TestClient.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ <delete dir="${jboss.deploy.dir}/servlet-invoker.war"/>
+ <delete file="${jboss.deploy.dir}/remoting-servlet-service.xml"/>
+ </target>
+
+ <target name="tests.servlet.callback">
+ <copy file="${servlet.tests.dir}/callback/remoting-servlet-service.xml"
todir="${jboss.deploy.dir}" overwrite="true"/>
+ <sleep seconds="2"/>
+ <copy todir="${jboss.deploy.dir}">
+ <fileset dir="${output.lib.dir}">
+ <include name="servlet-invoker.war/**"/>
+ </fileset>
+ </copy>
+ <copy file="${servlet.tests.dir}/callback/WEB-INF/web.xml"
+ todir="${jboss.deploy.dir}/servlet-invoker.war/WEB-INF"
overwrite="true"/>
+ <sleep seconds="2"/>
+ <junit printsummary="true" fork="yes"
includeantruntime="true">
+ <jvmarg
value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
+ <jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
+ <classpath>
+ <path refid="tests.classpath"/>
+ <pathelement
location="${output.lib.dir}/jboss-remoting-tests.jar"/>
+ </classpath>
+ <formatter
classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-java_serialization.xml"/>
+ <batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
+ <fileset dir="${tests.compile.dir}">
+ <include
name="**/remoting/transport/servlet/callback/*TestClient.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ <delete dir="${jboss.deploy.dir}/servlet-invoker.war"/>
+ <delete file="${jboss.deploy.dir}/remoting-servlet-service.xml"/>
+ </target>
+
+ <target name="tests.servlet.marshal">
+ <copy file="${servlet.tests.dir}/marshal/remoting-servlet-service.xml"
todir="${jboss.deploy.dir}" overwrite="true"/>
+ <sleep seconds="2"/>
+ <copy todir="${jboss.deploy.dir}">
+ <fileset dir="${output.lib.dir}">
+ <include name="servlet-invoker.war/**"/>
+ </fileset>
+ </copy>
+ <copy file="${servlet.tests.dir}/marshal/WEB-INF/web.xml"
+ todir="${jboss.deploy.dir}/servlet-invoker.war/WEB-INF"
overwrite="true"/>
+ <sleep seconds="2"/>
+ <junit printsummary="true" fork="yes"
includeantruntime="true">
+ <jvmarg
value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
+ <jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
+ <classpath>
+ <path refid="tests.classpath"/>
+ <pathelement
location="${output.lib.dir}/jboss-remoting-tests.jar"/>
+ </classpath>
+ <formatter
classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-java_serialization.xml"/>
+ <batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
+ <fileset dir="${tests.compile.dir}">
+ <include
name="**/remoting/transport/servlet/marshal/*TestClient.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ <delete dir="${jboss.deploy.dir}/servlet-invoker.war"/>
+ <delete file="${jboss.deploy.dir}/remoting-servlet-service.xml"/>
+ </target>
+
+ <target name="tests.servlet.ssl">
+ <copy file="${servlet.tests.dir}/ssl/remoting-sslservlet-service.xml"
todir="${jboss.deploy.dir}" overwrite="true"/>
+ <sleep seconds="4"/>
+ <copy todir="${jboss.deploy.dir}">
+ <fileset dir="${output.lib.dir}">
+ <include name="servlet-invoker.war/**"/>
+ </fileset>
+ </copy>
+ <copy file="${servlet.tests.dir}/ssl/WEB-INF/web.xml"
+ todir="${jboss.deploy.dir}/servlet-invoker.war/WEB-INF"
overwrite="true"/>
+ <sleep seconds="2"/>
+ <junit printsummary="true" fork="yes"
includeantruntime="true">
+ <jvmarg
value="-Dloader.path=${output.lib.dir}/jboss-remoting-loading-tests.jar"/>
+ <jvmarg value="-D${remoting.metadata.key}=${metadata}"/>
+ <classpath>
+ <path refid="tests.classpath"/>
+ <pathelement
location="${output.lib.dir}/jboss-remoting-tests.jar"/>
+ </classpath>
+ <formatter
classname="org.jboss.ant.taskdefs.XMLJUnitMultipleResultFormatter"
+ extension="-java_serialization.xml"/>
+ <batchtest fork="yes" todir="${output.tests.results}"
haltonfailure="no">
+ <fileset dir="${tests.compile.dir}">
+ <include
name="**/remoting/transport/servlet/ssl/*TestClient.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ <delete dir="${jboss.deploy.dir}/servlet-invoker.war"/>
+ <delete
file="${jboss.deploy.dir}/remoting-sslservlet-service.xml"/>
+ </target>
+
<target name="tests.versioning.beta2.client" depends="jars,
tests.jars">
<!--<antcall target="tests.versioning.all_transports"
inheritrefs="true">-->
<antcall target="tests.versioning.no_multiplex"
inheritrefs="true">
Show replies by date