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