Skip to content

Commit fc28856

Browse files
committed
8308910: Allow executeAndLog to accept running process
Reviewed-by: lucy Backport-of: 024d9b131d6c2d5ee6c8cafdb05b9e9e299d588e
1 parent f85053f commit fc28856

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
@@ -594,8 +594,12 @@ public static File getSourceFile(String name) {
594594

595595
// ============================= Logging
596596
public static OutputAnalyzer executeAndLog(ProcessBuilder pb, String logName) throws Exception {
597+
return executeAndLog(pb.start(), logName);
598+
}
599+
600+
public static OutputAnalyzer executeAndLog(Process process, String logName) throws Exception {
597601
long started = System.currentTimeMillis();
598-
OutputAnalyzer output = new OutputAnalyzer(pb.start());
602+
OutputAnalyzer output = new OutputAnalyzer(process);
599603
String logFileNameStem =
600604
String.format("%04d", getNextLogCounter()) + "-" + logName;
601605

0 commit comments

Comments
 (0)