-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy getJtreg to shared location (#4871)
-Moved the getJtreg tar download logic to TKG/scripts/getDependencies.xml resolves : #4848 Signed-off-by: Anna Babu Palathingal <[email protected]>
- Loading branch information
Showing
3 changed files
with
51 additions
and
278 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,131 +15,58 @@ | |
--> | ||
|
||
<project name="ssl-tests Security Functional tests" default="build" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
ssl-tests Security Functional tests | ||
</description> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
ssl-tests Security Functional tests | ||
</description> | ||
|
||
<!-- set global properties for this build --> | ||
<property name="DEST" value="${BUILD_ROOT}/functional/security/ssl-tests" /> | ||
<!-- set global properties for this build --> | ||
<property name="DEST" value="${BUILD_ROOT}/functional/security/ssl-tests" /> | ||
|
||
<!--Properties for this particular build--> | ||
<property name="src" location="./ssl-tests" /> | ||
<!--Properties for this particular build--> | ||
<property name="src" location="./ssl-tests" /> | ||
|
||
<target name="ssltests.check"> | ||
<condition property="ssltestsTestdir.exists"> | ||
<available file="ssl-tests" type="dir"/> | ||
</condition> | ||
</target> | ||
<target name="ssltests.check"> | ||
<condition property="ssltestsTestdir.exists"> | ||
<available file="ssl-tests" type="dir"/> | ||
</condition> | ||
</target> | ||
|
||
<if> | ||
<contains string="${SPEC}" substring="zos"/> | ||
<then> | ||
<property name="GIT_REPO" value="[email protected]:" /> | ||
</then> | ||
<else> | ||
<property name="GIT_REPO" value="https://github.com/" /> | ||
</else> | ||
</if> | ||
<target name="getSsltestsTest" depends="ssltests.check" unless="ssltestsTestdir.exists"> | ||
<exec executable="git" failonerror="true"> | ||
<arg value="clone" /> | ||
<arg value="${GIT_REPO}rh-openjdk/ssl-tests.git" /> | ||
</exec> | ||
</target> | ||
<if> | ||
<contains string="${SPEC}" substring="zos"/> | ||
<then> | ||
<property name="GIT_REPO" value="[email protected]:" /> | ||
</then> | ||
<else> | ||
<property name="GIT_REPO" value="https://github.com/" /> | ||
</else> | ||
</if> | ||
<target name="getSsltestsTest" depends="ssltests.check" unless="ssltestsTestdir.exists"> | ||
<exec executable="git" failonerror="true"> | ||
<arg value="clone" /> | ||
<arg value="${GIT_REPO}rh-openjdk/ssl-tests.git" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="init"> | ||
<mkdir dir="${DEST}" /> | ||
</target> | ||
<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> | ||
<!-- versions 11, 17 --> | ||
<matches pattern="^1[17]$" string="${JDK_VERSION}"/> | ||
<then> | ||
<property name="jtregTar" value="jtreg_6_1"/> | ||
</then> | ||
</elseif> | ||
<elseif> | ||
<!-- version 21, 22 --> | ||
<matches pattern="^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}"/> | ||
<target name="init"> | ||
<mkdir dir="${DEST}" /> | ||
</target> | ||
|
||
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/> | ||
<target name="getJtreg"> | ||
<mkdir dir="${DEST}"/> | ||
<if> | ||
<not> | ||
<available file="${LIB_DIR}/${jtregTar}.tar.gz" /> | ||
</not> | ||
<then> | ||
<if> | ||
<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> | ||
</if> | ||
</then> | ||
<else> | ||
<copy file="${LIB_DIR}/${jtregTar}.tar.gz" tofile="${jtregTar}.tar.gz"/> | ||
</else> | ||
</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> | ||
<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/> | ||
|
||
<target name="dist" depends="getJtreg,getSsltestsTest" description="generate the distribution"> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}" includes="*.xml,*.mk" /> | ||
</copy> | ||
</target> | ||
|
||
<target name="dist" depends="getDependentLibs,getJtreg,getSsltestsTest" description="generate the distribution"> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}" includes="*.xml,*.mk" /> | ||
</copy> | ||
</target> | ||
<target name="clean" depends="dist" description="clean up"> | ||
<!-- Delete the ${build} directory trees --> | ||
<delete dir="${build}" /> | ||
</target> | ||
|
||
<target name="clean" depends="dist" description="clean up"> | ||
<!-- Delete the ${build} directory trees --> | ||
<delete dir="${build}" /> | ||
</target> | ||
|
||
<target name="build" > | ||
<antcall target="clean" inheritall="true" /> | ||
</target> | ||
<target name="build" > | ||
<antcall target="clean" inheritall="true" /> | ||
</target> | ||
</project> | ||
|
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,81 +41,8 @@ | |
|
||
<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> | ||
|
||
|
||
<target name="getOpenjdk" depends="openjdk-jdk.check" unless="jdkdir.exists"> | ||
<!-- Windows API limitation of file paths having 260 characters or fewer, | ||
run the config command to allow file paths of 4096 characters | ||
|
@@ -141,12 +68,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 +115,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"/> | ||
|
@@ -327,7 +244,7 @@ | |
</copy> | ||
</target> | ||
|
||
<target name="build" > | ||
<target name="build"> | ||
<antcall target="dist" inheritall="true"/> | ||
</target> | ||
</project> |