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

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

Commit messages:
 - Add `-compilejdk:$$(JDK_FOR_COMPILE)` to jtreg run command. By default 
JDK_FOR_COMPILE is set to $(JDK_IMAGE_DIR), which is the same as JDK_UNDER_TEST.

Changes: https://git.openjdk.org/jdk/pull/23345/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23345&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8348905
  Stats: 4 lines in 1 file changed: 4 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/23345.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23345/head:pull/23345

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

Reply via email to