author | lana |
Thu, 25 Aug 2016 22:35:51 +0000 | |
changeset 40595 | e5e704f4cc53 |
parent 40510 | 722c82994682 |
child 40599 | be40838eb215 |
permissions | -rw-r--r-- |
10 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<!-- |
|
36526 | 3 |
~ Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved. |
4 |
~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
5 |
~ |
|
6 |
~ This code is free software; you can redistribute it and/or modify it |
|
7 |
~ under the terms of the GNU General Public License version 2 only, as |
|
8 |
~ published by the Free Software Foundation. Oracle designates this |
|
9 |
~ particular file as subject to the "Classpath" exception as provided |
|
10 |
~ by Oracle in the LICENSE file that accompanied this code. |
|
11 |
~ |
|
12 |
~ This code is distributed in the hope that it will be useful, but WITHOUT |
|
13 |
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 |
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 |
~ version 2 for more details (a copy is included in the LICENSE file that |
|
16 |
~ accompanied this code). |
|
17 |
~ |
|
18 |
~ You should have received a copy of the GNU General Public License version |
|
19 |
~ 2 along with this work; if not, write to the Free Software Foundation, |
|
20 |
~ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
21 |
~ |
|
22 |
~ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
23 |
~ or visit www.oracle.com if you need additional information or have any |
|
24 |
~ questions. |
|
25 |
--> |
|
10 | 26 |
|
27 |
<!-- |
|
27546
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
28 |
This is a convenience build file supporting development in the langtools |
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
29 |
repository. It can be run either standalone, or from IDEs. This build script |
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
30 |
is for a developer use only, it is not used to build the production version |
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
31 |
of javac or other langtools tools. |
5845 | 32 |
|
33 |
External dependencies are specified via properties. These can be given |
|
34 |
on the command line, or by providing a local build.properties file. |
|
35 |
(They can also be edited into make/build.properties, although that is not |
|
36526 | 36 |
recommended.) At a minimum, langtools.jdk.home must be set to the installed |
5845 | 37 |
location of the version of JDK used to build this repository. Additional |
38 |
properties may be required, depending on the targets that are built. |
|
36526 | 39 |
For example, to run any of the jtreg tests you must set jtreg.home. |
5845 | 40 |
|
36526 | 41 |
The output of the build is as follows: |
5845 | 42 |
|
36526 | 43 |
build |
44 |
|-bin (scripts to invoke various tools, javac, javah etc.) |
|
45 |
|-genrsc (generated sources - i.e. properties) |
|
46 |
|-modules (compiled classes in a modular layout) |
|
47 |
|-jtreg (test work/results) |
|
48 |
|-toolclasses (tools used for building - like the property compiler) |
|
5845 | 49 |
|
50 |
This file is organized into sections as follows: |
|
51 |
- global property definitions |
|
36526 | 52 |
- primary top level targets (cleaning, building) |
5845 | 53 |
- utility definitions |
10 | 54 |
--> |
55 |
||
56 |
<project name="langtools" default="build" basedir=".."> |
|
5845 | 57 |
<!-- |
58 |
**** Global property definitions. |
|
59 |
--> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
60 |
|
10 | 61 |
<!-- The following locations can be used to override default property values. --> |
62 |
||
63 |
<!-- Use this location for customizations specific to this instance of this workspace --> |
|
64 |
<property file="build.properties"/> |
|
65 |
||
66 |
<!-- Use this location for customizations common to all OpenJDK langtools workspaces --> |
|
67 |
<property file="${user.home}/.openjdk/${ant.project.name}-build.properties"/> |
|
68 |
||
69 |
<!-- Use this location for customizations common to all OpenJDK workspaces --> |
|
70 |
<property file="${user.home}/.openjdk/build.properties"/> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
71 |
|
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
72 |
<!-- Convenient shorthands for standard locations within the workspace. --> |
36526 | 73 |
<property name="src.dir" location="src"/> |
74 |
<property name="test.dir" location="test"/> |
|
10 | 75 |
<property name="make.dir" location="make"/> |
11054
c4224d65eb3e
7110974: (javac) add coding conventions and style checkers for langtools
ksrini
parents:
10183
diff
changeset
|
76 |
<property name="make.conf.dir" location="${make.dir}/conf"/> |
10 | 77 |
<property name="make.tools.dir" location="${make.dir}/tools"/> |
36526 | 78 |
<property name="build.dir" location="build"/> |
79 |
<property name="build.modules" location="${build.dir}/modules"/> |
|
80 |
<property name="build.gensrc" location="${build.dir}/gensrc"/> |
|
81 |
<property name="build.tools" location="${build.dir}/toolclasses"/> |
|
82 |
<property name="build.bin" location="${build.dir}/bin"/> |
|
83 |
<property name="build.jtreg" location="${build.dir}/jtreg"/> |
|
84 |
<property name="build.prevsrc" location="${build.dir}/prevsrc"/> |
|
10 | 85 |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
86 |
<pathconvert property="modules.names" pathsep=","> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
87 |
<globmapper from="${src.dir}/*" to="*" /> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
88 |
<dirset dir="${src.dir}" includes="*.*"/> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
89 |
</pathconvert> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
90 |
|
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
91 |
<pathconvert property="xpatch.rest" pathsep=" -Xpatch:"> |
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
92 |
<regexpmapper from="${file.separator}([^${file.separator}]+)$" to='\1="${build.modules}${file.separator}\1"' /> |
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
93 |
<dirset dir="${src.dir}" includes="*.*"/> |
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
94 |
</pathconvert> |
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
95 |
|
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
96 |
<pathconvert property="xpatch.noquotes.rest" pathsep=" -Xpatch:"> |
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
97 |
<regexpmapper from="${file.separator}([^${file.separator}]+)$" to="\1=${build.modules}${file.separator}\1" /> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
98 |
<dirset dir="${src.dir}" includes="*.*"/> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
99 |
</pathconvert> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
100 |
|
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
101 |
<property name="xpatch.cmd" value="-Xpatch:${xpatch.rest}"/> |
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
102 |
<property name="xpatch.noquotes.cmd" value="-Xpatch:${xpatch.noquotes.rest}"/> |
25874 | 103 |
|
10 | 104 |
<!-- java.marker is set to a marker file to check for within a Java install dir. |
105 |
The best file to check for across Solaris/Linux/Windows/MacOS is one of the |
|
106 |
executables; regrettably, that is OS-specific. --> |
|
107 |
<condition property="java.marker" value="bin/java"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
108 |
<os family="unix"/> |
10 | 109 |
</condition> |
110 |
<condition property="java.marker" value="bin/java.exe"> |
|
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
111 |
<os family="windows"/> |
10 | 112 |
</condition> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
113 |
|
10 | 114 |
<!-- Standard property values, if not overriden by earlier settings. --> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
115 |
<property file="${make.dir}/build.properties"/> |
3654 | 116 |
|
36526 | 117 |
<condition property="langtools.jdk.home" value="${jdk.home}"> |
118 |
<isset property="jdk.home" /> |
|
3654 | 119 |
</condition> |
120 |
||
36526 | 121 |
<!-- launcher.java is used in the launcher scripts provided to run |
122 |
the tools' jar files. If it has not already been set, then |
|
123 |
default it to use ${langtools.jdk.home}, if available, otherwise |
|
124 |
quietly default to simply use "java". --> |
|
125 |
<condition property="launcher.java" |
|
126 |
value="${langtools.jdk.home}/bin/java" else="java"> |
|
127 |
<isset property="langtools.jdk.home"/> |
|
128 |
</condition> |
|
27546
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
129 |
|
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
130 |
<!-- |
36526 | 131 |
**** Check targets |
5845 | 132 |
--> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
133 |
|
10 | 134 |
<target name="-def-check"> |
36526 | 135 |
<macrodef name="check"> |
136 |
<attribute name="name"/> |
|
137 |
<attribute name="property"/> |
|
138 |
<attribute name="marker" default=""/> |
|
10 | 139 |
<sequential> |
140 |
<fail message="Cannot locate @{name}: please set @{property} to its location"> |
|
141 |
<condition> |
|
142 |
<not> |
|
143 |
<isset property="@{property}"/> |
|
144 |
</not> |
|
145 |
</condition> |
|
146 |
</fail> |
|
147 |
<fail message="@{name} is not installed in ${@{property}}"> |
|
148 |
<condition> |
|
5845 | 149 |
<and> |
150 |
<not> |
|
151 |
<equals arg1="@{marker}" arg2=""/> |
|
152 |
</not> |
|
5844 | 153 |
<not> |
154 |
<available file="${@{property}}/@{marker}"/> |
|
155 |
</not> |
|
5845 | 156 |
</and> |
10 | 157 |
</condition> |
158 |
</fail> |
|
159 |
</sequential> |
|
160 |
</macrodef> |
|
161 |
</target> |
|
162 |
||
36526 | 163 |
<target name="-check-langtools.jdk.home" depends="-def-check"> |
164 |
<check name="target java" property="langtools.jdk.home" marker="${java.marker}"/> |
|
165 |
</target> |
|
166 |
||
167 |
<target name="-check-jtreg.home" depends="-def-check"> |
|
168 |
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> |
|
169 |
</target> |
|
170 |
||
171 |
<!-- |
|
172 |
**** Primary targets |
|
173 |
--> |
|
174 |
||
175 |
<target name="clean" description="Delete all generated files"> |
|
176 |
<delete dir="${build.dir}"/> |
|
177 |
</target> |
|
178 |
||
179 |
<target name="build" depends="build-all-tools"/> |
|
180 |
||
181 |
<target name="-prepare-build" depends="-check-langtools.jdk.home"> |
|
182 |
<mkdir dir="${build.modules}"/> |
|
183 |
<mkdir dir="${build.tools}"/> |
|
184 |
<mkdir dir="${build.gensrc}"/> |
|
185 |
<mkdir dir="${build.bin}"/> |
|
186 |
<mkdir dir="${build.prevsrc}"/> |
|
187 |
</target> |
|
188 |
||
189 |
<target name="generate-sources-internal"> |
|
190 |
<basename property="module.name" file="${basedir}"/> |
|
191 |
<pparse destdir="${build.gensrc}/${module.name}" includes="${langtools.resource.includes}"> |
|
192 |
<src path="./share/classes"/> |
|
193 |
</pparse> |
|
194 |
<pcompile destdir="${build.gensrc}/${module.name}" includes="**/*.properties"> |
|
195 |
<src path="./share/classes"/> |
|
196 |
</pcompile> |
|
197 |
</target> |
|
198 |
||
199 |
<target name="generate-sources" depends="-prepare-build,-def-pparse,-def-pcompile"> |
|
200 |
<subant inheritall="true" target="generate-sources-internal" genericantfile="${make.dir}/build.xml"> |
|
201 |
<dirset dir="${src.dir}" includes="*.*"/> |
|
202 |
</subant> |
|
203 |
</target> |
|
204 |
||
205 |
<target name="build-all-classes" depends="generate-sources"> |
|
206 |
<exec executable="${langtools.jdk.home}/bin/javac" failonerror="true"> |
|
207 |
<arg line="-source ${javac.source} -target ${javac.target}" /> |
|
208 |
<arg value="-d" /> |
|
209 |
<arg value="${build.modules}" /> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
210 |
<arg line="${javac.opts} -modulesourcepath ${src.dir}${file.separator}*${file.separator}share${file.separator}classes:${build.gensrc} -m ${modules.names}" /> |
36526 | 211 |
</exec> |
212 |
<delete> |
|
213 |
<fileset dir="${build.modules}" includes="**/module-info.class"/> |
|
214 |
</delete> |
|
215 |
</target> |
|
216 |
||
217 |
<target name="build-all-tools" depends="build-all-classes, -def-build-tool"> |
|
218 |
<build-tool name="javac"/> |
|
219 |
<build-tool name="javadoc"/> |
|
220 |
<build-tool name="javap"/> |
|
221 |
<build-tool name="javah"/> |
|
222 |
<build-tool name="jdeps"/> |
|
223 |
<build-tool name="sjavac"/> |
|
224 |
<build-tool name="jshell"/> |
|
225 |
</target> |
|
226 |
||
227 |
<target name="jtreg" depends="build-all-tools,-def-jtreg"> |
|
228 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
|
229 |
</target> |
|
230 |
||
231 |
<!-- |
|
232 |
**** IDE support |
|
233 |
--> |
|
234 |
||
235 |
<target name="idea" depends="-check-langtools.jdk.home"> |
|
236 |
<mkdir dir=".idea"/> |
|
237 |
<copy todir=".idea" > |
|
39177
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
238 |
<fileset dir="make/intellij"> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
239 |
<exclude name="**/src/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
240 |
<exclude name="**/utils/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
241 |
</fileset> |
36526 | 242 |
</copy> |
243 |
<condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]"> |
|
244 |
<isset property="jtreg.home"/> |
|
245 |
</condition> |
|
246 |
<condition property="idea.target.jdk" value="${langtools.jdk.home}" else = "$JDKPath$"> |
|
247 |
<isset property="langtools.jdk.home"/> |
|
248 |
</condition> |
|
249 |
<replace file=".idea/ant.xml" token="@IDEA_TARGET_JDK@" value="${idea.target.jdk}"/> |
|
38522
c4fdb181cd64
8157326: Intellij langtools project should use shared run configurations
mcimadamore
parents:
38507
diff
changeset
|
250 |
<replace dir=".idea/runConfigurations" token="@IDEA_TARGET_JDK@" value="${idea.target.jdk}"/> |
c4fdb181cd64
8157326: Intellij langtools project should use shared run configurations
mcimadamore
parents:
38507
diff
changeset
|
251 |
<replace dir=".idea/runConfigurations" token="@XPATCH@" value="${xpatch.cmd}"/> |
40510
722c82994682
8164481: Remove jtreg run configurations from langtools idea project
mcimadamore
parents:
39177
diff
changeset
|
252 |
<replace file=".idea/misc.xml" token="@IDEA_JTREG_HOME@" value="${idea.jtreg.home}"/> |
722c82994682
8164481: Remove jtreg run configurations from langtools idea project
mcimadamore
parents:
39177
diff
changeset
|
253 |
<replace file=".idea/misc.xml" token="@IDEA_TARGET_JDK@" value="${idea.target.jdk}"/> |
722c82994682
8164481: Remove jtreg run configurations from langtools idea project
mcimadamore
parents:
39177
diff
changeset
|
254 |
<replace file=".idea/misc.xml" token="@XPATCH@" value="${xpatch.cmd}"/> |
36526 | 255 |
<mkdir dir=".idea/classes"/> |
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
256 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
257 |
target="${javac.build.target}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
258 |
srcdir="make/intellij/src" |
36526 | 259 |
destdir=".idea/classes"/> |
260 |
</target> |
|
261 |
||
262 |
<!-- |
|
263 |
**** Utility definitions |
|
264 |
--> |
|
265 |
||
266 |
<target name="-def-pparse"> |
|
267 |
<copy todir="${build.tools}/propertiesparser" > |
|
268 |
<fileset dir="${make.tools.dir}/propertiesparser" includes="**/resources/**"/> |
|
269 |
</copy> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
270 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
271 |
target="${javac.build.target}" |
36526 | 272 |
srcdir="${make.tools.dir}" |
273 |
includes="propertiesparser/* anttasks/PropertiesParser* anttasks/PathFileSet*" |
|
274 |
destdir="${build.tools}" |
|
275 |
classpath="${ant.core.lib}" |
|
276 |
bootclasspath="${langtools.jdk.home}/jre/lib/rt.jar" |
|
277 |
includeantruntime="false"> |
|
278 |
<compilerarg line="${javac.opts} -XDstringConcat=inline"/> |
|
279 |
</javac> |
|
280 |
<taskdef name="pparse" |
|
281 |
classname="anttasks.PropertiesParserTask" |
|
282 |
classpath="${build.tools}"/> |
|
283 |
</target> |
|
284 |
||
285 |
<target name="-def-pcompile"> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
286 |
<javac |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
287 |
source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
288 |
target="${javac.build.target}" |
36526 | 289 |
srcdir="${make.tools.dir}" |
290 |
includes="compileproperties/* anttasks/CompileProperties* anttasks/PathFileSet*" |
|
291 |
destdir="${build.dir}/toolclasses/" |
|
292 |
classpath="${ant.core.lib}" |
|
293 |
includeantruntime="false"> |
|
294 |
<compilerarg line="${javac.opts} -XDstringConcat=inline"/> |
|
295 |
</javac> |
|
296 |
<taskdef name="pcompile" |
|
297 |
classname="anttasks.CompilePropertiesTask" |
|
298 |
classpath="${build.tools}"/> |
|
299 |
</target> |
|
300 |
||
301 |
<target name="-def-build-tool"> |
|
302 |
<macrodef name="build-tool"> |
|
303 |
<attribute name="name"/> |
|
304 |
<attribute name="compilation.kind" default=""/> |
|
305 |
<attribute name="bin.dir" default="${build.bin}"/> |
|
306 |
<attribute name="java" default="${launcher.java}"/> |
|
307 |
<attribute name="main.class" default="${tool.@{name}.main.class}"/> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
308 |
<attribute name="xpatch" default="${xpatch.cmd}"/> |
36526 | 309 |
<sequential> |
310 |
<mkdir dir="@{bin.dir}"/> |
|
311 |
<copy file="${make.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}"> |
|
312 |
<filterset begintoken="#" endtoken="#"> |
|
313 |
<filter token="PROGRAM" value="@{main.class}"/> |
|
314 |
<filter token="TARGET_JAVA" value="@{java}"/> |
|
315 |
<filter token="PS" value="${path.separator}"/> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
316 |
<filter token="XPATCH" value="${xpatch.cmd}"/> |
36526 | 317 |
</filterset> |
318 |
</copy> |
|
319 |
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/> |
|
320 |
</sequential> |
|
321 |
</macrodef> |
|
322 |
</target> |
|
323 |
||
324 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-langtools.jdk.home"> |
|
325 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
|
326 |
<classpath> |
|
327 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
|
328 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
|
329 |
</classpath> |
|
330 |
</taskdef> |
|
331 |
<macrodef name="jtreg-tool"> |
|
332 |
<attribute name="name"/> |
|
333 |
<attribute name="tests"/> |
|
334 |
<attribute name="jdk" default="${langtools.jdk.home}"/> |
|
335 |
<attribute name="agentvm" default="true"/> |
|
336 |
<attribute name="verbose" default="${default.jtreg.verbose}"/> |
|
337 |
<attribute name="options" default="${other.jtreg.options}"/> |
|
338 |
<attribute name="keywords" default="-keywords:!ignore"/> |
|
339 |
<attribute name="jpda.jvmargs" default=""/> |
|
340 |
<attribute name="extra.jvmargs" default=""/> |
|
341 |
<attribute name="build.modules" default="${build.modules}"/> |
|
342 |
<sequential> |
|
343 |
<property name="coverage.options" value=""/> <!-- default --> |
|
344 |
<property name="coverage.classpath" value=""/> <!-- default --> |
|
345 |
<property name="default.jtreg.verbose" value="summary"/> <!-- default --> |
|
346 |
<property name="other.jtreg.options" value=""/> <!-- default --> |
|
347 |
<property name="jtreg.classfiles.to.modules" value="@{agentvm}"/> |
|
348 |
<jtreg |
|
349 |
dir="${test.dir}" |
|
350 |
workDir="${build.jtreg}/@{name}/work" |
|
351 |
reportDir="${build.jtreg}/@{name}/report" |
|
352 |
jdk="@{jdk}" |
|
353 |
agentvm="@{agentvm}" verbose="@{verbose}" |
|
354 |
failonerror="false" resultproperty="jtreg.@{name}.result" |
|
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
355 |
vmoptions="${coverage.options} @{extra.jvmargs} ${xpatch.noquotes.cmd}"> |
36526 | 356 |
<arg value="-debug:@{jpda.jvmargs}"/> |
357 |
<arg line="@{keywords}"/> |
|
358 |
<arg line="@{options}"/> |
|
359 |
<arg line="@{tests}"/> |
|
360 |
</jtreg> |
|
361 |
<!-- the next two properties are for convenience, when only |
|
362 |
a single instance of jtreg will be invoked. --> |
|
363 |
<condition property="jtreg.passed"> |
|
364 |
<equals arg1="${jtreg.@{name}.result}" arg2="0"/> |
|
365 |
</condition> |
|
366 |
<property name="jtreg.report" value="${build.jtreg}/@{name}/report"/> |
|
367 |
</sequential> |
|
368 |
</macrodef> |
|
369 |
<property name="jtreg.defined" value="true"/> |
|
370 |
</target> |
|
10 | 371 |
</project> |