| <?xml version="1.0" encoding="ISO-8859-1"?> | |
| <!DOCTYPE project [ | |
| <!-- | |
| Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. | |
| This program and the accompanying materials are made available under the | |
| terms of the Eclipse Public License v. 2.0, which is available at | |
| http://www.eclipse.org/legal/epl-2.0. | |
| This Source Code may also be made available under the following Secondary | |
| Licenses when the conditions for such availability set forth in the | |
| Eclipse Public License v. 2.0 are satisfied: GNU General Public License, | |
| version 2 with the GNU Classpath Exception, which is available at | |
| https://www.gnu.org/software/classpath/license.html. | |
| SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 | |
| --> | |
| <!ENTITY commonBuild SYSTEM "./../../config/common.xml"> | |
| ]> | |
| <project name="apitests" default="private-all" basedir="."> | |
| <property file="./../../../../config.properties"/> | |
| &commonBuild; | |
| <property name="archivedir" value="${build}/archives"/> | |
| <path id="jsr88api.test.classpath"> | |
| <pathelement location="${inst}/lib/j2ee.jar"/> | |
| <pathelement location="${inst}/jdk/lib/tools.jar"/> | |
| <pathelement location="${env.APS_HOME}/devtests/deployment/util/build"/> | |
| </path> | |
| <path id="jsr88api.concurrency.test.classpath"> | |
| <pathelement location="${inst}/lib/javaee.jar"/> | |
| <pathelement location="${inst}/lib/appserv-admin.jar"/> | |
| <pathelement location="${inst}/lib/appserv-deployment-client.jar"/> | |
| <pathelement location="${env.APS_HOME}/devtests/deployment/util/build"/> | |
| </path> | |
| <target name="deployApps"> | |
| <delete dir="${testsRoot}/build/war/servletonly"/> | |
| <delete dir="${testsRoot}/build/ejb/statelesshello"/> | |
| <delete dir="${testsRoot}/build/ear/wstoejb"/> | |
| <ant dir="../../war/servletonly" target="assemble"> | |
| <property name="build" value="${testsRoot}/build/war/servletonly"/> | |
| </ant> | |
| <ant dir="../../ejb/statelesshello" target="assemble"> | |
| <property name="build" value="${testsRoot}/build/ejb/statelesshello"/> | |
| </ant> | |
| <ant dir="../../ear/wstoejb" target="build"> | |
| <property name="build" value="${testsRoot}/build/ear/wstoejb"/> | |
| </ant> | |
| <antcall target="common.deploy.asadmin"> | |
| <param name="arg.list" value="${testsRoot}/build/war/servletonly/servletonly.war"/> | |
| <param name="testName" value="servletonly"/> | |
| </antcall> | |
| <antcall target="common.deploy.asadmin"> | |
| <param name="arg.list" value="--retrieve ${archivedir} --name StatelessHelloEjb ${archivedir}/statelesshelloejb.jar"/> | |
| <param name="testName" value="StatelessHelloEjb"/> | |
| </antcall> | |
| <antcall target="common.deploy.asadmin"> | |
| <param name="arg.list" value="--name wstoejb --retrieve ${testsRoot}/build/ear/wstoejb ${testsRoot}/build/ear/wstoejb/wstoejb.ear"/> | |
| <param name="testName" value="wstoejb"/> | |
| </antcall> | |
| </target> | |
| <target name="undeployApps"> | |
| <antcall target="common.undeploy.asadmin"> | |
| <param name="arg.list" value="wstoejb"/> | |
| <param name="testName" value="wstoejb"/> | |
| </antcall> | |
| <antcall target="common.undeploy.asadmin"> | |
| <param name="arg.list" value="StatelessHelloEjb"/> | |
| <param name="testName" value="StatelessHelloEjb"/> | |
| </antcall> | |
| <antcall target="common.undeploy.asadmin"> | |
| <param name="arg.list" value="servletonly"/> | |
| <param name="testName" value="servletonly"/> | |
| </antcall> | |
| </target> | |
| <target name="compile" depends="init, compile.util"> | |
| <mkdir dir="${build}"/> | |
| <javac srcdir="." | |
| destdir="${build}" | |
| debug="on" | |
| failonerror="true" | |
| excludes="**/ProgressObjectImpl.java"> | |
| <classpath refid="jsr88api.test.classpath"/> | |
| <classpath refid="jsr88api.concurrency.test.classpath"/> | |
| </javac> | |
| </target> | |
| <target name="runclient" depends="compile"> | |
| <echo message="TestClient ${arg.list}"/> | |
| <javaWithResult | |
| fork="true" | |
| failonerror="false" | |
| jvm="${JAVA}" | |
| classname="devtests.deployment.jsr88.apitests.TestClient" | |
| output="${build}/${log.id}.output.log" | |
| resultproperty="result"> | |
| <classpath> | |
| <path location="${build}"/> | |
| <path location="${inst}/lib/j2ee.jar"/> | |
| <path location="${inst}/lib/appserv-rt.jar"/> | |
| <path location="${inst}/lib/appserv-admin.jar"/> | |
| <path location="${inst}/lib/appserv-ext.jar"/> | |
| <path location="${env.APS_HOME}/devtests/deployment/util/build"/> | |
| <path location="${inst}/jdk/lib/tools.jar"/> | |
| </classpath> | |
| <sysproperty key="com.sun.aas.installRoot" value="${inst}"/> | |
| <sysproperty key="server" value="${appserver.instance.name}"/> | |
| <sysproperty key="java.library.path" value="${inst}/lib"/> | |
| <sysproperty key="com.sun.aas.configRoot" value="${inst}/config"/> | |
| <sysproperty key="java.endorsed.dirs" value="${inst}/lib/endorsed"/> | |
| <arg line="${arg.list}" /> | |
| </javaWithResult> | |
| <antcall target="processResult"> | |
| <param name="result" value="${result}"/> | |
| <param name="log" value="${build}/${log.id}.output.log"/> | |
| </antcall> | |
| </target> | |
| <target name="runConcurrencyClient" depends="compile"> | |
| <echo message="ConcurrencyClient ${arg.list}"/> | |
| <java | |
| fork="true" | |
| failonerror="false" | |
| jvm="${JAVA}" | |
| classname="devtests.deployment.jsr88.apitests.TestJSR88Concurrency" | |
| output="${build}/${log.id}.output.log" | |
| resultproperty="result"> | |
| <classpath> | |
| <path location="${build}"/> | |
| <path location="${inst}/lib/javaee.jar"/> | |
| <path location="${inst}/lib/appserv-admin.jar"/> | |
| <path location="${inst}/lib/appserv-deployment-client.jar"/> | |
| <!-- <path location="${env.APS_HOME}/devtests/deployment/util/build"/> --> | |
| </classpath> | |
| <!-- | |
| <sysproperty key="com.sun.aas.installRoot" value="${inst}"/> | |
| <sysproperty key="server" value="${appserver.instance.name}"/> | |
| <sysproperty key="java.library.path" value="${inst}/lib"/> | |
| <sysproperty key="com.sun.aas.configRoot" value="${inst}/config"/> | |
| <sysproperty key="java.endorsed.dirs" value="${inst}/lib/endorsed"/> | |
| --> | |
| <arg line="${arg.list}" /> | |
| </java> | |
| <antcall target="processResult"> | |
| <param name="result" value="${result}"/> | |
| <param name="log" value="${build}/${log.id}.output.log"/> | |
| </antcall> | |
| </target> | |
| <target name="private-all" depends="init,compile.util"> | |
| <antcall target="deployApps" /> | |
| <antcall target="declare-test"> | |
| <param name="description" value="jsr88/apitests Test getAvailableModules API for all WARs"/> | |
| </antcall> | |
| <antcall target="runclient"> | |
| <param name="arg.list" value="1 ${jsr88.uri} ${admin.user} ${admin.password} servletonly"/> | |
| <param name="log.id" value="1"/> | |
| </antcall> | |
| <antcall target="declare-test"> | |
| <param name="description" value="jsr88/apitests Test getAvailableModules API for all EJB-JARs"/> | |
| </antcall> | |
| <antcall target="runclient"> | |
| <param name="arg.list" value="2 ${jsr88.uri} ${admin.user} ${admin.password} StatelessHelloEjb"/> | |
| <param name="log.id" value="2"/> | |
| </antcall> | |
| <antcall target="declare-test"> | |
| <param name="description" value="jsr88/apitests Test getAvailableModules API for all EARs"/> | |
| </antcall> | |
| <antcall target="runclient"> | |
| <param name="arg.list" value="3 ${jsr88.uri} ${admin.user} ${admin.password} wstoejb"/> | |
| <param name="log.id" value="3"/> | |
| </antcall> | |
| <antcall target="declare-test"> | |
| <param name="description" value="jsr88/apitests Test getRunningModules/getNonRunningModules API"/> | |
| </antcall> | |
| <antcall target="runclient"> | |
| <param name="arg.list" value="4 ${jsr88.uri} ${admin.user} ${admin.password} servletonly StatelessHelloEjb wstoejb"/> | |
| <param name="log.id" value="4"/> | |
| </antcall> | |
| <!-- <antcall target="runConcurrencyTest"/> | |
| --> | |
| <antcall target="undeployApps" /> | |
| </target> | |
| <target name="runConcurrencyTest" depends="init"> | |
| <antcall target="declare-test"> | |
| <param name="description" value="jsr88/apitests Test JSR-88 concurrent usage"/> | |
| </antcall> | |
| <antcall target="runConcurrencyClient"> | |
| <param name="arg.list" value="--host ${admin.host} --port ${admin.port} --secure ${s1as.secure} --username ${admin.user} --passwordfile ${passwordFile} --operation loopGetTargets*2"/> | |
| <param name="log.id" value="5"/> | |
| </antcall> | |
| </target> | |
| </project> |