-
-
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.
Support container-based tck tests (#5320)
- Support container-based tck tests - currently test is set in special.external for j9 only Signed-off-by: LongyuZhang <[email protected]>
- Loading branch information
1 parent
05faa63
commit 8e0dc1e
Showing
10 changed files
with
211 additions
and
15 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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?xml version="1.0"?> | ||
<project name="tck-ubi-test" default="build" basedir="."> | ||
<taskdef resource="net/sf/antcontrib/antlib.xml" /> | ||
<description> | ||
Build tck-ubi-test Docker image | ||
</description> | ||
<import file="${TEST_ROOT}/external/build.xml"/> | ||
<import file="${TEST_ROOT}/jck/build.xml"/> | ||
|
||
<!-- set properties for this build --> | ||
<property name="TEST" value="tck-ubi-test" /> | ||
<property name="DEST" value="${BUILD_ROOT}/external/${TEST}" /> | ||
<mkdir dir="${BUILD_ROOT}/external/${TEST}/jck_root"/> | ||
<property name="env.JCK_ROOT" value="${BUILD_ROOT}/external/${TEST}/jck_root/JCK${JDK_VERSION}-unzipped" /> | ||
<property name="src" location="." /> | ||
|
||
<target name="init"> | ||
<mkdir dir="${DEST}"/> | ||
</target> | ||
|
||
<target name="stage_jck_material" description="stage jck material"> | ||
<copy todir="${DEST_EXTERNAL}/${TEST}"> | ||
<fileset dir="${TEST_ROOT}/jck/" includes="*.sh"/> | ||
</copy> | ||
<echo message="${DEST_EXTERNAL}/${TEST}/update_git_material.sh ${env.JCK_ROOT} ${env.JCK_GIT_REPO} ${env.JCK_GIT_BRANCH} ${isZOS}" /> | ||
<exec executable="bash" failonerror="true"> | ||
<arg value="${DEST_EXTERNAL}/${TEST}/update_git_material.sh"/> | ||
<arg value="${env.JCK_ROOT}" /> | ||
<arg value="${env.JCK_GIT_REPO}" /> | ||
<arg value="${env.JCK_GIT_BRANCH}" /> | ||
<arg value="${isZOS}" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="build_image" depends="move_scripts,clean_image" description="build the image"> | ||
<echo message="Executing external.sh --build --dir ${TEST} --tag ${dockerImageTag} --version ${JDK_VERSION} --impl ${JDK_IMPL} --docker_os 'ubi' --platform ${env.SPEC} --base_docker_registry_dir 'ubi9/ubi' --docker_registry_url 'registry.access.redhat.com' --docker_args ${extra_docker_args} " /> | ||
<exec executable="bash" failonerror="true"> | ||
<arg value="${DEST_EXTERNAL}/external.sh"/> | ||
<arg value="--build"/> | ||
<arg value="--dir"/> | ||
<arg value="${TEST}"/> | ||
<arg value="--tag"/> | ||
<arg value="${dockerImageTag}"/> | ||
<arg value="--version"/> | ||
<arg value="${JDK_VERSION}"/> | ||
<arg value="--impl"/> | ||
<arg value="${JDK_IMPL}"/> | ||
<arg value="--docker_os"/> | ||
<arg value="ubi"/> | ||
<arg value="--platform"/> | ||
<arg value="${env.SPEC}"/> | ||
<arg value="--base_docker_registry_dir"/> | ||
<arg value="ubi9/ubi"/> | ||
<arg value="--docker_registry_url"/> | ||
<arg value="registry.access.redhat.com"/> | ||
<arg value="--docker_args"/> | ||
<arg value="${extra_docker_args}"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="dist" depends="stage_jck_material,build_image" description="generate the distribution"> | ||
<copy todir="${DEST}"> | ||
<fileset dir="${src}" includes="*.xml, *.mk"/> | ||
</copy> | ||
</target> | ||
|
||
<target name="build"> | ||
<antcall target="dist" 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,38 @@ | ||
<?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/resources/playlist.xsd"> | ||
<test> | ||
<testCaseName>tck-ubi-test</testCaseName> | ||
<command> $(TEST_ROOT)$(D)external$(D)external.sh --run --tag "${DOCKERIMAGE_TAG}" --dir tck-ubi-test --testtarget "_testList TESTLIST=jck-runtime-api-javax_annotation" --reportdst $(REPORTDIR) --docker_args "$(EXTRA_DOCKER_ARGS) -v ${BUILD_ROOT}/external/tck-ubi-test/jck_root/JCK${JDK_VERSION}-unzipped:/opt/jck_root/unzipped -v $(TEST_ROOT):/opt/test_root"; \ | ||
$(TEST_STATUS); \ | ||
$(TEST_ROOT)$(D)external$(D)external.sh --clean --tag "${DOCKERIMAGE_TAG}" --dir tck-ubi-test | ||
</command> | ||
<disables> | ||
<disable> | ||
<comment>Only applicable on xlinux, plinux, alinux, and zlinux atm</comment> | ||
<platform>^((?!(x86-64_linux|ppc64le_linux|aarch64_linux|s390x_linux)).)*$</platform> | ||
</disable> | ||
</disables> | ||
<impls> | ||
<impl>openj9</impl> | ||
</impls> | ||
<levels> | ||
<level>special</level> | ||
</levels> | ||
<groups> | ||
<group>external</group> | ||
</groups> | ||
</test> | ||
</playlist> |
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,8 @@ | ||
github_url="https://github.com/adoptium/aqa-tests.git" | ||
test_results="testResults" | ||
gradle_version="5.1" | ||
environment_variable="MODE=java CC=gcc-7 CXX=g++-7" | ||
ubi_packages="git wget perl tzdata openssl ca-certificates fontconfig glibc-langpack-en gzip tar" | ||
ant_version="1.10.5" | ||
ant_contrib_version="1.0b3" | ||
jdk_install="true" |
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,56 @@ | ||
#/bin/bash | ||
# 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 | ||
# | ||
# http://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. | ||
# | ||
|
||
source $(dirname "$0")/test_base_functions.sh | ||
|
||
MOUNTED_JDK_DIR="/opt/java/openjdk" | ||
New_JDK_DIR="/internaljdk/java/openjdk" | ||
if [ -d "$MOUNTED_JDK_DIR" ]; then | ||
mkdir -p $New_JDK_DIR | ||
cp -r $MOUNTED_JDK_DIR/* $New_JDK_DIR/ | ||
export TEST_JDK_HOME=$New_JDK_DIR | ||
echo "TEST_JDK_HOME is : $TEST_JDK_HOME" | ||
else | ||
echo "No JDK found!" | ||
exit 1 | ||
fi | ||
|
||
echo_setup | ||
unset JDK_VERSION | ||
echo "TEST_JDK_HOME has been reset to $TEST_JDK_HOME, use TKG auto-detect to detect JDK_VERSION and JDK_IMPL." | ||
export AUTO_DETECT=true | ||
export DYNAMIC_COMPILE=false | ||
export BUILD_LIST=jck | ||
|
||
export STAGE_JCK_MATERIAL_FROM_GIT=false | ||
mkdir /jck_unzipped | ||
cp -r /opt/jck_root/unzipped/* /jck_unzipped/ | ||
export JCK_ROOT=/jck_unzipped | ||
export JCK_ROOT_USED=${JCK_ROOT} | ||
echo "JCK_ROOT in docker is ${JCK_ROOT}" | ||
echo "JCK_ROOT_USED in docker is ${JCK_ROOT_USED}" | ||
export DISPLAY = "unix:0" | ||
echo "DISPLAY in docker is ${DISPLAY}" | ||
|
||
set -e | ||
cd /aqa-tests | ||
./get.sh | ||
rm -rf /aqa-tests/jck | ||
cp -R /opt/test_root/jck /aqa-tests/ | ||
|
||
cd /aqa-tests/TKG | ||
echo "Generating make files and running the target tests" | ||
make compile | ||
make $1 | ||
set +e |
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