Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
| 2 | <!-- |
| 3 | |
| 4 | Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved. |
| 5 | |
| 6 | This program and the accompanying materials are made available under the |
| 7 | terms of the Eclipse Public License v. 2.0, which is available at |
| 8 | http://www.eclipse.org/legal/epl-2.0. |
| 9 | |
| 10 | This Source Code may also be made available under the following Secondary |
| 11 | Licenses when the conditions for such availability set forth in the |
| 12 | Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| 13 | version 2 with the GNU Classpath Exception, which is available at |
| 14 | https://www.gnu.org/software/classpath/license.html. |
| 15 | |
| 16 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| 17 | |
| 18 | --> |
| 19 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 20 | <project name="OfflineConfig admin devtests" default="all" basedir="."> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 21 | |
| 22 | <!-- ========== Initialize Properties =================================== --> |
| 23 | |
| 24 | <property environment="env"/> |
| 25 | <property file="./build.properties"/> |
| 26 | |
| 27 | <path id="test.compile.classpath"> |
| 28 | <pathelement location="${appserv-se.jar}"/> |
| 29 | <pathelement location="${appserv-rt.jar}"/> |
| 30 | <pathelement location="${appserv-admin.jar}"/> |
| 31 | <pathelement location="${appserv-admin-ee.jar}"/> |
| 32 | <!-- |
| 33 | <pathelement location="${appserv-deployment-client.jar}"/> |
| 34 | <pathelement location="${imqjmsra.jar}"/> |
| 35 | --> |
| 36 | <pathelement location="${j2ee.jar}"/> |
| 37 | <pathelement location="${junit.jar}"/> |
| 38 | <pathelement location="${testng.jar}"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 39 | </path> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 40 | <path id="test.run.classpath"> |
| 41 | <pathelement location="${component.tests.classes.dir}"/> |
| 42 | <path refid="test.compile.classpath"/> |
| 43 | <!-- |
| 44 | <pathelement location="${schema2beans.jar}"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 45 | <pathelement location="${jmxri.jar}"/> |
| 46 | <pathelement location="/export/ias/sqe-pe/codecoverage/jcov/lib/jcov.jar"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 47 | --> |
| 48 | </path> |
| 49 | |
| 50 | |
| 51 | <!-- init. Initialization involves creating publishing directories and |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 52 | OS specific targets. --> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 53 | <target name="init-tests" description="${component.name} initialization"> |
| 54 | <tstamp> |
| 55 | <format property="start.time" pattern="MM/dd/yyyy hh:mm aa"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 56 | </tstamp> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 57 | <echo message="Building component ${component.name}"/> |
| 58 | <mkdir dir="${component.tests.classes.dir}"/> |
| 59 | <delete dir="${tests.workfiles.dir}"/> |
| 60 | <mkdir dir="${tests.workfiles.dir}"/> |
| 61 | <copy todir="${tests.workfiles.dir}"> |
| 62 | <fileset dir="${testfiles.dir}" includes="*"/> |
| 63 | </copy> |
| 64 | </target> |
| 65 | |
| 66 | <!-- all --> |
| 67 | <target name="all" depends="run-tests" |
| 68 | description="Build entire component"> |
| 69 | </target> |
| 70 | |
| 71 | <!-- clean --> |
| 72 | <target name="clean"> |
| 73 | <delete dir="${component.publish.home}"/> |
| 74 | </target> |
| 75 | |
| 76 | |
| 77 | <target name="build" depends="init-tests"> |
| 78 | <echo message="Compiling {component.name}"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 79 | <javac srcdir="${testsrc.dir}" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 80 | destdir="${component.tests.classes.dir}" |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 81 | debug="${javac.debug}" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 82 | optimize="${javac.optimize}" |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 83 | source="${javac.source}" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 84 | deprecation="${javac.deprecation}" |
| 85 | failonerror="true" |
| 86 | classpathref="test.compile.classpath"> |
| 87 | <include name="**/*.java"/> |
| 88 | <!-- <include name="**/*Test.java"/> |
| 89 | <include name="**/*Tests.java"/> --> |
| 90 | </javac> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 91 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 92 | </target> |
| 93 | |
| 94 | |
| 95 | <target name="run-tests" depends="build"> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 96 | <java fork="true" failonerror="true" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 97 | classname="com.sun.enterprise.admin.config.OfflineConfigTest" > |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 98 | <!-- <jvmarg value="-Djcov.file=${jcov.file}"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 99 | --> |
| 100 | <arg line="-testpath ${tests.workfiles.dir}" /> |
| 101 | <jvmarg value="-Xdebug"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 102 | <jvmarg value="-Xnoagent"/> |
| 103 | <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 104 | <classpath refid="test.run.classpath"/> |
| 105 | </java> |
| 106 | </target> |
| 107 | |
| 108 | <target name="offline-commander" depends="build"> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 109 | <java fork="true" failonerror="true" |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 110 | classname="com.sun.enterprise.admin.config.OfflineCommander" > |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 111 | <!-- <jvmarg value="-Djcov.file=${jcov.file}"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 112 | --> |
| 113 | <arg line="-testpath ${tests.workfiles.dir}" /> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 114 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 115 | <jvmarg value="-Xdebug"/> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 116 | <jvmarg value="-Xnoagent"/> |
| 117 | <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/> |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 118 | |
| 119 | <classpath refid="test.run.classpath"/> |
| 120 | </java> |
| 121 | </target> |
| 122 | |
| 123 | <path id="tng-run.cp"> |
| 124 | <path refid="test.run.classpath"/> |
| 125 | <pathelement location="${testng.jar}"/> |
| 126 | </path> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 127 | |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 128 | <target name="run-tests-ng" |
| 129 | description="run examples with java" |
| 130 | depends="build" > |
| 131 | <java fork="yes" |
| 132 | classpathref="tng-run.cp" |
| 133 | classname="org.testng.TestNG" > |
| 134 | <arg value="./testng/testng.xml"/> |
| 135 | <jvmarg value="-ea"/> |
| 136 | </java> |
| 137 | </target> |
| 138 | |
| 139 | </project> |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 140 | |