aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

Fail fast if JCK_GIT_REPO and JDK_VERSION has a mismatch

Open smlambert opened this issue 2 years ago • 2 comments

While there is no guarantee that everyone using our scripts use the recommended name, JCKxx-unzipped for JCK_GIT_REPO, but if they do, we can add a check for whether the version in use matches the JDK_VERSION under test. This was identified as a common user error for some people when running Grinders (who are not launching Grinders from the quick links provided in the original test job) during the retrospective.

If there is a mismatch, we should fail immediately instead of trying to run tests.

smlambert avatar Aug 15 '23 00:08 smlambert

I think we should use build.txt in the JCK repo (i.e., under runtime) to verify JCK version/build, the expected JDK_VERSION, and the actual JDK_VERSION. For example:

java full version openjdk "21-ea+32"
JDK_VERSION=21
JDK_BUILD_ID=32

The build should fail if the expected JDK_VERSION > the actual JDK_VERSION. And maybe a warning message if the JDK_VERSION is the same, but expected JDK_BUILD_ID > actual Java build. For example, JDK_VERSION=21, but the expected JDK_BUILD_ID=32, actual Java build 30. It means an older JCL level is used.

llxia avatar Aug 15 '23 14:08 llxia

Note: Needs to use the environment variable (JCK_GIT_REPO) for TCK location to be user-agnostic

jiekang avatar Sep 05 '23 13:09 jiekang