-
-
Notifications
You must be signed in to change notification settings - Fork 314
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ssl-tests * Use dev level for ssl-tests * ssl-tests: requirements fixes
- Loading branch information
Showing
2 changed files
with
178 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--> | ||
|
||
<project name="ssl-tests Security Functional tests" default="build" basedir="."> | ||
<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" /> | ||
|
||
<!--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> | ||
|
||
<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}"/> | ||
|
||
<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> | ||
|
||
<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="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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<!-- | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
--> | ||
<playlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../TKG/playlist.xsd"> | ||
<test> | ||
<testCaseName>ssl-tests</testCaseName> | ||
<command>$(JAVA_COMMAND) -Xmx512m -jar $(Q)$(TEST_RESROOT)$(D)jtreg$(D)lib$(D)jtreg.jar$(Q) \ | ||
-a -xml -v:fail,error,time,nopass,summary -timeoutFactor:2 \ | ||
-w $(Q)$(REPORTDIR)$(D)work$(Q) \ | ||
-r $(Q)$(REPORTDIR)$(D)report$(Q) \ | ||
-jdk:$(Q)$(TEST_JDK_HOME)$(Q) \ | ||
$(Q)$(TEST_ROOT)$(D)functional$(D)security$(D)ssl-tests$(D)ssl-tests$(D)jtreg-wrappers$(Q); \ | ||
$(TEST_STATUS)</command> | ||
<levels> | ||
<level>dev</level> | ||
</levels> | ||
<groups> | ||
<group>functional</group> | ||
</groups> | ||
<platformRequirements>bits.64,arch.x86</platformRequirements> | ||
</test> | ||
</playlist> |