Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/DDR_Test/build.xml
6000 views
1
<?xml version="1.0"?>
2
<!--
3
Copyright (c) 2018, 2022 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="DDR_Test" default="build" basedir=".">
24
<taskdef resource="net/sf/antcontrib/antlib.xml" />
25
<description>
26
DDR_Test
27
</description>
28
29
<!-- set global properties for this build -->
30
<property name="DEST" value="${BUILD_ROOT}/functional/DDR_Test" />
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
<property name="LIB" value="junit4,asm_all,testng" />
37
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml" />
38
39
<target name="init">
40
<mkdir dir="${DEST}" />
41
<mkdir dir="${build}" />
42
</target>
43
44
<target name="compile" depends="init,getDependentLibs" description="Using java ${JDK_VERSION} to compile the source">
45
<echo>Ant version is ${ant.version}</echo>
46
<echo>============COMPILER SETTINGS============</echo>
47
<echo>===fork: yes</echo>
48
<echo>===executable: ${compiler.javac}</echo>
49
<echo>===debug: on</echo>
50
<echo>===destdir: ${DEST}</echo>
51
<if>
52
<equals arg1="${JDK_VERSION}" arg2="8" />
53
<then>
54
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
55
<src path="${src}" />
56
<src path="${transformerListener}" />
57
<classpath>
58
<pathelement location="${LIB_DIR}/junit4.jar" />
59
<pathelement location="${LIB_DIR}/testng.jar" />
60
<pathelement location="${LIB_DIR}/asm-all.jar" />
61
<pathelement location="${TEST_JDK_HOME}/jre/lib/ddr/j9ddr.jar" />
62
</classpath>
63
</javac>
64
</then>
65
<else>
66
<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">
67
<src path="${src}" />
68
<src path="${transformerListener}" />
69
<classpath>
70
<pathelement location="${LIB_DIR}/junit4.jar" />
71
<pathelement location="${LIB_DIR}/testng.jar" />
72
<pathelement location="${LIB_DIR}/asm-all.jar" />
73
</classpath>
74
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr=ALL-UNNAMED" />
75
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive=ALL-UNNAMED" />
76
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.annotations=ALL-UNNAMED" />
77
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.j9=ALL-UNNAMED" />
78
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.j9.gc=ALL-UNNAMED" />
79
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.j9.walkers=ALL-UNNAMED" />
80
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.pointer=ALL-UNNAMED" />
81
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.pointer.generated=ALL-UNNAMED" />
82
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.pointer.helper=ALL-UNNAMED" />
83
<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.types=ALL-UNNAMED" />
84
</javac>
85
</else>
86
</if>
87
</target>
88
89
<target name="dist" depends="compile" description="generate the distribution">
90
<jar jarfile="${DEST}/ddrplugin.jar" filesonly="true">
91
<fileset dir="${build}">
92
<include name="j9vm/test/ddrext/plugin/**" />
93
</fileset>
94
<fileset dir="${src}">
95
<include name="j9vm/test/ddrext/plugin/**" />
96
</fileset>
97
</jar>
98
<jar jarfile="${DEST}/DDR_Test.jar" filesonly="true">
99
<fileset dir="${build}">
100
<exclude name="j9vm/test/ddrext/plugin/**" />
101
</fileset>
102
<fileset dir="${src}">
103
<exclude name="j9vm/test/ddrext/plugin/**" />
104
</fileset>
105
</jar>
106
<copy todir="${DEST}">
107
<fileset dir="${src}/../" includes="*.xml" />
108
<fileset dir="${src}/../" includes="*.mk" />
109
</copy>
110
</target>
111
112
<target name="clean" depends="dist" description="clean up">
113
<!-- Delete the ${build} directory trees -->
114
<delete dir="${build}" />
115
</target>
116
117
<target name="build">
118
<echo>os.name: ${os.name}</echo>
119
<if>
120
<or>
121
<equals arg1="${JDK_IMPL}" arg2="ibm" />
122
<equals arg1="${JDK_IMPL}" arg2="openj9" />
123
</or>
124
<then>
125
<if>
126
<resourcecount when="greater" count="0">
127
<fileset dir="${TEST_JDK_HOME}">
128
<include name="**/j9ddr.dat" />
129
</fileset>
130
</resourcecount>
131
<then>
132
<antcall target="clean" inheritall="true" />
133
</then>
134
<else>
135
<echo>File 'j9ddr.dat' not found; assuming JDK '${TEST_JDK_HOME}' does not support DDR.</echo>
136
</else>
137
</if>
138
</then>
139
</if>
140
</target>
141
</project>
142
143