Skip to content

Commit 910e2c4

Browse files
committed
8308910: Allow executeAndLog to accept running process
Backport-of: fc288568f2c589975463d30f8c6d0e2484f0bf14
1 parent 46ce8cb commit 910e2c4

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/lib/jdk/test/lib/cds/CDSTestUtils.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,8 +558,12 @@ public static File getSourceFile(String name) {
558558

559559
// ============================= Logging
560560
public static OutputAnalyzer executeAndLog(ProcessBuilder pb, String logName) throws Exception {
561+
return executeAndLog(pb.start(), logName);
562+
}
563+
564+
public static OutputAnalyzer executeAndLog(Process process, String logName) throws Exception {
561565
long started = System.currentTimeMillis();
562-
OutputAnalyzer output = new OutputAnalyzer(pb.start());
566+
OutputAnalyzer output = new OutputAnalyzer(process);
563567

564568
writeFile(getOutputFile(logName + ".stdout"), output.getStdout());
565569
writeFile(getOutputFile(logName + ".stderr"), output.getStderr());

0 commit comments

Comments
 (0)