Skip to content

Commit

Permalink
Copy getJtreg to shared location
Browse files Browse the repository at this point in the history
-Moved the getJtreg version to TKG/scripts/getDependencies.xml

resolves : adoptium#4848

Signed-off-by: Anna Babu Palathingal <[email protected]>
  • Loading branch information
annaibm committed Nov 10, 2023
1 parent 4a1eca1 commit f2a5808
Showing 1 changed file with 4 additions and 74 deletions.
78 changes: 4 additions & 74 deletions openjdk/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,80 +41,10 @@

<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} &amp;&amp; tar xof -)'"/>
</exec>
</else>
</if>
</target>
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml">
<property name="DEST" value="${DEST}" />
</import>


<target name="getOpenjdk" depends="openjdk-jdk.check" unless="jdkdir.exists">
<!-- Windows API limitation of file paths having 260 characters or fewer,
Expand Down

0 comments on commit f2a5808

Please sign in to comment.