author | duke |
Wed, 05 Jul 2017 22:07:34 +0200 | |
changeset 40519 | e17429a7e843 |
parent 37976 | 9cc5debe0f47 |
child 47217 | 72e3ae9a25eb |
permissions | -rw-r--r-- |
37861 | 1 |
<!-- importing.xml --> |
2 |
<project name="jdk" basedir=".."> |
|
3 |
||
4 |
<script language="javascript" classpath=".idea/classes"> |
|
5 |
var JdkLogger = Java.type("idea.JdkIdeaAntLogger"); |
|
6 |
new JdkLogger(project) |
|
7 |
</script> |
|
8 |
||
9 |
<!-- java.marker is set to a marker file to check for within a Java install dir. |
|
10 |
The best file to check for across Solaris/Linux/Windows/MacOS is one of the |
|
11 |
executables; regrettably, that is OS-specific. --> |
|
12 |
<condition property="java.marker" value="bin/java"> |
|
13 |
<os family="unix"/> |
|
14 |
</condition> |
|
15 |
<condition property="java.marker" value="bin/java.exe"> |
|
16 |
<os family="windows"/> |
|
17 |
</condition> |
|
18 |
||
37976
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
19 |
<target name="-check-jtreg.home" depends="-def-check"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
20 |
<check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
21 |
</target> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
22 |
|
37861 | 23 |
<property name="test.dir" value="${basedir}/jdk/test"/> |
24 |
||
25 |
<macrodef name="call-make"> |
|
26 |
<attribute name="dir"/> |
|
27 |
<attribute name="args"/> |
|
28 |
<sequential> |
|
29 |
<exec executable="make" dir="@{dir}" failonerror="true"> |
|
30 |
<arg line="@{args}"/> |
|
31 |
<env key="CLASSPATH" value = ""/> |
|
32 |
</exec> |
|
33 |
</sequential> |
|
34 |
</macrodef> |
|
35 |
||
36 |
<target name="post-make" depends="build-module"/> |
|
37 |
||
38 |
<!-- |
|
39 |
**** Global JDK Build Targets |
|
40 |
--> |
|
41 |
||
42 |
<target name="clean" depends="-do-configure"> |
|
43 |
<echo message="base = ${basedir}"/> |
|
44 |
<call-make dir = "${build.target.dir}" args = "clean"/> |
|
45 |
</target> |
|
37976
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
46 |
|
37861 | 47 |
<target name="-do-configure"> |
48 |
<echo message="base = ${basedir}"/> |
|
49 |
<fail message="Not part of a full JDK forest"> |
|
50 |
<condition> |
|
51 |
<not> |
|
52 |
<available file="${basedir}/configure" /> |
|
53 |
</not> |
|
54 |
</condition> |
|
55 |
</fail> |
|
56 |
<exec executable="sh" dir="${basedir}" failonerror="true"> |
|
57 |
<arg line="configure --with-boot-jdk=${boot.java.home}"/> |
|
58 |
</exec> |
|
59 |
</target> |
|
60 |
||
61 |
<target name="images"> |
|
62 |
<call-make dir = "${build.target.dir}" args = "images"/> |
|
63 |
</target> |
|
64 |
||
65 |
<target name="jimages"> |
|
66 |
<call-make dir = "${build.target.dir}" args = "jimages"/> |
|
67 |
</target> |
|
68 |
||
69 |
<target name="check-env"> |
|
70 |
<exec executable="env" dir="${basedir}"/> |
|
71 |
</target> |
|
72 |
||
73 |
<target name="build-module"> |
|
74 |
<call-make dir = "${build.target.dir}" args = "${module.name}"/> |
|
75 |
</target> |
|
76 |
||
77 |
<target name="-check-boot.java.home" depends="-def-check"> |
|
78 |
<check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/> |
|
79 |
</target> |
|
80 |
||
81 |
<target name="-def-check"> |
|
82 |
<macrodef name="check"> |
|
83 |
<attribute name="name"/> |
|
84 |
<attribute name="property"/> |
|
85 |
<attribute name="marker" default=""/> |
|
86 |
<sequential> |
|
87 |
<fail message="Cannot locate @{name}: please set @{property} to its location"> |
|
88 |
<condition> |
|
89 |
<not> |
|
90 |
<isset property="@{property}"/> |
|
91 |
</not> |
|
92 |
</condition> |
|
93 |
</fail> |
|
94 |
<fail message="@{name} is not installed in ${@{property}}"> |
|
95 |
<condition> |
|
96 |
<and> |
|
97 |
<not> |
|
98 |
<equals arg1="@{marker}" arg2=""/> |
|
99 |
</not> |
|
100 |
<not> |
|
101 |
<available file="${@{property}}/@{marker}"/> |
|
102 |
</not> |
|
103 |
</and> |
|
104 |
</condition> |
|
105 |
</fail> |
|
106 |
</sequential> |
|
107 |
</macrodef> |
|
108 |
</target> |
|
37976
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
109 |
|
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
110 |
<macrodef name="exec-target"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
111 |
<attribute name="antfile" default="${ant.file}" /> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
112 |
<attribute name="target" /> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
113 |
<sequential> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
114 |
<java classname="org.apache.tools.ant.Main" fork="true" spawn="true"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
115 |
<arg value="-f"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
116 |
<arg value="@{antfile}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
117 |
<arg value="-Dbuild.target.dir=${build.target.dir}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
118 |
<arg value="-Djtreg.home=${jtreg.home}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
119 |
<arg value="-Djtreg.tests=${jtreg.tests}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
120 |
<arg value="-Djtreg.jpda.jvmargs=${jtreg.jpda.jvmargs}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
121 |
<arg value="@{target}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
122 |
<classpath> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
123 |
<pathelement path="${java.class.path}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
124 |
</classpath> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
125 |
</java> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
126 |
</sequential> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
127 |
</macrodef> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
128 |
|
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
129 |
<target name="jtreg" depends="images,-def-jtreg"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
130 |
<jtreg-tool name="all" tests="${jtreg.tests}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
131 |
</target> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
132 |
|
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
133 |
<target name="-def-jtreg" unless="jtreg.defined" depends="-check-jtreg.home"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
134 |
<taskdef name="jtreg" classname="com.sun.javatest.regtest.Main$$Ant"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
135 |
<classpath> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
136 |
<pathelement location="${jtreg.home}/lib/jtreg.jar"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
137 |
<pathelement location="${jtreg.home}/lib/javatest.jar"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
138 |
</classpath> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
139 |
</taskdef> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
140 |
<macrodef name="jtreg-tool"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
141 |
<attribute name="name"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
142 |
<attribute name="tests"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
143 |
<attribute name="jdk" default="${build.target.dir}/images/jdk"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
144 |
<attribute name="agentvm" default="true"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
145 |
<attribute name="verbose" default="${default.jtreg.verbose}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
146 |
<attribute name="options" default="${other.jtreg.options}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
147 |
<attribute name="keywords" default="-keywords:!ignore"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
148 |
<attribute name="jpda.jvmargs" default=""/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
149 |
<attribute name="extra.jvmargs" default=""/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
150 |
<attribute name="build.modules" default="${build.modules}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
151 |
<sequential> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
152 |
<property name="coverage.options" value=""/> <!-- default --> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
153 |
<property name="coverage.classpath" value=""/> <!-- default --> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
154 |
<property name="default.jtreg.verbose" value="summary"/> <!-- default --> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
155 |
<property name="other.jtreg.options" value=""/> <!-- default --> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
156 |
<property name="jtreg.classfiles.to.modules" value="@{agentvm}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
157 |
<jtreg |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
158 |
dir="${test.dir}" |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
159 |
workDir="${build.target.dir}/idea/@{name}/work" |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
160 |
reportDir="${build.target.dir}/idea/@{name}/report" |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
161 |
jdk="@{jdk}" |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
162 |
agentvm="@{agentvm}" verbose="@{verbose}" |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
163 |
failonerror="false" resultproperty="jtreg.@{name}.result"> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
164 |
<arg value="-debug:@{jpda.jvmargs}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
165 |
<arg line="@{keywords}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
166 |
<arg line="@{options}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
167 |
<arg line="@{tests}"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
168 |
</jtreg> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
169 |
</sequential> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
170 |
</macrodef> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
171 |
<property name="jtreg.defined" value="true"/> |
9cc5debe0f47
8157061: Add support for running jtreg tests from IntelliJ project
mcimadamore
parents:
37861
diff
changeset
|
172 |
</target> |
37861 | 173 |
</project> |