Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/OpenJ9_Jsr_292_API/build.xml
6000 views
1
<?xml version="1.0"?>
2
<!--
3
Copyright (c) 2017, 2021 IBM Corp. and others
4
5
This program and the accompanying materials are made available under
6
the terms of the Eclipse Public License 2.0 which accompanies this
7
distribution and is available at https://www.eclipse.org/legal/epl-2.0/
8
or the Apache License, Version 2.0 which accompanies this distribution and
9
is available at https://www.apache.org/licenses/LICENSE-2.0.
10
11
This Source Code may also be made available under the following
12
Secondary Licenses when the conditions for such availability set
13
forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
14
General Public License, version 2 with the GNU Classpath
15
Exception [1] and GNU General Public License, version 2 with the
16
OpenJDK Assembly Exception [2].
17
18
[1] https://www.gnu.org/software/classpath/license.html
19
[2] http://openjdk.java.net/legal/assembly-exception.html
20
21
SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
22
-->
23
<project name="OpenJ9 JSR 292 API Tests" default="build" basedir=".">
24
<taskdef resource='net/sf/antcontrib/antlib.xml'/>
25
<description>
26
Build OpenJ9 JSR 292 API Tests
27
</description>
28
29
<!-- set global properties for this build -->
30
<property name="DEST" value="${BUILD_ROOT}/functional/OpenJ9_Jsr_292_API" />
31
32
<!--Properties for this particular build-->
33
<property name="src" location="./src"/>
34
<property name="build" location="./bin"/>
35
<property name="transformerListener" location="${TEST_ROOT}/Utils/src"/>
36
37
<property name="mods_name" value="mods"/>
38
<property name="modulea_name" value="mods.modulea"/>
39
<property name="moduleb_name" value="mods.moduleb"/>
40
<property name="modulec_name" value="mods.modulec"/>
41
42
<property name="modulea_src" location="./modules/mods.modulea"/>
43
<property name="moduleb_src" location="./modules/mods.moduleb"/>
44
<property name="modulec_src" location="./modules/mods.modulec"/>
45
46
<property name="mods_dir" location="./mods"/>
47
<property name="modulea_bin" location="./mods/mods.modulea"/>
48
<property name="moduleb_bin" location="./mods/mods.moduleb"/>
49
<property name="modulec_bin" location="./mods/mods.modulec"/>
50
<property name="LIB" value="asm_all,jcommander,testng"/>
51
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/>
52
53
<target name="init">
54
<mkdir dir="${DEST}"/>
55
<mkdir dir="${build}"/>
56
<mkdir dir="${mods_dir}"/>
57
<mkdir dir="${modulea_bin}"/>
58
<mkdir dir="${moduleb_bin}"/>
59
<mkdir dir="${modulec_bin}"/>
60
</target>
61
62
<target name="compile_modulec" depends="init" description="Compile the module files in mods.modulec">
63
<echo>Compiling the module files in mods.modulec</echo>
64
<echo>Ant version is ${ant.version}</echo>
65
<property name="compiler.javac" value="${TEST_JDK_HOME}/bin/javac" />
66
<echo>============COMPILER SETTINGS============</echo>
67
<echo>===fork: yes</echo>
68
<echo>===executable: ${compiler.javac}</echo>
69
<echo>===debug: on</echo>
70
<echo>===destdir: ${DEST}</echo>
71
<if>
72
<not>
73
<equals arg1="${JDK_VERSION}" arg2="8"/>
74
</not>
75
<then>
76
<property name="modulec_path" value="--module-path ${mods_dir} -d ${modulec_bin}" />
77
<javac srcdir="${modulec_src}" destdir="${modulec_bin}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
78
<src path="${modulec_src}"/>
79
<compilerarg line='${modulec_path}' />
80
</javac>
81
</then>
82
</if>
83
</target>
84
85
<target name="compile_moduleb" depends="init" description="Compile the module files in mods.moduleb">
86
<echo>Compiling the module files in mods.moduleb</echo>
87
<echo>Ant version is ${ant.version}</echo>
88
<property name="compiler.javac" value="${TEST_JDK_HOME}/bin/javac" />
89
<echo>============COMPILER SETTINGS============</echo>
90
<echo>===fork: yes</echo>
91
<echo>===executable: ${compiler.javac}</echo>
92
<echo>===debug: on</echo>
93
<echo>===destdir: ${DEST}</echo>
94
<if>
95
<not>
96
<equals arg1="${JDK_VERSION}" arg2="8"/>
97
</not>
98
<then>
99
<property name="moduleb_path" value="--module-path ${mods_dir} -d ${moduleb_bin}" />
100
<javac srcdir="${moduleb_src}" destdir="${moduleb_bin}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
101
<src path="${moduleb_src}"/>
102
<compilerarg line='${moduleb_path}' />
103
</javac>
104
</then>
105
</if>
106
</target>
107
108
<target name="compile_modulea" depends="init,compile_moduleb,compile_modulec" description="Compile the module files in mods.modulea">
109
<echo>Compiling the module files in mods.modulea</echo>
110
<echo>Ant version is ${ant.version}</echo>
111
<property name="compiler.javac" value="${TEST_JDK_HOME}/bin/javac" />
112
<echo>============COMPILER SETTINGS============</echo>
113
<echo>===fork: yes</echo>
114
<echo>===executable: ${compiler.javac}</echo>
115
<echo>===debug: on</echo>
116
<echo>===destdir: ${DEST}</echo>
117
<if>
118
<not>
119
<equals arg1="${JDK_VERSION}" arg2="8"/>
120
</not>
121
<then>
122
<property name="modulea_path" value="--module-path ${mods_dir} -d ${modulea_bin}" />
123
<javac srcdir="${modulea_src}" destdir="${modulea_bin}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
124
<src path="${modulea_src}"/>
125
<compilerarg line='${modulea_path}' />
126
</javac>
127
</then>
128
</if>
129
</target>
130
131
<target name="compile_tests" depends="init,compile_modulea,compile_moduleb,compile_modulec,getDependentLibs" description="compile the test source code" >
132
<echo>Compiling the test source code</echo>
133
<echo>Ant version is ${ant.version}</echo>
134
<echo>============COMPILER SETTINGS============</echo>
135
<echo>===fork: yes</echo>
136
<echo>===executable: ${compiler.javac}</echo>
137
<echo>===debug: on</echo>
138
<echo>===destdir: ${DEST}</echo>
139
<if>
140
<not>
141
<equals arg1="${JDK_VERSION}" arg2="8"/>
142
</not>
143
<then>
144
<property name="addModules" value="--add-modules ${modulea_name},${moduleb_name},${modulec_name} --module-path ${mods_dir}" />
145
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
146
<src path="${src}"/>
147
<src path="${transformerListener}" />
148
<compilerarg line='${addModules}' />
149
<classpath>
150
<pathelement location="${LIB_DIR}/asm-all.jar" />
151
<pathelement location="${LIB_DIR}/testng.jar"/>
152
<pathelement location="${LIB_DIR}/jcommander.jar"/>
153
</classpath>
154
</javac>
155
</then>
156
</if>
157
</target>
158
159
<target name="DEST" depends="compile_tests" description="generate the distribution" >
160
<copy todir="${DEST}">
161
<fileset dir="${src}/../" includes="*.mk,*.xml" />
162
</copy>
163
<copy todir="${DEST}/${mods_name}">
164
<fileset dir="${mods_dir}"/>
165
</copy>
166
<jar jarfile="${DEST}/openj9_jsr292test.jar" filesonly="true">
167
<fileset dir="${build}"/>
168
</jar>
169
</target>
170
171
<target name="clean" depends="DEST" description="clean up" >
172
<delete dir="${build}"/>
173
<delete dir="${mods_dir}"/>
174
</target>
175
176
<target name="build" >
177
<if>
178
<not>
179
<and>
180
<matches string="${JDK_VERSION}" pattern="^(9|10)$$" />
181
<equals arg1="${JCL_VERSION}" arg2="current"/>
182
</and>
183
</not>
184
<then>
185
<antcall target="clean" inheritall="true" />
186
</then>
187
</if>
188
</target>
189
</project>
190