Path: blob/master/test/functional/DDR_Test/build.xml
6000 views
<?xml version="1.0"?>1<!--2Copyright (c) 2018, 2022 IBM Corp. and others34This program and the accompanying materials are made available under5the terms of the Eclipse Public License 2.0 which accompanies this6distribution and is available at https://www.eclipse.org/legal/epl-2.0/7or the Apache License, Version 2.0 which accompanies this distribution and8is available at https://www.apache.org/licenses/LICENSE-2.0.910This Source Code may also be made available under the following11Secondary Licenses when the conditions for such availability set12forth in the Eclipse Public License, v. 2.0 are satisfied: GNU13General Public License, version 2 with the GNU Classpath14Exception [1] and GNU General Public License, version 2 with the15OpenJDK Assembly Exception [2].1617[1] https://www.gnu.org/software/classpath/license.html18[2] http://openjdk.java.net/legal/assembly-exception.html1920SPDX-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-exception21-->22<project name="DDR_Test" default="build" basedir=".">23<taskdef resource="net/sf/antcontrib/antlib.xml" />24<description>25DDR_Test26</description>2728<!-- set global properties for this build -->29<property name="DEST" value="${BUILD_ROOT}/functional/DDR_Test" />3031<!--Properties for this particular build-->32<property name="src" location="./src" />33<property name="build" location="./bin" />34<property name="transformerListener" location="${TEST_ROOT}/Utils/src" />35<property name="LIB" value="junit4,asm_all,testng" />36<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml" />3738<target name="init">39<mkdir dir="${DEST}" />40<mkdir dir="${build}" />41</target>4243<target name="compile" depends="init,getDependentLibs" description="Using java ${JDK_VERSION} to compile the source">44<echo>Ant version is ${ant.version}</echo>45<echo>============COMPILER SETTINGS============</echo>46<echo>===fork: yes</echo>47<echo>===executable: ${compiler.javac}</echo>48<echo>===debug: on</echo>49<echo>===destdir: ${DEST}</echo>50<if>51<equals arg1="${JDK_VERSION}" arg2="8" />52<then>53<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">54<src path="${src}" />55<src path="${transformerListener}" />56<classpath>57<pathelement location="${LIB_DIR}/junit4.jar" />58<pathelement location="${LIB_DIR}/testng.jar" />59<pathelement location="${LIB_DIR}/asm-all.jar" />60<pathelement location="${TEST_JDK_HOME}/jre/lib/ddr/j9ddr.jar" />61</classpath>62</javac>63</then>64<else>65<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">66<src path="${src}" />67<src path="${transformerListener}" />68<classpath>69<pathelement location="${LIB_DIR}/junit4.jar" />70<pathelement location="${LIB_DIR}/testng.jar" />71<pathelement location="${LIB_DIR}/asm-all.jar" />72</classpath>73<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr=ALL-UNNAMED" />74<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive=ALL-UNNAMED" />75<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.tools.ddrinteractive.annotations=ALL-UNNAMED" />76<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.j9=ALL-UNNAMED" />77<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.j9.gc=ALL-UNNAMED" />78<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.j9.walkers=ALL-UNNAMED" />79<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.pointer=ALL-UNNAMED" />80<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.pointer.generated=ALL-UNNAMED" />81<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.pointer.helper=ALL-UNNAMED" />82<compilerarg value="--add-exports=openj9.dtfj/com.ibm.j9ddr.vm29.types=ALL-UNNAMED" />83</javac>84</else>85</if>86</target>8788<target name="dist" depends="compile" description="generate the distribution">89<jar jarfile="${DEST}/ddrplugin.jar" filesonly="true">90<fileset dir="${build}">91<include name="j9vm/test/ddrext/plugin/**" />92</fileset>93<fileset dir="${src}">94<include name="j9vm/test/ddrext/plugin/**" />95</fileset>96</jar>97<jar jarfile="${DEST}/DDR_Test.jar" filesonly="true">98<fileset dir="${build}">99<exclude name="j9vm/test/ddrext/plugin/**" />100</fileset>101<fileset dir="${src}">102<exclude name="j9vm/test/ddrext/plugin/**" />103</fileset>104</jar>105<copy todir="${DEST}">106<fileset dir="${src}/../" includes="*.xml" />107<fileset dir="${src}/../" includes="*.mk" />108</copy>109</target>110111<target name="clean" depends="dist" description="clean up">112<!-- Delete the ${build} directory trees -->113<delete dir="${build}" />114</target>115116<target name="build">117<echo>os.name: ${os.name}</echo>118<if>119<or>120<equals arg1="${JDK_IMPL}" arg2="ibm" />121<equals arg1="${JDK_IMPL}" arg2="openj9" />122</or>123<then>124<if>125<resourcecount when="greater" count="0">126<fileset dir="${TEST_JDK_HOME}">127<include name="**/j9ddr.dat" />128</fileset>129</resourcecount>130<then>131<antcall target="clean" inheritall="true" />132</then>133<else>134<echo>File 'j9ddr.dat' not found; assuming JDK '${TEST_JDK_HOME}' does not support DDR.</echo>135</else>136</if>137</then>138</if>139</target>140</project>141142143