- Prerequisites:
- OpenJDK Community TCK License Agreement (OCTLA)
- your own set of JCK test materials (JCK test source under OCTLA License): jck8d or jck9
- ant 1.10.1 or above with ant-contrib.jar
-
Create an empty folder where your JCK test materials will be stored. For example
makedir /jck
. -
Export
JCK_GIT_REPO=<test_material_repo | test_material_folder>
as an environment variable or pass it in when run as a make command.
- If your test material is stored in a git repository it will be cloned to the empty folder created in step 1. For example
export JCK_GIT_REPO=git@github.com:<org>/<repo>.git
. - Otherwise put your unarchived jck test materials into the empty folder created in step 1 and point
JCK_GIT_REPO
to this folder. For exampleexport JCK_GIT_REPO=/jck/jck8d
.
- Export
JCK_ROOT=/jck/<test_material_folder>
as an environment variable or pass it in when run as a make command. For exampleexport JCK_ROOT=/jck/jck8d
.
- Optional. The default value is
<openjdk-test>/../../../jck_root/JCK$(JDK_VERSION)-unzipped
. - if you export
SKIP_JCK_GIT_UPDATE=true
, then theJCK_GIT_REPO
is not used at all, andJCK_ROOT
is used directly, without needing to be a repo.
-
Export
TEST_JDK_HOME=<your_JDK_root>
as an environment variable. -
If you want to compile jck test only, export
BUILD_LIST=jck
. The other steps will stay the same as instructed in aqa-tests/README.md.
This test directory contains:
build.xml
file - that clones adoptium/stf repo to pick up a test framework<test_subset>/playlist.xml
- to allow easy inclusion of JCK tests into automated buildsjck.mk
- define extra settings for running JCK tests.
There are three custom JCK test targets jckruntime_custom, jckcompiler_custom, jckdevtools_custom
. They are used to run custom JCK test targets in JCK runtime, compiler and devtools testsuites respectively. Take jckruntime_custom as example:
-
Follow the Steps 1 - 4 mentioned above.
-
Export
JCKRUNTIME_CUSTOM_TARGET=<jck_test_subset>
as an environment variable or pass it in when run as a make command. For exampleexport JCKRUNTIME_CUSTOM_TARGET=api/java_math
. -
Make sure the JCK test subset is available in JCK test material folder, a.k.a.
$(JCK_ROOT)
. -
If you need to add extra Java options to JCK tests, you could export
EXTRA_OPTIONS="<java_options>"
. Then extra added Java options would be added to JCK test during execution. -
Follow the steps remaining in aqa-tests/README.md.
With the help of this JCK dockerfile, users can execute JCK tests locally without having environment setup problems. To utilize the advantage of docker-based JCK test, users can follow the step below to run JCK tests locally within Docker container.
-
Run the aqa-tests/get.sh to prepare the test framework and dependencies.
-
Follow the readme in aqa-tests/buildenv/docker/README.md to build Docker image.
-
Prepare the JCK materials locally and mount it to the Docker container when you initialize the JCK docker image.
-
Once you are in the Docker container, follow How-to Run customized JCK test targets or How-to Run JCK Tests to run JCK tests locally.
// clone this aqa-tests repo
git clone https://github.com/adoptium/aqa-tests.git
// build docker image and run it
// the JCK_ROOT structure should be like
//root:jck root$ tree -L 2 ./
//./
//├── jck11a
//├── jck10
//├── jck8d
//└── jck9
cd aqa-tests/buildenv/docker
docker build -t openjdk-test .
docker run -it -v <path_to_aqa-tests_root>:/test -v <jck_material_root>:/jck openjdk-test /bin/bash
// within docker container
cd /test
bash get.sh --testdir /test --customizedURL https://api.adoptopenjdk.net/openjdk8-openj9/nightly/x64_linux/latest/binary --sdkdir /java
export TEST_JDK_HOME=/java/jdkbinary/j2sdk-image
export BUILD_LIST=jck
export JCK_GIT_REPO=git@github.com:mypretendcompany/jck8tests.git
export JCK_ROOT=/jck/jck8tests
cd TKG
make compile
make _sanity.jck
We have three types of tck exclude lists:
-
Dev excludes: This exclude file, ending with
-dev
(e.g. jck8d-dev.jtx), contains vendor specific excludes. All excludes related to automation run by a specific vendor would go into the*dev.jtx
files in tck repositories maintained by that vendor for use during development not certification. -
Test-flag specific excludes: These exclude files support development work by allowing developers to add feature specific temporary excludes. For example, the FIPS specific exclude file (e.g., jck8d-fips.jtx) contains list of excludes specific to FIPS that will only be in effect if
TEST_FLAG
is set tofips
. These files are used for development, not for certification. -
Standard excludes: These are the 3 standard exclude files (jtx and kfl) that come with tck materials. These constitute known failures and are not updated by vendors.
Note In regular automated runs in Jenkins, we will only see the exclude list of type 1 and 3. In grinder runs where jck_custom
is used, Dev exclude is ignored. Type 1 and 2 are used during development, not for certification.