| <?xml version="1.0" encoding="UTF-8"?> |
| <!DOCTYPE project [ |
| <!-- |
| |
| Copyright (c) 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 common SYSTEM "file:./../../../config/common.xml"> |
| <!ENTITY props SYSTEM "file:./../../../config/properties.xml"> |
| ]> |
| <project name="Admin Infrastructure Devtests" default="all" basedir="."> |
| &props; |
| &common; |
| <property name="src.dir" value="src"/> |
| <property name="src-ng.dir" value="testng"/> |
| <property name="classes.dir" value="classes"/> |
| <property name="dist.dir" value="dist"/> |
| <property name="domain.dir" value="${env.S1AS_HOME}/domains/domain1"/> |
| <property name="mbean-loading-folder" value="${domain.dir}/applications/mbeans"/> |
| |
| <!-- ########## all ############# --> |
| <target name="all" depends="deploy, makejar" /> |
| |
| <!-- ########## setup ############# --> |
| <target name="setup" depends="init-common"> |
| <mkdir dir="${classes.dir}"/> |
| <mkdir dir="${dist.dir}"/> |
| </target> |
| |
| <!-- ########## build ############# --> |
| <target name="build" depends="setup"> |
| <mkdir dir="${classes.dir}"/> |
| <javac |
| srcdir="${src.dir}" |
| destdir="${classes.dir}" |
| debug="on"> |
| <classpath> |
| <pathelement path="${s1astest.classpath}"/> |
| <pathelement path="${classes.dir}"/> |
| <pathelement location="${env.APS_HOME}/lib/testng.jar"/> |
| </classpath> |
| </javac> |
| <copy todir="${classes.dir}/test" file="LocalStrings.properties"/> |
| </target> |
| |
| <!-- ########## run ############# --> |
| <target name="run"> |
| <antcall target="runmain"/> |
| </target> |
| |
| |
| <!-- ########## runmain ############# --> |
| |
| <target name="runmain" depends="build"> |
| <java classname="test.TestDriver" |
| dir="." |
| fork="yes"> |
| <!-- |
| <arg value="${admin.user}"/> |
| <arg value="${admin.password}"/> |
| <arg value="${admin.host}"/> |
| <arg value="${admin.port}"/> |
| <arg value="${admin.secure}"/> |
| <arg value="tests.list"/> |
| --> |
| <jvmarg line="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=3333,suspend=n,server=y -Djava.compiler=NONE"/> |
| <classpath> |
| <pathelement path="${s1astest.classpath}"/> |
| <pathelement path="${classes.dir}"/> |
| <pathelement path="${env.S1AS_HOME}/lib/appserv-rt.jar"/> |
| </classpath> |
| </java> |
| </target> |
| |
| |
| <!-- ########## debug ############# --> |
| |
| <target name="debug" depends="build"> |
| <java classname="test.TestDriver" |
| dir="." |
| fork="yes"> |
| <jvmarg line="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=3333,suspend=y,server=y -Djava.compiler=NONE"/> |
| <classpath> |
| <pathelement path="${s1astest.classpath}"/> |
| <pathelement path="${classes.dir}"/> |
| </classpath> |
| </java> |
| </target> |
| |
| |
| <!-- ########## clean ############# --> |
| |
| <target name="clean"> |
| <delete dir="${classes.dir}"/> |
| <delete dir="${dist.dir}"/> |
| <delete dir="${mbean-loading-folder}/testmbeans"/> |
| </target> |
| |
| <!-- ########## deploy ############# --> |
| |
| <target name="deploy" depends="build"> |
| <copy todir="${mbean-loading-folder}/testmbeans"> |
| <fileset dir="${classes.dir}/testmbeans"/> |
| </copy> |
| </target> |
| |
| <!-- ########## makejar ############# --> |
| |
| <target name="makejar" depends="build"> |
| <jar destfile="${dist.dir}/testmbeans.jar" |
| basedir="${classes.dir}" |
| excludes="test/**" /> |
| </target> |
| |
| <!-- ########## ASProbe ############# --> |
| |
| <target name="ASProbe" depends="build"> |
| <jar destfile="${dist.dir}/ASProbe.jar" |
| basedir="${classes.dir}" |
| includes="testmbeans/ASProbe*"/> |
| </target> |
| |
| <path id="tng-run.cp"> |
| <pathelement path="${s1astest.classpath}"/> |
| <pathelement path="${classes.dir}"/> |
| <pathelement path="${env.S1AS_HOME}/lib/appserv-rt.jar"/> |
| <pathelement path="${env.S1AS_HOME}/lib/jakartaee.jar"/> |
| <pathelement location="${env.APS_HOME}/lib/testng.jar"/> |
| <pathelement location="${env.APS_HOME}/lib/reporter.jar"/> |
| </path> |
| |
| <!-- ########## build-ng ############# --> |
| <target name="build-ng" depends="build"> |
| <mkdir dir="${classes.dir}"/> |
| <javac |
| srcdir="${src-ng.dir}" |
| destdir="${classes.dir}" |
| debug="on"> |
| <classpath> |
| <pathelement path="${s1astest.classpath}"/> |
| <pathelement path="${classes.dir}"/> |
| <pathelement location="${env.APS_HOME}/lib/testng.jar"/> |
| </classpath> |
| </javac> |
| <copy todir="${classes.dir}/test" file="LocalStrings.properties"/> |
| </target> |
| |
| <target name="run-tests-ng-params" |
| description="run examples with java" |
| depends="setup,deploy,build-ng" > |
| <delete dir="./test-output"/> |
| <java fork="yes" |
| classpathref="tng-run.cp" |
| classname="org.testng.TestNG" > |
| <arg value="./testng/testng-params.xml"/> |
| <jvmarg value="-ea"/> |
| <jvmarg value="-Djava.compiler=NONE"/> |
| </java> |
| </target> |
| <target name="run-tests-ng-separate" |
| description="run examples with java" |
| depends="setup,deploy,build-ng" > |
| <delete dir="./test-output"/> |
| <java fork="yes" |
| classpathref="tng-run.cp" |
| classname="org.testng.TestNG" > |
| <arg value="./testng/testng-separate.xml"/> |
| <jvmarg value="-ea"/> |
| <jvmarg value="-Djava.compiler=NONE"/> |
| </java> |
| </target> |
| |
| <target name="run-tests-ng-dataprovider" |
| description="run examples with java" |
| depends="setup,deploy,build-ng" > |
| <delete dir="./test-output"/> |
| <java fork="yes" |
| classpathref="tng-run.cp" |
| classname="org.testng.TestNG" > |
| <arg value="./testng/testng-data-provider.xml"/> |
| <jvmarg value="-ea"/> |
| <jvmarg value="-Djava.compiler=NONE"/> |
| </java> |
| </target> |
| <target name="run-tests-ng" |
| depends="run-tests-ng-separate,run-tests-ng-params,run-tests-ng-dataprovider"> |
| </target> |
| |
| <target name="report-ng"> |
| <mkdir dir="test-report"/> |
| <junitreport todir="test-report"> |
| <fileset dir="test-output"> |
| <include name="*.xml"/> |
| </fileset> |
| <report format="noframes" todir="test-report"/> |
| </junitreport> |
| </target> |
| </project> |