RFR: 8317039 Enable specifying the JDK used to run jtreg
Erik Joelsson
erikj at openjdk.org
Mon Oct 2 14:13:17 UTC 2023
On Mon, 2 Oct 2023 12:36:50 GMT, Ludvig Janiuk <lujaniuk at openjdk.org> wrote:
> This pull request introduces changes in the build makefiles necessary to enable the user to specify a jdk to use when launching jtreg. It introduces a new configure flag, `--with-jtreg-jdk`, which takes a JDK path similar to the already existing `--with-boot-jdk`.
>
> Before this pull request, boot-jdk was always used to launch jtreg. This pull request decouples the two, but still defaults to boot-jdk if no value is specified.
make/autoconf/lib-tests.m4 line 242:
> 240: AC_MSG_ERROR([--with-jtreg-jdk needs a value])
> 241: else
> 242: JTREG_TOOL_JDK="${with_jtreg_jdk}"
Can we consistently call this `JTREG_JDK` and `JTREG_JAVA` throughout?
make/autoconf/lib-tests.m4 line 244:
> 242: JTREG_TOOL_JDK="${with_jtreg_jdk}"
> 243: UTIL_FIXUP_PATH(JTREG_TOOL_JDK)
> 244: AC_MSG_CHECKING([jtreg java existence])
When using `AC_MSG_CHECKING` on line 234, every possible path through the conditional branches needs exactly one `AC_MSG_RESULT` before any other output is generated. It needs to be done before `UTIL_FIXUP_PATH` since that macro may generate error output. I don't think we need another `AC_MSG_CHECKING` here. I would just `AC_MSG_RESULT([$JTREG_JDK])` and then error if no `bin/java` could be found.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16010#discussion_r1342741223
PR Review Comment: https://git.openjdk.org/jdk/pull/16010#discussion_r1342740358
More information about the build-dev
mailing list