Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/openj9
Path: blob/master/test/functional/RasapiTest/build.xml
6000 views
1
<?xml version="1.0"?>
2
<!--
3
Copyright (c) 2016, 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="Build script for com.ibm.jvm.ras.tests" default="check" basedir=".">
24
25
<property name="build.jar.tests" value="com.ibm.jvm.ras.tests.jar" />
26
<property name="DEST" value="${BUILD_ROOT}/functional/RasapiTest" />
27
<property name="src.level" value="1.7" />
28
<property name="target.level" value="1.7" />
29
<property name="source.dir" location="src" />
30
<property name="dummy.source.dir" location="dummy_src" />
31
<property name="build.dir" location="build" />
32
<property name="dist.dir" location="dist" />
33
<property name="src" location="." />
34
<property name="LIB" value="junit4" />
35
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml" />
36
<!-- <property name="build.cp" value="${BUILD_ROOT}/build/j9jcl/source/ive/lib/jclSC18/classes-vm.zip" /> -->
37
38
<path id="build.cp">
39
<fileset dir="${LIB_DIR}/" includes="junit4.jar" />
40
</path>
41
42
<target name="help">
43
<echo>Ant build script to generate com.ibm.jvm.ras.tests.jar
44
</echo>
45
</target>
46
47
<target name="clean">
48
<echo>Cleaning build directory ${build.dir}</echo>
49
<mkdir dir="${dist.dir}" />
50
<delete failonerror="false" verbose="true">
51
<fileset dir="${dist.dir}" includes="${build.jar.tests}" />
52
</delete>
53
<delete dir="${dist.dir}" />
54
<mkdir dir="${build.dir}/bin" />
55
<delete failonerror="false" verbose="false">
56
<fileset dir="${build.dir}" includes="bin/**/*" />
57
</delete>
58
<delete dir="${build.dir}" />
59
</target>
60
61
<target name="compile" depends="clean">
62
<echo>Ant version is ${ant.version}</echo>
63
<echo>Compiling code to ${build.dir} and packaging ${build.jar.tests} to ${dist.dir}</echo>
64
65
<echo>============COMPILER SETTINGS============</echo>
66
<echo>===fork: yes</echo>
67
<echo>===executable: ${compiler.javac}</echo>
68
<echo>===source: ${src.level}</echo>
69
<echo>===target: ${target.level}</echo>
70
<echo>===debug: on</echo>
71
<echo>===destdir: ${build.dir}</echo>
72
73
<mkdir dir="${build.dir}/bin" />
74
<mkdir dir="${dist.dir}" />
75
<javac destdir="${build.dir}/bin" source="${src.level}" target="${target.level}"
76
debug="true" fork="true" executable="${compiler.javac}" encoding="UTF-8" classpathref="build.cp">
77
<!-- Locally there can be a problem with old versions of the DTFJ API which don't support Image.close().
78
I could remove that call but it causes us to leak files and blocks checking if files are system
79
dumps so this points to a recent version of dtfj-interface.jar to compile against instead. -->
80
<!-- <compilerarg value="-Xbootclasspath/p:${build.cp}" /> -->
81
<src path="${source.dir}" />
82
<!-- The boot compiler, unless it's IBM 1.8, won't have the right API to build all these tests.
83
We have a hollowed out version in dummy_src for the tests to compile against -->
84
<src path="${dummy.source.dir}" />
85
</javac>
86
87
<!-- jar the .class files except the dummy source -->
88
<jar destfile="${dist.dir}/${build.jar.tests}">
89
<fileset dir="${build.dir}/bin">
90
<exclude name="com/ibm/jvm/*.class" />
91
</fileset>
92
</jar>
93
94
<copy todir="${dist.dir}">
95
<fileset dir="${LIB_DIR}/" includes="junit4.jar" />
96
</copy>
97
98
<copy todir="${dist.dir}">
99
<fileset dir="." includes="test.xml" />
100
</copy>
101
</target>
102
103
<target name="check">
104
<if>
105
<or>
106
<equals arg1="${JDK_IMPL}" arg2="ibm" />
107
<equals arg1="${JDK_IMPL}" arg2="openj9" />
108
</or>
109
<then>
110
<antcall target="build" inheritall="true" />
111
</then>
112
</if>
113
</target>
114
115
<target name="build" depends="compile">
116
<mkdir dir="${DEST}" />
117
<copy todir="${DEST}">
118
<fileset dir="${dist.dir}" includes="*.xml,**/*.jar,**/*.xml" />
119
<fileset dir="${src}" includes="*.mk" />
120
</copy>
121
</target>
122
123
</project>
124
125