forked from adoptium/aqa-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Added target to get Jtreg version based on JDK version -Moved the getJtreg tar download logic to TKG/scripts/getDependencies.xml resolves : adoptium#4848 Signed-off-by: Anna Babu Palathingal <[email protected]>
- Loading branch information
Showing
3 changed files
with
18 additions
and
233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,80 +41,11 @@ | |
|
||
<property name="REFERENCE_REPO" value="--reference-if-able ${home.unix}/openjdk_cache"/> | ||
|
||
<if> | ||
<!-- versions 8-10, 12-16 --> | ||
<matches pattern="^([89]|1[02-6])$" string="${JDK_VERSION}"/> | ||
<then> | ||
<property name="jtregTar" value="jtreg_5_1_b01"/> | ||
</then> | ||
<elseif> | ||
<!-- version 11 --> | ||
<matches pattern="^11$" string="${JDK_VERSION}"/> | ||
<then> | ||
<property name="jtregTar" value="jtreg_6_1"/> | ||
</then> | ||
</elseif> | ||
<elseif> | ||
<!-- versions 17, 21, 22 --> | ||
<matches pattern="^(17|2[12])$" string="${JDK_VERSION}"/> | ||
<then> | ||
<property name="jtregTar" value="jtreg_7_3_1_1"/> | ||
</then> | ||
</elseif> | ||
<else> | ||
<fail message="Unsupported JDK version: ${JDK_VERSION}"/> | ||
</else> | ||
</if> | ||
|
||
<if> | ||
<or> | ||
<equals arg1="${JDK_IMPL}" arg2="ibm"/> | ||
<equals arg1="${JDK_IMPL}" arg2="openj9"/> | ||
</or> | ||
<then> | ||
<property name="openj9jtregtimeouthandler" value=",tohandler_simple"/> | ||
</then> | ||
<else> | ||
<property name="openj9jtregtimeouthandler" value=""/> | ||
</else> | ||
</if> | ||
|
||
<property name="LIB" value="${jtregTar}${openj9jtregtimeouthandler}"/> | ||
|
||
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/> | ||
|
||
<target name="getJtreg" depends="getDependentLibs"> | ||
<mkdir dir="${DEST}"/> | ||
<if> | ||
<available file="${LIB_DIR}/${jtregTar}.tar.gz"/> | ||
<then> | ||
<copy file="${LIB_DIR}/${jtregTar}.tar.gz" tofile="${jtregTar}.tar.gz"/> | ||
</then> | ||
<elseif> | ||
<available file="custom_jtreg.tar.gz"/> | ||
<then> | ||
<echo message="Using custom_jtreg.tar.gz"/> | ||
<copy file="custom_jtreg.tar.gz" tofile="${jtregTar}.tar.gz"/> | ||
</then> | ||
</elseif> | ||
</if> | ||
<exec executable="gzip" failonerror="true"> | ||
<arg line="-df ${jtregTar}.tar.gz"/> | ||
</exec> | ||
<if> | ||
<contains string="${SPEC}" substring="zos"/> | ||
<then> | ||
<exec executable="tar" failonerror="true"> | ||
<arg line="xfo ${jtregTar}.tar -C ${DEST}"/> | ||
</exec> | ||
</then> | ||
<else> | ||
<exec executable="sh" failonerror="true"> | ||
<arg line="-c 'cat ${jtregTar}.tar | (cd ${DEST} && tar xof -)'"/> | ||
</exec> | ||
</else> | ||
</if> | ||
</target> | ||
|
||
<!-- Call getJtregVersion, getJtreg target from getDependencies.xml --> | ||
<target name="invokeGetJtreg" depends="getJtregVersion,getJtreg"> | ||
</target> | ||
|
||
<target name="getOpenjdk" depends="openjdk-jdk.check" unless="jdkdir.exists"> | ||
<!-- Windows API limitation of file paths having 260 characters or fewer, | ||
|
@@ -141,12 +72,7 @@ | |
<if> | ||
<contains string="${SPEC}" substring="zos"/> | ||
<then> | ||
<propertyregex | ||
property="JDK_REPO_SPECIFIC" | ||
input="${env.JDK_REPO}" | ||
regexp="https://github.ibm.com/" | ||
replace="[email protected]:" | ||
defaultValue="${env.JDK_REPO}"/> | ||
<propertyregex property="JDK_REPO_SPECIFIC" input="${env.JDK_REPO}" regexp="https://github.ibm.com/" replace="[email protected]:" defaultValue="${env.JDK_REPO}"/> | ||
</then> | ||
<else> | ||
<property name="JDK_REPO_SPECIFIC" value="${env.JDK_REPO}"/> | ||
|
@@ -193,16 +119,11 @@ | |
<if> | ||
<isset property="isZOS"/> | ||
<then> | ||
<propertyregex | ||
property="jdk_sha" | ||
input="${jdk_sha}" | ||
regexp="\n" | ||
replace="" | ||
override="true"/> | ||
<propertyregex property="jdk_sha" input="${jdk_sha}" regexp="\n" replace="" override="true"/> | ||
</then> | ||
</if> | ||
<echo message="git checkout -q -f ${jdk_sha} "/> | ||
<exec executable="git" failonerror="true" dir="openjdktemp" > | ||
<exec executable="git" failonerror="true" dir="openjdktemp"> | ||
<arg value="checkout"/> | ||
<arg value="-q"/> | ||
<arg value="-f"/> | ||
|
@@ -321,13 +242,13 @@ | |
</condition> | ||
</target> | ||
|
||
<target name="dist" depends="getJtreg, getOpenjdk" description="generate the distribution"> | ||
<target name="dist" depends="invokeGetJtreg, getOpenjdk" description="generate the distribution"> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}" includes="*.xml,excludes/ProblemList*.txt,*.mk"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="build" > | ||
<target name="build"> | ||
<antcall target="dist" inheritall="true"/> | ||
</target> | ||
</project> |