Skip to content

Commit f64f3bc

Browse files
author
duke
committedJul 16, 2024
Automatic merge of jdk:master into master
2 parents 3290f70 + 8feabc8 commit f64f3bc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎test/jdk/tools/jlink/JLinkReproducibleTest.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,9 @@
3737
* @run driver JLinkReproducibleTest
3838
*/
3939
public class JLinkReproducibleTest {
40+
41+
private static final String TOOL_VM_OPTIONS = System.getProperty("test.tool.vm.opts", "");
42+
4043
private static void run(List<String> cmd) throws Exception {
4144
var pb = new ProcessBuilder(cmd.toArray(new String[0]));
4245
var res = ProcessTools.executeProcess(pb);
@@ -46,6 +49,9 @@ private static void run(List<String> cmd) throws Exception {
4649
private static void jlink(Path image, boolean with_default_trace_file) throws Exception {
4750
var cmd = new ArrayList<String>();
4851
cmd.add(JDKToolFinder.getJDKTool("jlink"));
52+
if (!TOOL_VM_OPTIONS.isEmpty()) {
53+
cmd.addAll(Arrays.asList(TOOL_VM_OPTIONS.split("\\s+", -1)));
54+
}
4955
cmd.addAll(List.of(
5056
"--module-path", JMODS_DIR.toString() + File.pathSeparator + CLASS_DIR.toString(),
5157
"--add-modules", "main",

0 commit comments

Comments
 (0)
Please sign in to comment.