blob: 6dc39158860c322545f5fcf90cd0b1d4f9769c37 [file] [log] [blame]
Vinay Vishal57171472018-09-18 20:22:00 +05301<?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čekf4dc06a2021-05-17 12:10:57 +020020<project name="OfflineConfig admin devtests" default="all" basedir=".">
Vinay Vishal57171472018-09-18 20:22:00 +053021
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čekf4dc06a2021-05-17 12:10:57 +020039 </path>
Vinay Vishal57171472018-09-18 20:22:00 +053040 <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čekf4dc06a2021-05-17 12:10:57 +020045 <pathelement location="${jmxri.jar}"/>
46 <pathelement location="/export/ias/sqe-pe/codecoverage/jcov/lib/jcov.jar"/>
Vinay Vishal57171472018-09-18 20:22:00 +053047-->
48 </path>
49
50
51 <!-- init. Initialization involves creating publishing directories and
David Matějčekf4dc06a2021-05-17 12:10:57 +020052 OS specific targets. -->
Vinay Vishal57171472018-09-18 20:22:00 +053053 <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čekf4dc06a2021-05-17 12:10:57 +020056 </tstamp>
Vinay Vishal57171472018-09-18 20:22:00 +053057 <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čekf4dc06a2021-05-17 12:10:57 +020079 <javac srcdir="${testsrc.dir}"
Vinay Vishal57171472018-09-18 20:22:00 +053080 destdir="${component.tests.classes.dir}"
David Matějčekf4dc06a2021-05-17 12:10:57 +020081 debug="${javac.debug}"
Vinay Vishal57171472018-09-18 20:22:00 +053082 optimize="${javac.optimize}"
David Matějčekf4dc06a2021-05-17 12:10:57 +020083 source="${javac.source}"
Vinay Vishal57171472018-09-18 20:22:00 +053084 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čekf4dc06a2021-05-17 12:10:57 +020091
Vinay Vishal57171472018-09-18 20:22:00 +053092</target>
93
94
95<target name="run-tests" depends="build">
David Matějčekf4dc06a2021-05-17 12:10:57 +020096 <java fork="true" failonerror="true"
Vinay Vishal57171472018-09-18 20:22:00 +053097 classname="com.sun.enterprise.admin.config.OfflineConfigTest" >
David Matějčekf4dc06a2021-05-17 12:10:57 +020098<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
Vinay Vishal57171472018-09-18 20:22:00 +053099-->
100 <arg line="-testpath ${tests.workfiles.dir}" />
101 <jvmarg value="-Xdebug"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +0200102 <jvmarg value="-Xnoagent"/>
103 <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/>
Vinay Vishal57171472018-09-18 20:22:00 +0530104 <classpath refid="test.run.classpath"/>
105 </java>
106</target>
107
108<target name="offline-commander" depends="build">
David Matějčekf4dc06a2021-05-17 12:10:57 +0200109 <java fork="true" failonerror="true"
Vinay Vishal57171472018-09-18 20:22:00 +0530110 classname="com.sun.enterprise.admin.config.OfflineCommander" >
David Matějčekf4dc06a2021-05-17 12:10:57 +0200111<!-- <jvmarg value="-Djcov.file=${jcov.file}"/>
Vinay Vishal57171472018-09-18 20:22:00 +0530112-->
113 <arg line="-testpath ${tests.workfiles.dir}" />
David Matějčekf4dc06a2021-05-17 12:10:57 +0200114
Vinay Vishal57171472018-09-18 20:22:00 +0530115 <jvmarg value="-Xdebug"/>
David Matějčekf4dc06a2021-05-17 12:10:57 +0200116 <jvmarg value="-Xnoagent"/>
117 <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=25001"/>
Vinay Vishal57171472018-09-18 20:22:00 +0530118
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čekf4dc06a2021-05-17 12:10:57 +0200127
Vinay Vishal57171472018-09-18 20:22:00 +0530128 <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čekf4dc06a2021-05-17 12:10:57 +0200140