author | jwilhelm |
Fri, 13 Jan 2017 18:26:34 +0100 | |
changeset 43447 | c1a7412d597d |
parent 41936 | 94139f291be4 |
child 44461 | 8e5061e5b34b |
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=","> |
41936 | 87 |
<globmapper from="${src.dir}/*" to="*" handledirsep="yes"/> |
37851
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 |
|
40599
be40838eb215
8164887: update tests to remove use of old-style options
jjg
parents:
40510
diff
changeset
|
91 |
<pathconvert property="xpatch.rest" pathsep=" --patch-module="> |
41936 | 92 |
<regexpmapper from="/([^$/]+)$" |
93 |
to='\1="${build.modules}/\1"' |
|
94 |
handledirsep="yes"/> |
|
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
95 |
<dirset dir="${src.dir}" includes="*.*"/> |
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
96 |
</pathconvert> |
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
97 |
|
40599
be40838eb215
8164887: update tests to remove use of old-style options
jjg
parents:
40510
diff
changeset
|
98 |
<pathconvert property="xpatch.noquotes.rest" pathsep=" --patch-module="> |
41936 | 99 |
<regexpmapper from="/([^$/]+)$" |
100 |
to="\1=${build.modules}/\1" |
|
101 |
handledirsep="yes"/> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
102 |
<dirset dir="${src.dir}" includes="*.*"/> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
103 |
</pathconvert> |
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
104 |
|
40599
be40838eb215
8164887: update tests to remove use of old-style options
jjg
parents:
40510
diff
changeset
|
105 |
<property name="xpatch.cmd" value="--patch-module=${xpatch.rest}"/> |
be40838eb215
8164887: update tests to remove use of old-style options
jjg
parents:
40510
diff
changeset
|
106 |
<property name="xpatch.noquotes.cmd" value="--patch-module=${xpatch.noquotes.rest}"/> |
25874 | 107 |
|
10 | 108 |
<!-- java.marker is set to a marker file to check for within a Java install dir. |
109 |
The best file to check for across Solaris/Linux/Windows/MacOS is one of the |
|
110 |
executables; regrettably, that is OS-specific. --> |
|
111 |
<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
|
112 |
<os family="unix"/> |
10 | 113 |
</condition> |
114 |
<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
|
115 |
<os family="windows"/> |
10 | 116 |
</condition> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
117 |
|
10 | 118 |
<!-- 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
|
119 |
<property file="${make.dir}/build.properties"/> |
3654 | 120 |
|
36526 | 121 |
<condition property="langtools.jdk.home" value="${jdk.home}"> |
122 |
<isset property="jdk.home" /> |
|
3654 | 123 |
</condition> |
124 |
||
36526 | 125 |
<!-- launcher.java is used in the launcher scripts provided to run |
126 |
the tools' jar files. If it has not already been set, then |
|
127 |
default it to use ${langtools.jdk.home}, if available, otherwise |
|
128 |
quietly default to simply use "java". --> |
|
129 |
<condition property="launcher.java" |
|
130 |
value="${langtools.jdk.home}/bin/java" else="java"> |
|
131 |
<isset property="langtools.jdk.home"/> |
|
132 |
</condition> |
|
27546
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
133 |
|
79b6b60ff60a
8058489: More adjustments of langtools/make/build.xml to modularized layout
jlahoda
parents:
26268
diff
changeset
|
134 |
<!-- |
36526 | 135 |
**** Check targets |
5845 | 136 |
--> |
3655
f9ee66e780f4
6758471: should be able to set jtreg options in langtools build
jjg
parents:
3654
diff
changeset
|
137 |
|
10 | 138 |
<target name="-def-check"> |
36526 | 139 |
<macrodef name="check"> |
140 |
<attribute name="name"/> |
|
141 |
<attribute name="property"/> |
|
142 |
<attribute name="marker" default=""/> |
|
10 | 143 |
<sequential> |
144 |
<fail message="Cannot locate @{name}: please set @{property} to its location"> |
|
145 |
<condition> |
|
146 |
<not> |
|
147 |
<isset property="@{property}"/> |
|
148 |
</not> |
|
149 |
</condition> |
|
150 |
</fail> |
|
151 |
<fail message="@{name} is not installed in ${@{property}}"> |
|
152 |
<condition> |
|
5845 | 153 |
<and> |
154 |
<not> |
|
155 |
<equals arg1="@{marker}" arg2=""/> |
|
156 |
</not> |
|
5844 | 157 |
<not> |
158 |
<available file="${@{property}}/@{marker}"/> |
|
159 |
</not> |
|
5845 | 160 |
</and> |
10 | 161 |
</condition> |
162 |
</fail> |
|
163 |
</sequential> |
|
164 |
</macrodef> |
|
165 |
</target> |
|
166 |
||
36526 | 167 |
<target name="-check-langtools.jdk.home" depends="-def-check"> |
168 |
<check name="target java" property="langtools.jdk.home" marker="${java.marker}"/> |
|
169 |
</target> |
|
170 |
||
171 |
<target name="-check-jtreg.home" depends="-def-check"> |
|
172 |
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> |
|
173 |
</target> |
|
174 |
||
175 |
<!-- |
|
176 |
**** Primary targets |
|
177 |
--> |
|
178 |
||
179 |
<target name="clean" description="Delete all generated files"> |
|
180 |
<delete dir="${build.dir}"/> |
|
181 |
</target> |
|
182 |
||
183 |
<target name="build" depends="build-all-tools"/> |
|
184 |
||
185 |
<target name="-prepare-build" depends="-check-langtools.jdk.home"> |
|
186 |
<mkdir dir="${build.modules}"/> |
|
187 |
<mkdir dir="${build.tools}"/> |
|
188 |
<mkdir dir="${build.gensrc}"/> |
|
189 |
<mkdir dir="${build.bin}"/> |
|
190 |
<mkdir dir="${build.prevsrc}"/> |
|
191 |
</target> |
|
192 |
||
193 |
<target name="generate-sources-internal"> |
|
194 |
<basename property="module.name" file="${basedir}"/> |
|
195 |
<pparse destdir="${build.gensrc}/${module.name}" includes="${langtools.resource.includes}"> |
|
196 |
<src path="./share/classes"/> |
|
197 |
</pparse> |
|
198 |
<pcompile destdir="${build.gensrc}/${module.name}" includes="**/*.properties"> |
|
199 |
<src path="./share/classes"/> |
|
200 |
</pcompile> |
|
201 |
</target> |
|
202 |
||
203 |
<target name="generate-sources" depends="-prepare-build,-def-pparse,-def-pcompile"> |
|
204 |
<subant inheritall="true" target="generate-sources-internal" genericantfile="${make.dir}/build.xml"> |
|
205 |
<dirset dir="${src.dir}" includes="*.*"/> |
|
206 |
</subant> |
|
207 |
</target> |
|
208 |
||
209 |
<target name="build-all-classes" depends="generate-sources"> |
|
210 |
<exec executable="${langtools.jdk.home}/bin/javac" failonerror="true"> |
|
211 |
<arg line="-source ${javac.source} -target ${javac.target}" /> |
|
212 |
<arg value="-d" /> |
|
213 |
<arg value="${build.modules}" /> |
|
41936 | 214 |
<arg line="${javac.opts}" /> |
215 |
<arg line="--module-source-path ${src.dir}${file.separator}*${file.separator}share${file.separator}classes${path.separator}${build.gensrc}" /> |
|
216 |
<arg line="-m ${modules.names}" /> |
|
36526 | 217 |
</exec> |
218 |
<delete> |
|
219 |
<fileset dir="${build.modules}" includes="**/module-info.class"/> |
|
220 |
</delete> |
|
221 |
</target> |
|
222 |
||
223 |
<target name="build-all-tools" depends="build-all-classes, -def-build-tool"> |
|
224 |
<build-tool name="javac"/> |
|
225 |
<build-tool name="javadoc"/> |
|
226 |
<build-tool name="javap"/> |
|
227 |
<build-tool name="javah"/> |
|
228 |
<build-tool name="jdeps"/> |
|
229 |
<build-tool name="sjavac"/> |
|
230 |
<build-tool name="jshell"/> |
|
231 |
</target> |
|
232 |
||
233 |
<target name="jtreg" depends="build-all-tools,-def-jtreg"> |
|
234 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
|
235 |
</target> |
|
236 |
||
237 |
<!-- |
|
238 |
**** IDE support |
|
239 |
--> |
|
240 |
||
241 |
<target name="idea" depends="-check-langtools.jdk.home"> |
|
242 |
<mkdir dir=".idea"/> |
|
243 |
<copy todir=".idea" > |
|
39177
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
244 |
<fileset dir="make/intellij"> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
245 |
<exclude name="**/src/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
246 |
<exclude name="**/utils/**"/> |
9d13e7c2d65e
8159834: Add some support for jtreg test headers in IntelliJ langtools project
mcimadamore
parents:
38609
diff
changeset
|
247 |
</fileset> |
36526 | 248 |
</copy> |
249 |
<condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]"> |
|
250 |
<isset property="jtreg.home"/> |
|
251 |
</condition> |
|
252 |
<condition property="idea.target.jdk" value="${langtools.jdk.home}" else = "$JDKPath$"> |
|
253 |
<isset property="langtools.jdk.home"/> |
|
254 |
</condition> |
|
255 |
<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
|
256 |
<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
|
257 |
<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
|
258 |
<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
|
259 |
<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
|
260 |
<replace file=".idea/misc.xml" token="@XPATCH@" value="${xpatch.cmd}"/> |
36526 | 261 |
<mkdir dir=".idea/classes"/> |
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
262 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
263 |
target="${javac.build.target}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
264 |
srcdir="make/intellij/src" |
36526 | 265 |
destdir=".idea/classes"/> |
266 |
</target> |
|
267 |
||
268 |
<!-- |
|
269 |
**** Utility definitions |
|
270 |
--> |
|
271 |
||
272 |
<target name="-def-pparse"> |
|
273 |
<copy todir="${build.tools}/propertiesparser" > |
|
274 |
<fileset dir="${make.tools.dir}/propertiesparser" includes="**/resources/**"/> |
|
275 |
</copy> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
276 |
<javac source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
277 |
target="${javac.build.target}" |
36526 | 278 |
srcdir="${make.tools.dir}" |
279 |
includes="propertiesparser/* anttasks/PropertiesParser* anttasks/PathFileSet*" |
|
280 |
destdir="${build.tools}" |
|
281 |
classpath="${ant.core.lib}" |
|
282 |
bootclasspath="${langtools.jdk.home}/jre/lib/rt.jar" |
|
283 |
includeantruntime="false"> |
|
41519
612f31a9b42b
8167442: Langtools ant build not working after addition of -Xlint:exports
jlahoda
parents:
40599
diff
changeset
|
284 |
<compilerarg line="${javac.build.opts} -XDstringConcat=inline"/> |
36526 | 285 |
</javac> |
286 |
<taskdef name="pparse" |
|
287 |
classname="anttasks.PropertiesParserTask" |
|
288 |
classpath="${build.tools}"/> |
|
289 |
</target> |
|
290 |
||
291 |
<target name="-def-pcompile"> |
|
38507
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
292 |
<javac |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
293 |
source="${javac.build.source}" |
d48ba9db4b7d
8157030: langtools dev build broken after classfile version bump
mcimadamore
parents:
37851
diff
changeset
|
294 |
target="${javac.build.target}" |
36526 | 295 |
srcdir="${make.tools.dir}" |
296 |
includes="compileproperties/* anttasks/CompileProperties* anttasks/PathFileSet*" |
|
297 |
destdir="${build.dir}/toolclasses/" |
|
298 |
classpath="${ant.core.lib}" |
|
299 |
includeantruntime="false"> |
|
41519
612f31a9b42b
8167442: Langtools ant build not working after addition of -Xlint:exports
jlahoda
parents:
40599
diff
changeset
|
300 |
<compilerarg line="${javac.build.opts} -XDstringConcat=inline"/> |
36526 | 301 |
</javac> |
302 |
<taskdef name="pcompile" |
|
303 |
classname="anttasks.CompilePropertiesTask" |
|
304 |
classpath="${build.tools}"/> |
|
305 |
</target> |
|
306 |
||
307 |
<target name="-def-build-tool"> |
|
308 |
<macrodef name="build-tool"> |
|
309 |
<attribute name="name"/> |
|
310 |
<attribute name="compilation.kind" default=""/> |
|
311 |
<attribute name="bin.dir" default="${build.bin}"/> |
|
312 |
<attribute name="java" default="${launcher.java}"/> |
|
313 |
<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
|
314 |
<attribute name="xpatch" default="${xpatch.cmd}"/> |
36526 | 315 |
<sequential> |
316 |
<mkdir dir="@{bin.dir}"/> |
|
317 |
<copy file="${make.dir}/launcher.sh-template" tofile="@{bin.dir}/@{name}"> |
|
318 |
<filterset begintoken="#" endtoken="#"> |
|
319 |
<filter token="PROGRAM" value="@{main.class}"/> |
|
320 |
<filter token="TARGET_JAVA" value="@{java}"/> |
|
321 |
<filter token="PS" value="${path.separator}"/> |
|
37851
f2820cadfa38
8155959: Langtools ant build should support new Xpatch option format
mcimadamore
parents:
36526
diff
changeset
|
322 |
<filter token="XPATCH" value="${xpatch.cmd}"/> |
36526 | 323 |
</filterset> |
324 |
</copy> |
|
325 |
<chmod file="@{bin.dir}/@{name}" perm="ugo+rx"/> |
|
326 |
</sequential> |
|
327 |
</macrodef> |
|
328 |
</target> |
|
329 |
||
330 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home,-check-langtools.jdk.home"> |
|
331 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
|
332 |
<classpath> |
|
333 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
|
334 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
|
335 |
</classpath> |
|
336 |
</taskdef> |
|
337 |
<macrodef name="jtreg-tool"> |
|
338 |
<attribute name="name"/> |
|
339 |
<attribute name="tests"/> |
|
340 |
<attribute name="jdk" default="${langtools.jdk.home}"/> |
|
341 |
<attribute name="agentvm" default="true"/> |
|
342 |
<attribute name="verbose" default="${default.jtreg.verbose}"/> |
|
343 |
<attribute name="options" default="${other.jtreg.options}"/> |
|
344 |
<attribute name="keywords" default="-keywords:!ignore"/> |
|
345 |
<attribute name="jpda.jvmargs" default=""/> |
|
346 |
<attribute name="extra.jvmargs" default=""/> |
|
347 |
<attribute name="build.modules" default="${build.modules}"/> |
|
348 |
<sequential> |
|
349 |
<property name="coverage.options" value=""/> <!-- default --> |
|
350 |
<property name="coverage.classpath" value=""/> <!-- default --> |
|
351 |
<property name="default.jtreg.verbose" value="summary"/> <!-- default --> |
|
352 |
<property name="other.jtreg.options" value=""/> <!-- default --> |
|
353 |
<property name="jtreg.classfiles.to.modules" value="@{agentvm}"/> |
|
354 |
<jtreg |
|
355 |
dir="${test.dir}" |
|
356 |
workDir="${build.jtreg}/@{name}/work" |
|
357 |
reportDir="${build.jtreg}/@{name}/report" |
|
358 |
jdk="@{jdk}" |
|
359 |
agentvm="@{agentvm}" verbose="@{verbose}" |
|
360 |
failonerror="false" resultproperty="jtreg.@{name}.result" |
|
38609
a1c0c73078b3
8157895: langtools launcher.sh-template script is broken
mcimadamore
parents:
38522
diff
changeset
|
361 |
vmoptions="${coverage.options} @{extra.jvmargs} ${xpatch.noquotes.cmd}"> |
36526 | 362 |
<arg value="-debug:@{jpda.jvmargs}"/> |
363 |
<arg line="@{keywords}"/> |
|
364 |
<arg line="@{options}"/> |
|
365 |
<arg line="@{tests}"/> |
|
366 |
</jtreg> |
|
367 |
<!-- the next two properties are for convenience, when only |
|
368 |
a single instance of jtreg will be invoked. --> |
|
369 |
<condition property="jtreg.passed"> |
|
370 |
<equals arg1="${jtreg.@{name}.result}" arg2="0"/> |
|
371 |
</condition> |
|
372 |
<property name="jtreg.report" value="${build.jtreg}/@{name}/report"/> |
|
373 |
</sequential> |
|
374 |
</macrodef> |
|
375 |
<property name="jtreg.defined" value="true"/> |
|
376 |
</target> |
|
10 | 377 |
</project> |