8277647: [REDO] JDK-8277507 Add jlink.debug system property while launching jpackage tests to help diagonize recent intermittent failures

Reviewed-by: sundar
This commit is contained in:
Jaikiran Pai 2021-12-02 01:29:52 +00:00
parent 67745fa749
commit 09522db5aa

View File

@ -768,6 +768,11 @@ public final class JPackageCommand extends CommandArguments<JPackageCommand> {
}
private JPackageCommand adjustArgumentsBeforeExecution() {
if (!isWithToolProvider()) {
// if jpackage is launched as a process then set the jlink.debug system property
// to allow the jlink process to print exception stacktraces on any failure
addArgument("-J-Djlink.debug=true");
}
if (!hasArgument("--runtime-image") && !hasArgument("--app-image") && DEFAULT_RUNTIME_IMAGE != null && !ignoreDefaultRuntime) {
addArguments("--runtime-image", DEFAULT_RUNTIME_IMAGE);
}