Integrated: 8348905: Add support to specify the JDK for compiling Jtreg tests

Jiangli Zhou jiangli at openjdk.org
Wed Jan 29 17:55:51 UTC 2025


On Wed, 29 Jan 2025 01:12:52 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

> This adds `-compilejdk:$$(JDK_FOR_COMPILE)` to the jtreg run command. By default `JDK_FOR_COMPILE` is set to `$(JDK_IMAGE_DIR)`, which is the same as `JDK_UNDER_TEST`. `JDK_FOR_COMPILE` can be set to an alternative JDK directory that is different from the JDK running the tests. For jtreg testing on the new `static-jdk` image (the static JDK built by `static-jdk-image`), this becomes useful. The `static-jdk` binary is a subset of the regular `jdk` and only contain the needed files for the `static` Java launcher. `JDK_FOR_COMPILE` can be set to a JDK directory containing the full JDK binary. For example:
> 
> `$ make test-tier1 JDK_IMAGE_DIR=/.../JDK-8348905/build/linux-x86_64-server-release/images/static-jdk JDK_FOR_COMPILE=/.../JDK-8348905/build/linux-x86_64-server-release/images/jdk`
> 
> Without the support, when running jtreg tests on `static-jdk` it produces following error:
> 
> 
> Running test 'jtreg:test/hotspot/jtreg:tier1'
> Error: Compilation of extra property definition files failed.
> Finished running test 'jtreg:test/hotspot/jtreg:tier1'
> Test report is stored in build/linux-x86_64-server-release/test-results/jtreg_test_hotspot_jtreg_tier1
> Clean up dirs for jtreg_test_jdk_tier1

This pull request has now been integrated.

Changeset: cbe9ec53
Author:    Jiangli Zhou <jiangli at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/cbe9ec530fc248be74766ff6ff32761cd415a6f0
Stats:     4 lines in 1 file changed: 4 ins; 0 del; 0 mod

8348905: Add support to specify the JDK for compiling Jtreg tests

Reviewed-by: erikj

-------------

PR: https://git.openjdk.org/jdk/pull/23345


More information about the build-dev mailing list